{
 "instance": {
  "cdxs-20221231.htm": {
   "axisCustom": 1,
   "axisStandard": 41,
   "baseTaxonomies": {
    "http://fasb.org/us-gaap/2022": 1336,
    "http://xbrl.sec.gov/dei/2022": 37
   },
   "contextCount": 421,
   "dts": {
    "calculationLink": {
     "local": [
      "cdxs-20221231_cal.xml"
     ]
    },
    "definitionLink": {
     "local": [
      "cdxs-20221231_def.xml"
     ]
    },
    "inline": {
     "local": [
      "cdxs-20221231.htm"
     ]
    },
    "labelLink": {
     "local": [
      "cdxs-20221231_lab.xml"
     ]
    },
    "presentationLink": {
     "local": [
      "cdxs-20221231_pre.xml"
     ]
    },
    "schema": {
     "local": [
      "cdxs-20221231.xsd"
     ],
     "remote": [
      "http://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd",
      "http://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd",
      "http://www.xbrl.org/2003/xl-2003-12-31.xsd",
      "http://www.xbrl.org/2003/xlink-2003-12-31.xsd",
      "http://www.xbrl.org/2005/xbrldt-2005.xsd",
      "http://www.xbrl.org/2006/ref-2006-02-27.xsd",
      "http://www.xbrl.org/lrr/role/negated-2009-12-16.xsd",
      "http://www.xbrl.org/lrr/role/net-2009-12-16.xsd",
      "http://www.xbrl.org/lrr/role/reference-2009-12-16.xsd",
      "https://www.xbrl.org/2020/extensible-enumerations-2.0.xsd",
      "https://www.xbrl.org/dtr/type/2020-01-21/types.xsd",
      "https://xbrl.fasb.org/srt/2022/elts/srt-2022.xsd",
      "https://xbrl.fasb.org/srt/2022/elts/srt-roles-2022.xsd",
      "https://xbrl.fasb.org/srt/2022/elts/srt-types-2022.xsd",
      "https://xbrl.fasb.org/us-gaap/2022/elts/us-gaap-2022.xsd",
      "https://xbrl.fasb.org/us-gaap/2022/elts/us-roles-2022.xsd",
      "https://xbrl.fasb.org/us-gaap/2022/elts/us-types-2022.xsd",
      "https://xbrl.sec.gov/country/2022/country-2022.xsd",
      "https://xbrl.sec.gov/dei/2022/dei-2022.xsd"
     ]
    }
   },
   "elementCount": 752,
   "entityCount": 1,
   "hidden": {
    "http://fasb.org/us-gaap/2022": 13,
    "http://xbrl.sec.gov/dei/2022": 4,
    "total": 17
   },
   "keyCustom": 46,
   "keyStandard": 385,
   "memberCustom": 73,
   "memberStandard": 59,
   "nsprefix": "cdxs",
   "nsuri": "http://www.codexis.com/20221231",
   "report": {
    "R1": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "dei:DocumentType",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "document",
     "isDefault": "true",
     "longName": "0000001 - Document - Cover Page",
     "menuCat": "Cover",
     "order": "1",
     "role": "http://www.codexis.com/role/CoverPage",
     "shortName": "Cover Page",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "dei:DocumentType",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R10": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:DebtAndEquitySecuritiesUnrealizedGainLoss",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "statement",
     "isDefault": "false",
     "longName": "0000010 - Statement - Consolidated Statements of Cash Flows (Parenthetical)",
     "menuCat": "Statements",
     "order": "10",
     "role": "http://www.codexis.com/role/ConsolidatedStatementsofCashFlowsParenthetical",
     "shortName": "Consolidated Statements of Cash Flows (Parenthetical)",
     "subGroupType": "parenthetical",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ic4fd5d752bc146fc98ef8c4a1dc290a8_D20220101-20221231",
      "decimals": "-3",
      "lang": "en-US",
      "name": "us-gaap:DebtAndEquitySecuritiesUnrealizedGainLoss",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R11": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:NatureOfOperations",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000011 - Disclosure - Description of Business",
     "menuCat": "Notes",
     "order": "11",
     "role": "http://www.codexis.com/role/DescriptionofBusiness",
     "shortName": "Description of Business",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:NatureOfOperations",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R12": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:OrganizationConsolidationBasisOfPresentationBusinessDescriptionAndAccountingPoliciesTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000012 - Disclosure - Basis of Presentation and Summary of Significant Accounting Policies",
     "menuCat": "Notes",
     "order": "12",
     "role": "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPolicies",
     "shortName": "Basis of Presentation and Summary of Significant Accounting Policies",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:OrganizationConsolidationBasisOfPresentationBusinessDescriptionAndAccountingPoliciesTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R13": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:RevenueFromContractWithCustomerTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000013 - Disclosure - Revenue Recognition",
     "menuCat": "Notes",
     "order": "13",
     "role": "http://www.codexis.com/role/RevenueRecognition",
     "shortName": "Revenue Recognition",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:RevenueFromContractWithCustomerTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R14": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:EarningsPerShareTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000014 - Disclosure - Net Loss per Share",
     "menuCat": "Notes",
     "order": "14",
     "role": "http://www.codexis.com/role/NetLossperShare",
     "shortName": "Net Loss per Share",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:EarningsPerShareTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R15": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:CollaborativeArrangementDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000015 - Disclosure - Collaborative Arrangements",
     "menuCat": "Notes",
     "order": "15",
     "role": "http://www.codexis.com/role/CollaborativeArrangements",
     "shortName": "Collaborative Arrangements",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:CollaborativeArrangementDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R16": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:InvestmentsInDebtAndEquityInstrumentsCashAndCashEquivalentsUnrealizedAndRealizedGainsLossesTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000016 - Disclosure - Investments in Non-Marketable Securities",
     "menuCat": "Notes",
     "order": "16",
     "role": "http://www.codexis.com/role/InvestmentsinNonMarketableSecurities",
     "shortName": "Investments in Non-Marketable Securities",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:InvestmentsInDebtAndEquityInstrumentsCashAndCashEquivalentsUnrealizedAndRealizedGainsLossesTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R17": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:FairValueMeasurementInputsDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000017 - Disclosure - Fair Value Measurements",
     "menuCat": "Notes",
     "order": "17",
     "role": "http://www.codexis.com/role/FairValueMeasurements",
     "shortName": "Fair Value Measurements",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:FairValueMeasurementInputsDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R18": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:SupplementalBalanceSheetDisclosuresTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000018 - Disclosure - Balance Sheet Details",
     "menuCat": "Notes",
     "order": "18",
     "role": "http://www.codexis.com/role/BalanceSheetDetails",
     "shortName": "Balance Sheet Details",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:SupplementalBalanceSheetDisclosuresTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R19": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:DisclosureOfCompensationRelatedCostsShareBasedPaymentsTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000019 - Disclosure - Stock-based Compensation",
     "menuCat": "Notes",
     "order": "19",
     "role": "http://www.codexis.com/role/StockbasedCompensation",
     "shortName": "Stock-based Compensation",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:DisclosureOfCompensationRelatedCostsShareBasedPaymentsTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R2": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "dei:AuditorName",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "document",
     "isDefault": "false",
     "longName": "0000002 - Document - Audit Information",
     "menuCat": "Cover",
     "order": "2",
     "role": "http://www.codexis.com/role/AuditInformation",
     "shortName": "Audit Information",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "dei:AuditorName",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R20": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:StockholdersEquityNoteDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000020 - Disclosure - Capital Stock",
     "menuCat": "Notes",
     "order": "20",
     "role": "http://www.codexis.com/role/CapitalStock",
     "shortName": "Capital Stock",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:StockholdersEquityNoteDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R21": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:PensionAndOtherPostretirementBenefitsDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000021 - Disclosure - 401(k) Plan",
     "menuCat": "Notes",
     "order": "21",
     "role": "http://www.codexis.com/role/A401kPlan",
     "shortName": "401(k) Plan",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:PensionAndOtherPostretirementBenefitsDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R22": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:IncomeTaxDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000022 - Disclosure - Income Taxes",
     "menuCat": "Notes",
     "order": "22",
     "role": "http://www.codexis.com/role/IncomeTaxes",
     "shortName": "Income Taxes",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:IncomeTaxDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R23": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:CommitmentsAndContingenciesDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000023 - Disclosure - Commitments and Contingencies",
     "menuCat": "Notes",
     "order": "23",
     "role": "http://www.codexis.com/role/CommitmentsandContingencies",
     "shortName": "Commitments and Contingencies",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:CommitmentsAndContingenciesDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R24": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:RelatedPartyTransactionsDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000024 - Disclosure - Related Party Transactions",
     "menuCat": "Notes",
     "order": "24",
     "role": "http://www.codexis.com/role/RelatedPartyTransactions",
     "shortName": "Related Party Transactions",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:RelatedPartyTransactionsDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R25": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:SegmentReportingDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000025 - Disclosure - Segment, Geographical and Other Revenue Information",
     "menuCat": "Notes",
     "order": "25",
     "role": "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformation",
     "shortName": "Segment, Geographical and Other Revenue Information",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:SegmentReportingDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R26": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:CreditLossFinancialInstrumentTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000026 - Disclosure - Allowance for Credit Losses",
     "menuCat": "Notes",
     "order": "26",
     "role": "http://www.codexis.com/role/AllowanceforCreditLosses",
     "shortName": "Allowance for Credit Losses",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:CreditLossFinancialInstrumentTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R27": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:RestructuringAndRelatedActivitiesDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000027 - Disclosure - Restructuring Charges",
     "menuCat": "Notes",
     "order": "27",
     "role": "http://www.codexis.com/role/RestructuringCharges",
     "shortName": "Restructuring Charges",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:RestructuringAndRelatedActivitiesDisclosureTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R28": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:SubsequentEventsTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000028 - Disclosure - Subsequent Events",
     "menuCat": "Notes",
     "order": "28",
     "role": "http://www.codexis.com/role/SubsequentEvents",
     "shortName": "Subsequent Events",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:SubsequentEventsTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R29": {
     "firstAnchor": {
      "ancestors": [
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:BasisOfAccountingPolicyPolicyTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000029 - Disclosure - Basis of Presentation and Summary of Significant Accounting Policies (Policies)",
     "menuCat": "Policies",
     "order": "29",
     "role": "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesPolicies",
     "shortName": "Basis of Presentation and Summary of Significant Accounting Policies (Policies)",
     "subGroupType": "policies",
     "uniqueAnchor": {
      "ancestors": [
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:BasisOfAccountingPolicyPolicyTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R3": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "i5c8666e68c0944c086be2b71ac6a1a53_I20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:CashAndCashEquivalentsAtCarryingValue",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "statement",
     "isDefault": "false",
     "longName": "0000003 - Statement - Consolidated Balance Sheets",
     "menuCat": "Statements",
     "order": "3",
     "role": "http://www.codexis.com/role/ConsolidatedBalanceSheets",
     "shortName": "Consolidated Balance Sheets",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "i5c8666e68c0944c086be2b71ac6a1a53_I20221231",
      "decimals": "-3",
      "lang": "en-US",
      "name": "us-gaap:RestrictedCash",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R30": {
     "firstAnchor": {
      "ancestors": [
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:PropertyPlantAndEquipmentTextBlock",
      "reportCount": 1,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000030 - Disclosure - Basis of Presentation and Summary of Significant Accounting Policies (Tables)",
     "menuCat": "Tables",
     "order": "30",
     "role": "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesTables",
     "shortName": "Basis of Presentation and Summary of Significant Accounting Policies (Tables)",
     "subGroupType": "tables",
     "uniqueAnchor": null
    },
    "R31": {
     "firstAnchor": {
      "ancestors": [
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:DisaggregationOfRevenueTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000031 - Disclosure - Revenue Recognition (Tables)",
     "menuCat": "Tables",
     "order": "31",
     "role": "http://www.codexis.com/role/RevenueRecognitionTables",
     "shortName": "Revenue Recognition (Tables)",
     "subGroupType": "tables",
     "uniqueAnchor": {
      "ancestors": [
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:DisaggregationOfRevenueTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R32": {
     "firstAnchor": {
      "ancestors": [
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000032 - Disclosure - Net Loss per Share (Tables)",
     "menuCat": "Tables",
     "order": "32",
     "role": "http://www.codexis.com/role/NetLossperShareTables",
     "shortName": "Net Loss per Share (Tables)",
     "subGroupType": "tables",
     "uniqueAnchor": {
      "ancestors": [
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R33": {
     "firstAnchor": {
      "ancestors": [
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:EquitySecuritiesWithoutReadilyDeterminableFairValueTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000033 - Disclosure - Investments in Non-Marketable Securities (Tables)",
     "menuCat": "Tables",
     "order": "33",
     "role": "http://www.codexis.com/role/InvestmentsinNonMarketableSecuritiesTables",
     "shortName": "Investments in Non-Marketable Securities (Tables)",
     "subGroupType": "tables",
     "uniqueAnchor": {
      "ancestors": [
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:EquitySecuritiesWithoutReadilyDeterminableFairValueTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R34": {
     "firstAnchor": {
      "ancestors": [
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:FairValueAssetsMeasuredOnRecurringBasisTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000034 - Disclosure - Fair Value Measurements (Tables)",
     "menuCat": "Tables",
     "order": "34",
     "role": "http://www.codexis.com/role/FairValueMeasurementsTables",
     "shortName": "Fair Value Measurements (Tables)",
     "subGroupType": "tables",
     "uniqueAnchor": {
      "ancestors": [
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:FairValueAssetsMeasuredOnRecurringBasisTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R35": {
     "firstAnchor": {
      "ancestors": [
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ScheduleOfCashAndCashEquivalentsTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000035 - Disclosure - Balance Sheet Details (Tables)",
     "menuCat": "Tables",
     "order": "35",
     "role": "http://www.codexis.com/role/BalanceSheetDetailsTables",
     "shortName": "Balance Sheet Details (Tables)",
     "subGroupType": "tables",
     "uniqueAnchor": {
      "ancestors": [
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ScheduleOfCashAndCashEquivalentsTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R36": {
     "firstAnchor": {
      "ancestors": [
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ScheduleOfEmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000036 - Disclosure - Stock-based Compensation (Tables)",
     "menuCat": "Tables",
     "order": "36",
     "role": "http://www.codexis.com/role/StockbasedCompensationTables",
     "shortName": "Stock-based Compensation (Tables)",
     "subGroupType": "tables",
     "uniqueAnchor": {
      "ancestors": [
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ScheduleOfEmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R37": {
     "firstAnchor": {
      "ancestors": [
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ScheduleOfIncomeBeforeIncomeTaxDomesticAndForeignTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000037 - Disclosure - Income Taxes (Tables)",
     "menuCat": "Tables",
     "order": "37",
     "role": "http://www.codexis.com/role/IncomeTaxesTables",
     "shortName": "Income Taxes (Tables)",
     "subGroupType": "tables",
     "uniqueAnchor": {
      "ancestors": [
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ScheduleOfIncomeBeforeIncomeTaxDomesticAndForeignTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R38": {
     "firstAnchor": {
      "ancestors": [
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:LeaseCostTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000038 - Disclosure - Commitments and Contingencies (Tables)",
     "menuCat": "Tables",
     "order": "38",
     "role": "http://www.codexis.com/role/CommitmentsandContingenciesTables",
     "shortName": "Commitments and Contingencies (Tables)",
     "subGroupType": "tables",
     "uniqueAnchor": {
      "ancestors": [
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:LeaseCostTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R39": {
     "firstAnchor": {
      "ancestors": [
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ScheduleOfSegmentReportingInformationBySegmentTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000039 - Disclosure - Segment, Geographical and Other Revenue Information (Tables)",
     "menuCat": "Tables",
     "order": "39",
     "role": "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationTables",
     "shortName": "Segment, Geographical and Other Revenue Information (Tables)",
     "subGroupType": "tables",
     "uniqueAnchor": {
      "ancestors": [
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ScheduleOfSegmentReportingInformationBySegmentTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R4": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "i5c8666e68c0944c086be2b71ac6a1a53_I20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:InvestmentsAndOtherNoncurrentAssets",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "statement",
     "isDefault": "false",
     "longName": "0000004 - Statement - Consolidated Balance Sheets (Parenthetical)",
     "menuCat": "Statements",
     "order": "4",
     "role": "http://www.codexis.com/role/ConsolidatedBalanceSheetsParenthetical",
     "shortName": "Consolidated Balance Sheets (Parenthetical)",
     "subGroupType": "parenthetical",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "i5c8666e68c0944c086be2b71ac6a1a53_I20221231",
      "decimals": "INF",
      "lang": "en-US",
      "name": "us-gaap:PreferredStockParOrStatedValuePerShare",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usdPerShare",
      "xsiNil": "false"
     }
    },
    "R40": {
     "firstAnchor": {
      "ancestors": [
       "div",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:AllowanceForCreditLossesOnFinancingReceivablesTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000040 - Disclosure - Allowance for Credit Losses (Tables)",
     "menuCat": "Tables",
     "order": "40",
     "role": "http://www.codexis.com/role/AllowanceforCreditLossesTables",
     "shortName": "Allowance for Credit Losses (Tables)",
     "subGroupType": "tables",
     "uniqueAnchor": {
      "ancestors": [
       "div",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:AllowanceForCreditLossesOnFinancingReceivablesTableTextBlock",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R41": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": "INF",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:NumberOfReportableSegments",
      "reportCount": 1,
      "unitRef": "segment",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000041 - Disclosure - Description of Business (Details)",
     "menuCat": "Details",
     "order": "41",
     "role": "http://www.codexis.com/role/DescriptionofBusinessDetails",
     "shortName": "Description of Business (Details)",
     "subGroupType": "details",
     "uniqueAnchor": null
    },
    "R42": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "us-gaap:SegmentReportingPolicyPolicyTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": "INF",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:NumberOfOperatingSegments",
      "reportCount": 1,
      "unitRef": "segment",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000042 - Disclosure - Basis of Presentation and Summary of Significant Accounting Policies - Narrative (Details)",
     "menuCat": "Details",
     "order": "42",
     "role": "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesNarrativeDetails",
     "shortName": "Basis of Presentation and Summary of Significant Accounting Policies - Narrative (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "ix:continuation",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": "-5",
      "lang": "en-US",
      "name": "cdxs:ShippingAndDistributionCost",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R43": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "us-gaap:PropertyPlantAndEquipmentTextBlock",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "i369833d2a55345d885c0e3fcaa3ea307_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:PropertyPlantAndEquipmentUsefulLife",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000043 - Disclosure - Basis of Presentation and Summary of Significant Accounting Policies - Property, Plant, and Equipment (Details)",
     "menuCat": "Details",
     "order": "43",
     "role": "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesPropertyPlantandEquipmentDetails",
     "shortName": "Basis of Presentation and Summary of Significant Accounting Policies - Property, Plant, and Equipment (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "us-gaap:PropertyPlantAndEquipmentTextBlock",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "i369833d2a55345d885c0e3fcaa3ea307_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:PropertyPlantAndEquipmentUsefulLife",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R44": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "us-gaap:DisaggregationOfRevenueTableTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:RevenueFromContractWithCustomerExcludingAssessedTax",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000044 - Disclosure - Revenue Recognition - Disaggregation of Revenue (Details)",
     "menuCat": "Details",
     "order": "44",
     "role": "http://www.codexis.com/role/RevenueRecognitionDisaggregationofRevenueDetails",
     "shortName": "Revenue Recognition - Disaggregation of Revenue (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "us-gaap:DisaggregationOfRevenueTableTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "if1a105bde8044911bf016c75c96b7a0b_D20220101-20221231",
      "decimals": "-3",
      "lang": "en-US",
      "name": "us-gaap:RevenueFromContractWithCustomerExcludingAssessedTax",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R45": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "ix:continuation",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "i5c8666e68c0944c086be2b71ac6a1a53_I20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ContractWithCustomerAssetGrossCurrent",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000045 - Disclosure - Revenue Recognition - Contracts with Customer (Details)",
     "menuCat": "Details",
     "order": "45",
     "role": "http://www.codexis.com/role/RevenueRecognitionContractswithCustomerDetails",
     "shortName": "Revenue Recognition - Contracts with Customer (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "ix:continuation",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "i5c8666e68c0944c086be2b71ac6a1a53_I20221231",
      "decimals": "-3",
      "lang": "en-US",
      "name": "us-gaap:CapitalizedContractCostNetCurrent",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R46": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": "INF",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ContractWithCustomerAssetCreditLossExpense",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000046 - Disclosure - Revenue Recognition - Narrative (Details)",
     "menuCat": "Details",
     "order": "46",
     "role": "http://www.codexis.com/role/RevenueRecognitionNarrativeDetails",
     "shortName": "Revenue Recognition - Narrative (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": "INF",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ContractWithCustomerAssetCreditLossExpense",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R47": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "us-gaap:ContractWithCustomerAssetAndLiabilityTableTextBlock",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ContractWithCustomerPerformanceObligationSatisfiedInPreviousPeriod",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000047 - Disclosure - Revenue Recognition - Revenue Recognized (Details)",
     "menuCat": "Details",
     "order": "47",
     "role": "http://www.codexis.com/role/RevenueRecognitionRevenueRecognizedDetails",
     "shortName": "Revenue Recognition - Revenue Recognized (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "us-gaap:ContractWithCustomerAssetAndLiabilityTableTextBlock",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ContractWithCustomerPerformanceObligationSatisfiedInPreviousPeriod",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R48": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "us-gaap:RevenueRemainingPerformanceObligationExpectedTimingOfSatisfactionTableTextBlock",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "i5c8666e68c0944c086be2b71ac6a1a53_I20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:RevenueRemainingPerformanceObligation",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000048 - Disclosure - Revenue Recognition - Performance Obligation (Details)",
     "menuCat": "Details",
     "order": "48",
     "role": "http://www.codexis.com/role/RevenueRecognitionPerformanceObligationDetails",
     "shortName": "Revenue Recognition - Performance Obligation (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "us-gaap:RevenueRemainingPerformanceObligationExpectedTimingOfSatisfactionTableTextBlock",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "i5c8666e68c0944c086be2b71ac6a1a53_I20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:RevenueRemainingPerformanceObligation",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R49": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "us-gaap:ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTextBlock",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "i9dc62422846740b49b1b71c23362d321_D20220101-20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount",
      "reportCount": 1,
      "unique": true,
      "unitRef": "shares",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000049 - Disclosure - Net Loss per Share (Details)",
     "menuCat": "Details",
     "order": "49",
     "role": "http://www.codexis.com/role/NetLossperShareDetails",
     "shortName": "Net Loss per Share (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "us-gaap:ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTextBlock",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "i9dc62422846740b49b1b71c23362d321_D20220101-20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount",
      "reportCount": 1,
      "unique": true,
      "unitRef": "shares",
      "xsiNil": "false"
     }
    },
    "R5": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "us-gaap:DisaggregationOfRevenueTableTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:RevenueFromContractWithCustomerExcludingAssessedTax",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "statement",
     "isDefault": "false",
     "longName": "0000005 - Statement - Consolidated Statements of Operations",
     "menuCat": "Statements",
     "order": "5",
     "role": "http://www.codexis.com/role/ConsolidatedStatementsofOperations",
     "shortName": "Consolidated Statements of Operations",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": "-3",
      "lang": "en-US",
      "name": "us-gaap:InvestmentIncomeInterest",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R50": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ContractWithCustomerLiabilityRevenueRecognized",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000050 - Disclosure - Collaborative Arrangements - GSK Platform Technology Transfer, Collaboration and License Agreement (Details)",
     "menuCat": "Details",
     "order": "50",
     "role": "http://www.codexis.com/role/CollaborativeArrangementsGSKPlatformTechnologyTransferCollaborationandLicenseAgreementDetails",
     "shortName": "Collaborative Arrangements - GSK Platform Technology Transfer, Collaboration and License Agreement (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ie537039994394a6f86134adb0f2f7159_D20190101-20191231",
      "decimals": "-5",
      "lang": "en-US",
      "name": "us-gaap:ContractWithCustomerLiabilityRevenueRecognized",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R51": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ContractWithCustomerLiabilityRevenueRecognized",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000051 - Disclosure - Collaborative Arrangements - Merck Platform Technology Transfer and License Agreement (Details)",
     "menuCat": "Details",
     "order": "51",
     "role": "http://www.codexis.com/role/CollaborativeArrangementsMerckPlatformTechnologyTransferandLicenseAgreementDetails",
     "shortName": "Collaborative Arrangements - Merck Platform Technology Transfer and License Agreement (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "i171285aad32b4155ba1f8ad4fa576510_D20220101-20221231",
      "decimals": "-4",
      "lang": "en-US",
      "name": "us-gaap:ContractWithCustomerLiabilityRevenueRecognized",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R52": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ContractWithCustomerLiabilityRevenueRecognized",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000052 - Disclosure - Collaborative Arrangements - Merck Sitagliptin Catalyst Supply Agreement (Details)",
     "menuCat": "Details",
     "order": "52",
     "role": "http://www.codexis.com/role/CollaborativeArrangementsMerckSitagliptinCatalystSupplyAgreementDetails",
     "shortName": "Collaborative Arrangements - Merck Sitagliptin Catalyst Supply Agreement (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ifb6544bb658841a18c29804ba672af1b_D20220101-20221231",
      "decimals": "2",
      "lang": "en-US",
      "name": "us-gaap:ConcentrationRiskPercentage1",
      "reportCount": 1,
      "unique": true,
      "unitRef": "number",
      "xsiNil": "false"
     }
    },
    "R53": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "ix:continuation",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "i5c8666e68c0944c086be2b71ac6a1a53_I20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ContractWithCustomerLiability",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000053 - Disclosure - Collaborative Arrangements - Enzyme Supply Agreement (Details)",
     "menuCat": "Details",
     "order": "53",
     "role": "http://www.codexis.com/role/CollaborativeArrangementsEnzymeSupplyAgreementDetails",
     "shortName": "Collaborative Arrangements - Enzyme Supply Agreement (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "i9a970c80004d4be0aa7d899f801390fc_I20221231",
      "decimals": "-5",
      "lang": "en-US",
      "name": "us-gaap:ContractWithCustomerLiability",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R54": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia7202b949e484de0bc6781ae59ed687d_I20201130",
      "decimals": "-5",
      "first": true,
      "lang": "en-US",
      "name": "cdxs:RevenueRecognitionContingentReceivable",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000054 - Disclosure - Collaborative Arrangements - Tate & Lyle (Details)",
     "menuCat": "Details",
     "order": "54",
     "role": "http://www.codexis.com/role/CollaborativeArrangementsTateLyleDetails",
     "shortName": "Collaborative Arrangements - Tate & Lyle (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia7202b949e484de0bc6781ae59ed687d_I20201130",
      "decimals": "-5",
      "first": true,
      "lang": "en-US",
      "name": "cdxs:RevenueRecognitionContingentReceivable",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R55": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "us-gaap:DisaggregationOfRevenueTableTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:RevenueFromContractWithCustomerExcludingAssessedTax",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000055 - Disclosure - Collaborative Arrangements - Nestle Global Development Agreement (Details)",
     "menuCat": "Details",
     "order": "55",
     "role": "http://www.codexis.com/role/CollaborativeArrangementsNestleGlobalDevelopmentAgreementDetails",
     "shortName": "Collaborative Arrangements - Nestle Global Development Agreement (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "i9b4975feb0a64077af492df48d06a473_D20220101-20221231",
      "decimals": "-5",
      "lang": "en-US",
      "name": "us-gaap:RevenueFromContractWithCustomerExcludingAssessedTax",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R56": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "ix:continuation",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "i5c8666e68c0944c086be2b71ac6a1a53_I20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ContractWithCustomerLiability",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000056 - Disclosure - Collaborative Arrangements - Porton (Details)",
     "menuCat": "Details",
     "order": "56",
     "role": "http://www.codexis.com/role/CollaborativeArrangementsPortonDetails",
     "shortName": "Collaborative Arrangements - Porton (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "i663f2b98f7b142d9951b539917b505d0_D20220101-20221231",
      "decimals": "-5",
      "lang": "en-US",
      "name": "us-gaap:ProceedsFromCollaborators",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R57": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "ix:continuation",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "i5c8666e68c0944c086be2b71ac6a1a53_I20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ContractWithCustomerLiability",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000057 - Disclosure - Collaborative Arrangements - Novartis (Details)",
     "menuCat": "Details",
     "order": "57",
     "role": "http://www.codexis.com/role/CollaborativeArrangementsNovartisDetails",
     "shortName": "Collaborative Arrangements - Novartis (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ic4c5c845b45f4e0b8d1d6fd733abe4ce_I20190531",
      "decimals": "-5",
      "lang": "en-US",
      "name": "us-gaap:ContractWithCustomerLiability",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R58": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "ix:continuation",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "i5c8666e68c0944c086be2b71ac6a1a53_I20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ContractWithCustomerLiability",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000058 - Disclosure - Collaborative Arrangements - Roche (Details)",
     "menuCat": "Details",
     "order": "58",
     "role": "http://www.codexis.com/role/CollaborativeArrangementsRocheDetails",
     "shortName": "Collaborative Arrangements - Roche (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "i24e9c7f3f2674a3aacf148c90e6be35d_D20220101-20221231",
      "decimals": "-5",
      "lang": "en-US",
      "name": "us-gaap:ContractWithCustomerLiabilityRevenueRecognized",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R59": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "ix:continuation",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "i5c8666e68c0944c086be2b71ac6a1a53_I20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ContractWithCustomerLiability",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000059 - Disclosure - Collaborative Arrangements - Takeda (Details)",
     "menuCat": "Details",
     "order": "59",
     "role": "http://www.codexis.com/role/CollaborativeArrangementsTakedaDetails",
     "shortName": "Collaborative Arrangements - Takeda (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "if9c9f6e481934c2b81bf147976fae0ff_I20221231",
      "decimals": "-5",
      "lang": "en-US",
      "name": "us-gaap:ContractWithCustomerLiability",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R6": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:OtherNonoperatingIncomeExpense",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "statement",
     "isDefault": "false",
     "longName": "0000006 - Statement - Consolidated Statements of Operations (Parenthetical)",
     "menuCat": "Statements",
     "order": "6",
     "role": "http://www.codexis.com/role/ConsolidatedStatementsofOperationsParenthetical",
     "shortName": "Consolidated Statements of Operations (Parenthetical)",
     "subGroupType": "parenthetical",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "td",
       "tr",
       "table",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ic4fd5d752bc146fc98ef8c4a1dc290a8_D20220101-20221231",
      "decimals": "-3",
      "lang": "en-US",
      "name": "us-gaap:OtherNonoperatingIncomeExpense",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R60": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:PaymentsToAcquireOtherInvestments",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000060 - Disclosure - Collaborative Arrangements - Molecular Associates Inc (Details)",
     "menuCat": "Details",
     "order": "60",
     "role": "http://www.codexis.com/role/CollaborativeArrangementsMolecularAssociatesIncDetails",
     "shortName": "Collaborative Arrangements - Molecular Associates Inc (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "iaed5f535774d40e0a6b6c37fa6678836_D20200601-20200630",
      "decimals": "INF",
      "lang": "en-US",
      "name": "cdxs:ContractWithCustomerSalesMilestone",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R61": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ContractWithCustomerLiabilityRevenueRecognized",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000061 - Disclosure - Collaborative Arrangements - Pfizer Enzyme Supply Agreement (Details)",
     "menuCat": "Details",
     "order": "61",
     "role": "http://www.codexis.com/role/CollaborativeArrangementsPfizerEnzymeSupplyAgreementDetails",
     "shortName": "Collaborative Arrangements - Pfizer Enzyme Supply Agreement (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "i8c98788b539e446aace473bef91d14cd_I20220831",
      "decimals": "-5",
      "lang": "en-US",
      "name": "cdxs:ContractWithCustomerLiabilityRetainerFee",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R62": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "i5c8666e68c0944c086be2b71ac6a1a53_I20221231",
      "decimals": "INF",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:AvailableForSaleSecuritiesDebtSecurities",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000062 - Disclosure - Investments in Non-Marketable Securities - Narrative (Details)",
     "menuCat": "Details",
     "order": "62",
     "role": "http://www.codexis.com/role/InvestmentsinNonMarketableSecuritiesNarrativeDetails",
     "shortName": "Investments in Non-Marketable Securities - Narrative (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "i5c8666e68c0944c086be2b71ac6a1a53_I20221231",
      "decimals": "INF",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:AvailableForSaleSecuritiesDebtSecurities",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R63": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "us-gaap:EquitySecuritiesWithoutReadilyDeterminableFairValueTableTextBlock",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "i993c1c7de5304fc197a3d77c11c417d0_I20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:EquitySecuritiesWithoutReadilyDeterminableFairValueAmount",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000063 - Disclosure - Investments in Non-Marketable Securities - Carrying Value and Fair Value of Securities (Details)",
     "menuCat": "Details",
     "order": "63",
     "role": "http://www.codexis.com/role/InvestmentsinNonMarketableSecuritiesCarryingValueandFairValueofSecuritiesDetails",
     "shortName": "Investments in Non-Marketable Securities - Carrying Value and Fair Value of Securities (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "us-gaap:EquitySecuritiesWithoutReadilyDeterminableFairValueTableTextBlock",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "i993c1c7de5304fc197a3d77c11c417d0_I20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:EquitySecuritiesWithoutReadilyDeterminableFairValueAmount",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R64": {
     "firstAnchor": {
      "ancestors": [
       "us-gaap:DebtSecuritiesAvailableForSaleAllowanceForCreditLossWriteoff",
       "ix:continuation",
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "i02ec92d2616149b891ca58ee671d2d91_D20220101-20221231",
      "decimals": "INF",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:DebtSecuritiesAvailableForSaleAllowanceForCreditLossWriteoff",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000064 - Disclosure - Fair Value Measurements (Details)",
     "menuCat": "Details",
     "order": "64",
     "role": "http://www.codexis.com/role/FairValueMeasurementsDetails",
     "shortName": "Fair Value Measurements (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "us-gaap:DebtSecuritiesAvailableForSaleAllowanceForCreditLossWriteoff",
       "ix:continuation",
       "span",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "i02ec92d2616149b891ca58ee671d2d91_D20220101-20221231",
      "decimals": "INF",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:DebtSecuritiesAvailableForSaleAllowanceForCreditLossWriteoff",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R65": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "i5c8666e68c0944c086be2b71ac6a1a53_I20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:CashAndCashEquivalentsAtCarryingValue",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000065 - Disclosure - Balance Sheet Details - Cash and Cash Equivalents (Details)",
     "menuCat": "Details",
     "order": "65",
     "role": "http://www.codexis.com/role/BalanceSheetDetailsCashandCashEquivalentsDetails",
     "shortName": "Balance Sheet Details - Cash and Cash Equivalents (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "i5c8666e68c0944c086be2b71ac6a1a53_I20221231",
      "decimals": "-5",
      "lang": "en-US",
      "name": "us-gaap:MoneyMarketFundsAtCarryingValue",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R66": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "us-gaap:ScheduleOfInventoryCurrentTableTextBlock",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "i5c8666e68c0944c086be2b71ac6a1a53_I20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:InventoryRawMaterials",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000066 - Disclosure - Balance Sheet Details - Schedule of Inventory Components (Details)",
     "menuCat": "Details",
     "order": "66",
     "role": "http://www.codexis.com/role/BalanceSheetDetailsScheduleofInventoryComponentsDetails",
     "shortName": "Balance Sheet Details - Schedule of Inventory Components (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "us-gaap:ScheduleOfInventoryCurrentTableTextBlock",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "i5c8666e68c0944c086be2b71ac6a1a53_I20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:InventoryRawMaterials",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R67": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "ix:continuation",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "i5c8666e68c0944c086be2b71ac6a1a53_I20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:PropertyPlantAndEquipmentGross",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000067 - Disclosure - Balance Sheet Details - Property and Equipment, net (Details)",
     "menuCat": "Details",
     "order": "67",
     "role": "http://www.codexis.com/role/BalanceSheetDetailsPropertyandEquipmentnetDetails",
     "shortName": "Balance Sheet Details - Property and Equipment, net (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "ix:continuation",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "i5c8666e68c0944c086be2b71ac6a1a53_I20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:PropertyPlantAndEquipmentGross",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R68": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "i5c8666e68c0944c086be2b71ac6a1a53_I20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:Goodwill",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000068 - Disclosure - Balance Sheet Details - Goodwill (Details)",
     "menuCat": "Details",
     "order": "68",
     "role": "http://www.codexis.com/role/BalanceSheetDetailsGoodwillDetails",
     "shortName": "Balance Sheet Details - Goodwill (Details)",
     "subGroupType": "details",
     "uniqueAnchor": null
    },
    "R69": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "us-gaap:ScheduleOfAccruedLiabilitiesTableTextBlock",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "i5c8666e68c0944c086be2b71ac6a1a53_I20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "cdxs:AccruedPurchaseReceivedNotYetBilled",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000069 - Disclosure - Balance Sheet Details - Other Accrued Liabilities (Details)",
     "menuCat": "Details",
     "order": "69",
     "role": "http://www.codexis.com/role/BalanceSheetDetailsOtherAccruedLiabilitiesDetails",
     "shortName": "Balance Sheet Details - Other Accrued Liabilities (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "us-gaap:ScheduleOfAccruedLiabilitiesTableTextBlock",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "i5c8666e68c0944c086be2b71ac6a1a53_I20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "cdxs:AccruedPurchaseReceivedNotYetBilled",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R7": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ie9906d2046d24936975605966681171c_I20191231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:SharesOutstanding",
      "reportCount": 1,
      "unique": true,
      "unitRef": "shares",
      "xsiNil": "false"
     },
     "groupType": "statement",
     "isDefault": "false",
     "longName": "0000007 - Statement - Consolidated Statements of Stockholders' Equity",
     "menuCat": "Statements",
     "order": "7",
     "role": "http://www.codexis.com/role/ConsolidatedStatementsofStockholdersEquity",
     "shortName": "Consolidated Statements of Stockholders' Equity",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ie9906d2046d24936975605966681171c_I20191231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:SharesOutstanding",
      "reportCount": 1,
      "unique": true,
      "unitRef": "shares",
      "xsiNil": "false"
     }
    },
    "R70": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": "-5",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:AllocatedShareBasedCompensationExpense",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000070 - Disclosure - Stock-based Compensation - Narrative (Details)",
     "menuCat": "Details",
     "order": "70",
     "role": "http://www.codexis.com/role/StockbasedCompensationNarrativeDetails",
     "shortName": "Stock-based Compensation - Narrative (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": "-5",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:AllocatedShareBasedCompensationExpense",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R71": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "us-gaap:ScheduleOfEmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ShareBasedCompensation",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000071 - Disclosure - Stock-based Compensation - Stock-Based Compensation Expense (Details)",
     "menuCat": "Details",
     "order": "71",
     "role": "http://www.codexis.com/role/StockbasedCompensationStockBasedCompensationExpenseDetails",
     "shortName": "Stock-based Compensation - Stock-Based Compensation Expense (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "us-gaap:ScheduleOfEmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "if97c10b2f64e4b468dcc7321fa6d1a7a_D20220101-20221231",
      "decimals": "-3",
      "lang": "en-US",
      "name": "us-gaap:ShareBasedCompensation",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R72": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "ix:continuation",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "if97c10b2f64e4b468dcc7321fa6d1a7a_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:SharebasedCompensationArrangementBySharebasedPaymentAwardFairValueAssumptionsExpectedTerm1",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000072 - Disclosure - Stock-based Compensation - Assumptions Used (Details)",
     "menuCat": "Details",
     "order": "72",
     "role": "http://www.codexis.com/role/StockbasedCompensationAssumptionsUsedDetails",
     "shortName": "Stock-based Compensation - Assumptions Used (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "ix:continuation",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "if97c10b2f64e4b468dcc7321fa6d1a7a_D20220101-20221231",
      "decimals": null,
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:SharebasedCompensationArrangementBySharebasedPaymentAwardFairValueAssumptionsExpectedTerm1",
      "reportCount": 1,
      "unique": true,
      "unitRef": null,
      "xsiNil": "false"
     }
    },
    "R73": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "us-gaap:ScheduleOfShareBasedCompensationStockOptionsActivityTableTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "id079c9d65ff642e5a59c04fdb15b0095_I20211231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingNumber",
      "reportCount": 1,
      "unitRef": "shares",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000073 - Disclosure - Stock-based Compensation - Option Activity (Details)",
     "menuCat": "Details",
     "order": "73",
     "role": "http://www.codexis.com/role/StockbasedCompensationOptionActivityDetails",
     "shortName": "Stock-based Compensation - Option Activity (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "us-gaap:ScheduleOfShareBasedCompensationStockOptionsActivityTableTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "iad89f73b7a964bbfa69d9866f7fc05ed_I20191231",
      "decimals": "-3",
      "lang": "en-US",
      "name": "us-gaap:ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingNumber",
      "reportCount": 1,
      "unique": true,
      "unitRef": "shares",
      "xsiNil": "false"
     }
    },
    "R74": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "us-gaap:ScheduleOfShareBasedCompensationStockOptionsActivityTableTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "i5c8666e68c0944c086be2b71ac6a1a53_I20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisableNumber",
      "reportCount": 1,
      "unitRef": "shares",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000074 - Disclosure - Stock-based Compensation - Award Activity (Details)",
     "menuCat": "Details",
     "order": "74",
     "role": "http://www.codexis.com/role/StockbasedCompensationAwardActivityDetails",
     "shortName": "Stock-based Compensation - Award Activity (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "us-gaap:ScheduleOfShareBasedCompensationRestrictedStockUnitsAwardActivityTableTextBlock",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "i4295dba8eda84d788fbbb659bc9ce58f_I20191231",
      "decimals": "-3",
      "lang": "en-US",
      "name": "us-gaap:ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber",
      "reportCount": 1,
      "unique": true,
      "unitRef": "shares",
      "xsiNil": "false"
     }
    },
    "R75": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "i8b92380c5da74f9fbd6f1c346a57b330_I20201231",
      "decimals": "INF",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:CommonStockParOrStatedValuePerShare",
      "reportCount": 1,
      "unitRef": "usdPerShare",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000075 - Disclosure - Capital Stock (Details)",
     "menuCat": "Details",
     "order": "75",
     "role": "http://www.codexis.com/role/CapitalStockDetails",
     "shortName": "Capital Stock (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "i7bf3cb28cf1148188e548de31e74476b_D20201201-20201231",
      "decimals": "-5",
      "lang": "en-US",
      "name": "us-gaap:SaleOfStockConsiderationReceivedOnTransaction",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R76": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": "-5",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:DefinedContributionPlanCostRecognized",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000076 - Disclosure - 401(k) Plan (Details)",
     "menuCat": "Details",
     "order": "76",
     "role": "http://www.codexis.com/role/A401kPlanDetails",
     "shortName": "401(k) Plan (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": "-5",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:DefinedContributionPlanCostRecognized",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R77": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "us-gaap:ScheduleOfIncomeBeforeIncomeTaxDomesticAndForeignTableTextBlock",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:IncomeLossFromContinuingOperationsBeforeIncomeTaxesDomestic",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000077 - Disclosure - Income Taxes - Components of Loss Before Provision for Income Taxes (Details)",
     "menuCat": "Details",
     "order": "77",
     "role": "http://www.codexis.com/role/IncomeTaxesComponentsofLossBeforeProvisionforIncomeTaxesDetails",
     "shortName": "Income Taxes - Components of Loss Before Provision for Income Taxes (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "us-gaap:ScheduleOfIncomeBeforeIncomeTaxDomesticAndForeignTableTextBlock",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:IncomeLossFromContinuingOperationsBeforeIncomeTaxesDomestic",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R78": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "ix:continuation",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:CurrentStateAndLocalTaxExpenseBenefit",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000078 - Disclosure - Income Taxes - Components of Provision for Income Taxes (Details)",
     "menuCat": "Details",
     "order": "78",
     "role": "http://www.codexis.com/role/IncomeTaxesComponentsofProvisionforIncomeTaxesDetails",
     "shortName": "Income Taxes - Components of Provision for Income Taxes (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "ix:continuation",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:CurrentStateAndLocalTaxExpenseBenefit",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R79": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "us-gaap:ScheduleOfEffectiveIncomeTaxRateReconciliationTableTextBlock",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:IncomeTaxReconciliationIncomeTaxExpenseBenefitAtFederalStatutoryIncomeTaxRate",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000079 - Disclosure - Income Taxes - Tax Rate Reconciliation (Details)",
     "menuCat": "Details",
     "order": "79",
     "role": "http://www.codexis.com/role/IncomeTaxesTaxRateReconciliationDetails",
     "shortName": "Income Taxes - Tax Rate Reconciliation (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "us-gaap:ScheduleOfEffectiveIncomeTaxRateReconciliationTableTextBlock",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:IncomeTaxReconciliationIncomeTaxExpenseBenefitAtFederalStatutoryIncomeTaxRate",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R8": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:PaymentsOfStockIssuanceCosts",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "statement",
     "isDefault": "false",
     "longName": "0000008 - Statement - Consolidated Statements of Stockholders' Equity (Parenthetical)",
     "menuCat": "Statements",
     "order": "8",
     "role": "http://www.codexis.com/role/ConsolidatedStatementsofStockholdersEquityParenthetical",
     "shortName": "Consolidated Statements of Stockholders' Equity (Parenthetical)",
     "subGroupType": "parenthetical",
     "uniqueAnchor": null
    },
    "R80": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "us-gaap:ScheduleOfDeferredTaxAssetsAndLiabilitiesTableTextBlock",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "i5c8666e68c0944c086be2b71ac6a1a53_I20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:DeferredTaxAssetsOperatingLossCarryforwards",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000080 - Disclosure - Income Taxes - Components of Deferred Tax Assets and Liabilities (Details)",
     "menuCat": "Details",
     "order": "80",
     "role": "http://www.codexis.com/role/IncomeTaxesComponentsofDeferredTaxAssetsandLiabilitiesDetails",
     "shortName": "Income Taxes - Components of Deferred Tax Assets and Liabilities (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "us-gaap:ScheduleOfDeferredTaxAssetsAndLiabilitiesTableTextBlock",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "i5c8666e68c0944c086be2b71ac6a1a53_I20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:DeferredTaxAssetsOperatingLossCarryforwards",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R81": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": "-5",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ValuationAllowanceDeferredTaxAssetChangeInAmount",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000081 - Disclosure - Income Taxes - Narrative (Details)",
     "menuCat": "Details",
     "order": "81",
     "role": "http://www.codexis.com/role/IncomeTaxesNarrativeDetails",
     "shortName": "Income Taxes - Narrative (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": "-5",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ValuationAllowanceDeferredTaxAssetChangeInAmount",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R82": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "us-gaap:SummaryOfOperatingLossCarryforwardsTextBlock",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "i745a54ac71e3472280c07bdd608153f8_I20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:OperatingLossCarryforwards",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000082 - Disclosure - Income Taxes - NOL Carryforwards and Federal Research and Development Tax Credits (Details)",
     "menuCat": "Details",
     "order": "82",
     "role": "http://www.codexis.com/role/IncomeTaxesNOLCarryforwardsandFederalResearchandDevelopmentTaxCreditsDetails",
     "shortName": "Income Taxes - NOL Carryforwards and Federal Research and Development Tax Credits (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "us-gaap:SummaryOfOperatingLossCarryforwardsTextBlock",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "i745a54ac71e3472280c07bdd608153f8_I20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:OperatingLossCarryforwards",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R83": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "ix:continuation",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "id079c9d65ff642e5a59c04fdb15b0095_I20211231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:UnrecognizedTaxBenefits",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000083 - Disclosure - Income Taxes - Reconciliation of Unrecognized Tax Benefits (Details)",
     "menuCat": "Details",
     "order": "83",
     "role": "http://www.codexis.com/role/IncomeTaxesReconciliationofUnrecognizedTaxBenefitsDetails",
     "shortName": "Income Taxes - Reconciliation of Unrecognized Tax Benefits (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "ix:continuation",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "iad89f73b7a964bbfa69d9866f7fc05ed_I20191231",
      "decimals": "-3",
      "lang": "en-US",
      "name": "us-gaap:UnrecognizedTaxBenefits",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R84": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "i5c8666e68c0944c086be2b71ac6a1a53_I20221231",
      "decimals": "-2",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:AreaOfRealEstateProperty",
      "reportCount": 1,
      "unique": true,
      "unitRef": "sqft",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000084 - Disclosure - Commitments and Contingencies - Narrative (Details)",
     "menuCat": "Details",
     "order": "84",
     "role": "http://www.codexis.com/role/CommitmentsandContingenciesNarrativeDetails",
     "shortName": "Commitments and Contingencies - Narrative (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "i5c8666e68c0944c086be2b71ac6a1a53_I20221231",
      "decimals": "-2",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:AreaOfRealEstateProperty",
      "reportCount": 1,
      "unique": true,
      "unitRef": "sqft",
      "xsiNil": "false"
     }
    },
    "R85": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "us-gaap:LeaseCostTableTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:FinanceLeaseRightOfUseAssetAmortization",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000085 - Disclosure - Commitments and Contingencies - Lease Costs (Details)",
     "menuCat": "Details",
     "order": "85",
     "role": "http://www.codexis.com/role/CommitmentsandContingenciesLeaseCostsDetails",
     "shortName": "Commitments and Contingencies - Lease Costs (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "us-gaap:LeaseCostTableTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:FinanceLeaseRightOfUseAssetAmortization",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R86": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "us-gaap:LeaseCostTableTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:OperatingLeasePayments",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000086 - Disclosure - Commitments and Contingencies - Other Lease Information (Details)",
     "menuCat": "Details",
     "order": "86",
     "role": "http://www.codexis.com/role/CommitmentsandContingenciesOtherLeaseInformationDetails",
     "shortName": "Commitments and Contingencies - Other Lease Information (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "us-gaap:LeaseCostTableTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:OperatingLeasePayments",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R87": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "us-gaap:LesseeOperatingLeaseLiabilityMaturityTableTextBlock",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "i5c8666e68c0944c086be2b71ac6a1a53_I20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000087 - Disclosure - Commitments and Contingencies - Maturity Analysis of Operating Lease (Details)",
     "menuCat": "Details",
     "order": "87",
     "role": "http://www.codexis.com/role/CommitmentsandContingenciesMaturityAnalysisofOperatingLeaseDetails",
     "shortName": "Commitments and Contingencies - Maturity Analysis of Operating Lease (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "us-gaap:LesseeOperatingLeaseLiabilityMaturityTableTextBlock",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "i5c8666e68c0944c086be2b71ac6a1a53_I20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R88": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "us-gaap:SupplyCommitmentTableTextBlock",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "i5c8666e68c0944c086be2b71ac6a1a53_I20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:OtherCommitment",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000088 - Disclosure - Commitments and Contingencies - Other Commitments (Details)",
     "menuCat": "Details",
     "order": "88",
     "role": "http://www.codexis.com/role/CommitmentsandContingenciesOtherCommitmentsDetails",
     "shortName": "Commitments and Contingencies - Other Commitments (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "us-gaap:SupplyCommitmentTableTextBlock",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "i5c8666e68c0944c086be2b71ac6a1a53_I20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:OtherCommitment",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R89": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:PaymentsToAcquireOtherInvestments",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000089 - Disclosure - Related Party Transactions (Details)",
     "menuCat": "Details",
     "order": "89",
     "role": "http://www.codexis.com/role/RelatedPartyTransactionsDetails",
     "shortName": "Related Party Transactions (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "i9bcae51bee8d4491a5f53c0a35ae506e_D20220101-20221231",
      "decimals": "INF",
      "lang": "en-US",
      "name": "us-gaap:NoncashOrPartNoncashAcquisitionNoncashFinancialOrEquityInstrumentConsiderationSharesIssued1",
      "reportCount": 1,
      "unique": true,
      "unitRef": "shares",
      "xsiNil": "false"
     }
    },
    "R9": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:NetIncomeLoss",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "statement",
     "isDefault": "false",
     "longName": "0000009 - Statement - Consolidated Statements of Cash Flows",
     "menuCat": "Statements",
     "order": "9",
     "role": "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows",
     "shortName": "Consolidated Statements of Cash Flows",
     "subGroupType": "",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": "-3",
      "lang": "en-US",
      "name": "cdxs:LeaseRightOfUseAssetAmortization",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R90": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "div",
       "us-gaap:SegmentReportingPolicyPolicyTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": "INF",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:NumberOfOperatingSegments",
      "reportCount": 1,
      "unitRef": "segment",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000090 - Disclosure - Segment, Geographical and Other Revenue Information - Narrative (Details)",
     "menuCat": "Details",
     "order": "90",
     "role": "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationNarrativeDetails",
     "shortName": "Segment, Geographical and Other Revenue Information - Narrative (Details)",
     "subGroupType": "details",
     "uniqueAnchor": null
    },
    "R91": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "us-gaap:DisaggregationOfRevenueTableTextBlock",
       "ix:continuation",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:RevenueFromContractWithCustomerExcludingAssessedTax",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000091 - Disclosure - Segment, Geographical and Other Revenue Information - Segment Reporting (Details)",
     "menuCat": "Details",
     "order": "91",
     "role": "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationSegmentReportingDetails",
     "shortName": "Segment, Geographical and Other Revenue Information - Segment Reporting (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "us-gaap:ScheduleOfSegmentReportingInformationBySegmentTextBlock",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "id6f3a016f56543a59dd42d048aa1d343_D20220101-20221231",
      "decimals": "-3",
      "lang": "en-US",
      "name": "us-gaap:RevenueFromContractWithCustomerExcludingAssessedTax",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R92": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "us-gaap:SchedulesOfConcentrationOfRiskByRiskFactorTextBlock",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "iebc196c0a25e4063a8a0b966f194959c_D20220101-20221231",
      "decimals": "2",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ConcentrationRiskPercentage1",
      "reportCount": 1,
      "unique": true,
      "unitRef": "number",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000092 - Disclosure - Segment, Geographical and Other Revenue Information - Concentration Risk (Details)",
     "menuCat": "Details",
     "order": "92",
     "role": "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationConcentrationRiskDetails",
     "shortName": "Segment, Geographical and Other Revenue Information - Concentration Risk (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "us-gaap:SchedulesOfConcentrationOfRiskByRiskFactorTextBlock",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "iebc196c0a25e4063a8a0b966f194959c_D20220101-20221231",
      "decimals": "2",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:ConcentrationRiskPercentage1",
      "reportCount": 1,
      "unique": true,
      "unitRef": "number",
      "xsiNil": "false"
     }
    },
    "R93": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "us-gaap:ReconciliationOfRevenueFromSegmentsToConsolidatedTextBlock",
       "div",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:Revenues",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000093 - Disclosure - Segment, Geographical and Other Revenue Information - Revenues (Details)",
     "menuCat": "Details",
     "order": "93",
     "role": "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationRevenuesDetails",
     "shortName": "Segment, Geographical and Other Revenue Information - Revenues (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "us-gaap:ReconciliationOfRevenueFromSegmentsToConsolidatedTextBlock",
       "div",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:Revenues",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R94": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "i5c8666e68c0944c086be2b71ac6a1a53_I20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:Goodwill",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000094 - Disclosure - Segment, Geographical and Other Revenue Information - Goodwill (Details)",
     "menuCat": "Details",
     "order": "94",
     "role": "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationGoodwillDetails",
     "shortName": "Segment, Geographical and Other Revenue Information - Goodwill (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "us-gaap:ScheduleOfIntangibleAssetsAndGoodwillTableTextBlock",
       "div",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "i62bd86c646ae4f3bae8f5c08808e7127_I20221231",
      "decimals": "-3",
      "lang": "en-US",
      "name": "us-gaap:Goodwill",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R95": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "us-gaap:AllowanceForCreditLossesOnFinancingReceivablesTableTextBlock",
       "div",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "id079c9d65ff642e5a59c04fdb15b0095_I20211231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:AllowanceForNotesAndLoansReceivableCurrent",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000095 - Disclosure - Allowance for Credit Losses - Analysis of Allowance for Credit Losses (Details)",
     "menuCat": "Details",
     "order": "95",
     "role": "http://www.codexis.com/role/AllowanceforCreditLossesAnalysisofAllowanceforCreditLossesDetails",
     "shortName": "Allowance for Credit Losses - Analysis of Allowance for Credit Losses (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "us-gaap:AllowanceForCreditLossesOnFinancingReceivablesTableTextBlock",
       "div",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "iad89f73b7a964bbfa69d9866f7fc05ed_I20191231",
      "decimals": "-3",
      "lang": "en-US",
      "name": "us-gaap:AllowanceForNotesAndLoansReceivableCurrent",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R96": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "us-gaap:PastDueFinancingReceivablesTableTextBlock",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "i5c8666e68c0944c086be2b71ac6a1a53_I20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:AccountsReceivableGross",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000096 - Disclosure - Allowance for Credit Losses - Summary of Accounts Receivable by Aging Category (Details)",
     "menuCat": "Details",
     "order": "96",
     "role": "http://www.codexis.com/role/AllowanceforCreditLossesSummaryofAccountsReceivablebyAgingCategoryDetails",
     "shortName": "Allowance for Credit Losses - Summary of Accounts Receivable by Aging Category (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "us-gaap:PastDueFinancingReceivablesTableTextBlock",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "i5c8666e68c0944c086be2b71ac6a1a53_I20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:AccountsReceivableGross",
      "reportCount": 1,
      "unique": true,
      "unitRef": "usd",
      "xsiNil": "false"
     }
    },
    "R97": {
     "firstAnchor": {
      "ancestors": [
       "span",
       "td",
       "tr",
       "table",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "ia024ced325cf4047a0daba62b5170f45_D20220101-20221231",
      "decimals": "-3",
      "first": true,
      "lang": "en-US",
      "name": "us-gaap:RestructuringCharges",
      "reportCount": 1,
      "unitRef": "usd",
      "xsiNil": "false"
     },
     "groupType": "disclosure",
     "isDefault": "false",
     "longName": "0000097 - Disclosure - Restructuring Charges (Details)",
     "menuCat": "Details",
     "order": "97",
     "role": "http://www.codexis.com/role/RestructuringChargesDetails",
     "shortName": "Restructuring Charges (Details)",
     "subGroupType": "details",
     "uniqueAnchor": {
      "ancestors": [
       "span",
       "div",
       "ix:continuation",
       "div",
       "body",
       "html"
      ],
      "baseRef": "cdxs-20221231.htm",
      "contextRef": "i6f296176b0cc436d987a4bb0030ad0ac_D20221101-20221130",
      "decimals": "2",
      "lang": "en-US",
      "name": "us-gaap:RestructuringAndRelatedCostNumberOfPositionsEliminatedPeriodPercent",
      "reportCount": 1,
      "unique": true,
      "unitRef": "number",
      "xsiNil": "false"
     }
    }
   },
   "segmentCount": 138,
   "tag": {
    "cdxs_A200220PenobscotMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "200-220 Penobscot",
        "label": "200-220 Penobscot [Member]",
        "terseLabel": "200-220 Penobscot"
       }
      }
     },
     "localname": "A200220PenobscotMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesNarrativeDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_A2019PlanMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "2019 Plan [Member]",
        "label": "2019 Plan [Member]",
        "terseLabel": "2019 Plan"
       }
      }
     },
     "localname": "A2019PlanMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationNarrativeDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_A2020PBOMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "2020 PBO",
        "label": "2020 PBO [Member]",
        "terseLabel": "2020 PBO"
       }
      }
     },
     "localname": "A2020PBOMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationNarrativeDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_A2020PSUMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "2020 PSU",
        "label": "2020 PSU [Member]",
        "terseLabel": "2020 PSU"
       }
      }
     },
     "localname": "A2020PSUMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationNarrativeDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_A2021PBOMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "2021 PBO",
        "label": "2021 PBO [Member]",
        "terseLabel": "2021 PBO"
       }
      }
     },
     "localname": "A2021PBOMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationNarrativeDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_A2021PSUMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "2021 PSU",
        "label": "2021 PSU [Member]",
        "terseLabel": "2021 PSU"
       }
      }
     },
     "localname": "A2021PSUMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationNarrativeDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_A2022PBOMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "2022 PBO",
        "label": "2022 PBO [Member]",
        "terseLabel": "2022 PBO"
       }
      }
     },
     "localname": "A2022PBOMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationNarrativeDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_A2022PSUMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "2022 PSU",
        "label": "2022 PSU [Member]",
        "terseLabel": "2022 PSU"
       }
      }
     },
     "localname": "A2022PSUMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationNarrativeDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_A400PenoscotMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "400 Penoscot",
        "label": "400 Penoscot [Member]",
        "terseLabel": "400 Penoscot"
       }
      }
     },
     "localname": "A400PenoscotMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesNarrativeDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_A501ChesapeakeMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "501 Chesapeake",
        "label": "501 Chesapeake [Member]",
        "terseLabel": "501 Chesapeake"
       }
      }
     },
     "localname": "A501ChesapeakeMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesNarrativeDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_AccountingPoliciesLineItems": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Accounting Policies",
        "label": "Accounting Policies [Line Items]",
        "terseLabel": "Accounting Policies [Line Items]"
       }
      }
     },
     "localname": "AccountingPoliciesLineItems",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesNarrativeDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "cdxs_AccountingPoliciesTable": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Accounting Policies",
        "label": "Accounting Policies [Table]",
        "verboseLabel": "Accounting Policies [Table]"
       }
      }
     },
     "localname": "AccountingPoliciesTable",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesNarrativeDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "cdxs_AccruedPurchaseReceivedNotYetBilled": {
     "auth_ref": [],
     "calculation": {
      "http://www.codexis.com/role/BalanceSheetDetailsOtherAccruedLiabilitiesDetails": {
       "order": 1.0,
       "parentTag": "us-gaap_AccruedLiabilitiesCurrent",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Accrued Purchase, Received Not Yet Billed",
        "label": "Accrued Purchase, Received Not Yet Billed",
        "terseLabel": "Accrued purchases"
       }
      }
     },
     "localname": "AccruedPurchaseReceivedNotYetBilled",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetDetailsOtherAccruedLiabilitiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "cdxs_AgreementTypeAxis": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Agreement Type [Axis]",
        "label": "Agreement Type [Axis]",
        "terseLabel": "Agreement Type [Axis]"
       }
      }
     },
     "localname": "AgreementTypeAxis",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsNestleGlobalDevelopmentAgreementDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "cdxs_AgreementTypeDomain": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "[Domain] for Agreement Type [Axis]",
        "label": "Agreement Type [Domain]",
        "terseLabel": "Agreement Type [Domain]"
       }
      }
     },
     "localname": "AgreementTypeDomain",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsNestleGlobalDevelopmentAgreementDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_AllowanceForCreditLossAdjustment": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Allowance For Credit Loss, Adjustment",
        "label": "Allowance For Credit Loss, Adjustment",
        "negatedTerseLabel": "Recoveries collected"
       }
      }
     },
     "localname": "AllowanceForCreditLossAdjustment",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/AllowanceforCreditLossesAnalysisofAllowanceforCreditLossesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "cdxs_AllowanceForCreditLossWriteOff": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Allowance For Credit Loss, Write Off",
        "label": "Allowance For Credit Loss, Write Off",
        "negatedTerseLabel": "Write-offs"
       }
      }
     },
     "localname": "AllowanceForCreditLossWriteOff",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/AllowanceforCreditLossesAnalysisofAllowanceforCreditLossesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "cdxs_ArzedaMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Arzeda",
        "label": "Arzeda [Member]",
        "terseLabel": "Arzeda"
       }
      }
     },
     "localname": "ArzedaMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/InvestmentsinNonMarketableSecuritiesCarryingValueandFairValueofSecuritiesDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_AuditorInformationAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Auditor Information",
        "label": "Auditor Information [Abstract]"
       }
      }
     },
     "localname": "AuditorInformationAbstract",
     "nsuri": "http://www.codexis.com/20221231",
     "xbrltype": "stringItemType"
    },
    "cdxs_BiotherapeuticsSegmentMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Biotherapeutics Segment",
        "label": "Biotherapeutics Segment [Member]",
        "terseLabel": "Novel Biotherapeutics"
       }
      }
     },
     "localname": "BiotherapeuticsSegmentMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionDisaggregationofRevenueDetails",
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationSegmentReportingDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_CashDepositMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Cash Deposit",
        "label": "Cash Deposit [Member]",
        "terseLabel": "Cash Deposit"
       }
      }
     },
     "localname": "CashDepositMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesNarrativeDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_CashPaidAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Cash Paid",
        "label": "Cash Paid [Abstract]",
        "terseLabel": "Cash paid:"
       }
      }
     },
     "localname": "CashPaidAbstract",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesOtherLeaseInformationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "cdxs_CollaborativeArrangementConcentrationRiskMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Collaborative Arrangement Concentration Risk",
        "label": "Collaborative Arrangement Concentration Risk [Member]",
        "terseLabel": "Collaborative Arrangement Concentration Risk"
       }
      }
     },
     "localname": "CollaborativeArrangementConcentrationRiskMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsMerckSitagliptinCatalystSupplyAgreementDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_CollaborativeArrangementNumberOfMilestonePayments": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Collaborative Arrangement, Number Of Milestone Payments",
        "label": "Collaborative Arrangement, Number Of Milestone Payments",
        "terseLabel": "Additional milestone payments"
       }
      }
     },
     "localname": "CollaborativeArrangementNumberOfMilestonePayments",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsGSKPlatformTechnologyTransferCollaborationandLicenseAgreementDetails"
     ],
     "xbrltype": "integerItemType"
    },
    "cdxs_CommercialAgreementMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Commercial Agreement",
        "label": "Commercial Agreement [Member]",
        "terseLabel": "Commercial Agreement"
       }
      }
     },
     "localname": "CommercialAgreementMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTateLyleDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_CommercializationAndEnzymeSupplyAgreementMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Commercialization And Enzyme Supply Agreement",
        "label": "Commercialization And Enzyme Supply Agreement [Member]",
        "terseLabel": "Commercialization And Enzyme Supply Agreement"
       }
      }
     },
     "localname": "CommercializationAndEnzymeSupplyAgreementMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsMolecularAssociatesIncDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_ComputerEquipmentAndSoftwareMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Computer Equipment and Software [Member]",
        "label": "Computer Equipment and Software [Member]",
        "terseLabel": "Computer equipment and software"
       }
      }
     },
     "localname": "ComputerEquipmentAndSoftwareMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesPropertyPlantandEquipmentDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsNovartisDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_ConcentrationRiskSupplyRiskPolicyTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Concentration Risk, Supply Risk [Policy Text Block]",
        "label": "Concentration Risk, Supply Risk [Policy Text Block]",
        "terseLabel": "Concentrations of Supply Risk"
       }
      }
     },
     "localname": "ConcentrationRiskSupplyRiskPolicyTextBlock",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesPolicies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "cdxs_ContractWithCustomerLiabilityNewActivitiesPerformanceObligationSatisfiedRevenueRecognition": {
     "auth_ref": [],
     "calculation": {
      "http://www.codexis.com/role/RevenueRecognitionRevenueRecognizedDetails": {
       "order": 3.0,
       "parentTag": "us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Contract With Customer, Liability, New Activities, Performance Obligation Satisfied, Revenue Recognition",
        "label": "Contract With Customer, Liability, New Activities, Performance Obligation Satisfied, Revenue Recognition",
        "terseLabel": "Performance obligations satisfied from new activities in the period - contract revenue"
       }
      }
     },
     "localname": "ContractWithCustomerLiabilityNewActivitiesPerformanceObligationSatisfiedRevenueRecognition",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionRevenueRecognizedDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "cdxs_ContractWithCustomerLiabilityRetainerFee": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Contract With Customer, Liability, Retainer Fee",
        "label": "Contract With Customer, Liability, Retainer Fee",
        "terseLabel": "Contract with customer, liability, retainer fee"
       }
      }
     },
     "localname": "ContractWithCustomerLiabilityRetainerFee",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsPfizerEnzymeSupplyAgreementDetails",
      "http://www.codexis.com/role/DescriptionofBusinessDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "cdxs_ContractWithCustomerLiabilityRevenueRecognizedIncludingOpeningBalance": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Contract with Customer, Liability, Revenue Recognized, Including Opening Balance",
        "label": "Contract with Customer, Liability, Revenue Recognized, Including Opening Balance",
        "terseLabel": "Revenue recognized, including opening balance"
       }
      }
     },
     "localname": "ContractWithCustomerLiabilityRevenueRecognizedIncludingOpeningBalance",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTakedaDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "cdxs_ContractWithCustomerSalesMilestone": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Contract With Customer, Sales Milestone",
        "label": "Contract With Customer, Sales Milestone",
        "terseLabel": "Aggregate commercial sales, milestone"
       }
      }
     },
     "localname": "ContractWithCustomerSalesMilestone",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsMolecularAssociatesIncDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "cdxs_CoreSegmentMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Core Segment",
        "label": "Core Segment [Member]",
        "terseLabel": "Performance Enzymes"
       }
      }
     },
     "localname": "CoreSegmentMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionDisaggregationofRevenueDetails",
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationSegmentReportingDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_CustomerAMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Customer A",
        "label": "Customer A [Member]",
        "terseLabel": "Customer A"
       }
      }
     },
     "localname": "CustomerAMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationConcentrationRiskDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_CustomerBMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Customer B",
        "label": "Customer B [Member]",
        "terseLabel": "Customer B"
       }
      }
     },
     "localname": "CustomerBMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationConcentrationRiskDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_CustomerCMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Customer C",
        "label": "Customer C [Member]",
        "terseLabel": "Customer C"
       }
      }
     },
     "localname": "CustomerCMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationConcentrationRiskDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_CustomerDMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Customer D",
        "label": "Customer D [Member]",
        "terseLabel": "Customer D"
       }
      }
     },
     "localname": "CustomerDMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationConcentrationRiskDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_DeferredTaxAssetsLeaseLiability": {
     "auth_ref": [],
     "calculation": {
      "http://www.codexis.com/role/IncomeTaxesComponentsofDeferredTaxAssetsandLiabilitiesDetails": {
       "order": 3.0,
       "parentTag": "us-gaap_DeferredTaxAssetsGross",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Deferred Tax Assets, Lease Liability",
        "label": "Deferred Tax Assets, Lease Liability",
        "terseLabel": "Lease liability"
       }
      }
     },
     "localname": "DeferredTaxAssetsLeaseLiability",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesComponentsofDeferredTaxAssetsandLiabilitiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "cdxs_DeferredTaxLiabilitiesRightOfUseAssets": {
     "auth_ref": [],
     "calculation": {
      "http://www.codexis.com/role/IncomeTaxesComponentsofDeferredTaxAssetsandLiabilitiesDetails": {
       "order": 2.0,
       "parentTag": "us-gaap_DeferredIncomeTaxLiabilities",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Deferred Tax Liabilities, Right-of-use Assets",
        "label": "Deferred Tax Liabilities, Right-of-use Assets",
        "negatedLabel": "Right-of-use assets"
       }
      }
     },
     "localname": "DeferredTaxLiabilitiesRightOfUseAssets",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesComponentsofDeferredTaxAssetsandLiabilitiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "cdxs_DevelopmentAndManufacturingServicesAgreementsMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Development And Manufacturing Services Agreements",
        "label": "Development And Manufacturing Services Agreements [Member]",
        "terseLabel": "Development and manufacturing services agreements"
       }
      }
     },
     "localname": "DevelopmentAndManufacturingServicesAgreementsMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesOtherCommitmentsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_DueFromRelatedPartiesShares": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Due From Related Parties, Shares",
        "label": "Due From Related Parties, Shares",
        "terseLabel": "Milestone payment received (in shares)"
       }
      }
     },
     "localname": "DueFromRelatedPartiesShares",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsMolecularAssociatesIncDetails",
      "http://www.codexis.com/role/RelatedPartyTransactionsDetails"
     ],
     "xbrltype": "sharesItemType"
    },
    "cdxs_EffectiveIncomeTaxRateReconciliationNondeductibleExpenseExecutiveCompensation": {
     "auth_ref": [],
     "calculation": {
      "http://www.codexis.com/role/IncomeTaxesTaxRateReconciliationDetails": {
       "order": 7.0,
       "parentTag": "us-gaap_IncomeTaxExpenseBenefit",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Effective Income Tax Rate Reconciliation, Nondeductible Expense, Executive Compensation",
        "label": "Effective Income Tax Rate Reconciliation, Nondeductible Expense, Executive Compensation",
        "terseLabel": "Executive compensation"
       }
      }
     },
     "localname": "EffectiveIncomeTaxRateReconciliationNondeductibleExpenseExecutiveCompensation",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesTaxRateReconciliationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "cdxs_EnzymeProductMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Enzyme Product",
        "label": "Enzyme Product [Member]",
        "terseLabel": "Enzyme Product"
       }
      }
     },
     "localname": "EnzymeProductMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsPfizerEnzymeSupplyAgreementDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_EquitySecuritiesWithoutReadilyDeterminableFairValueRealizedUpwardDownwardPriceAdjustmentAnnualAmount": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Equity Securities Without Readily Determinable Fair Value, Realized Upward (Downward) Price Adjustment, Annual Amount",
        "label": "Equity Securities Without Readily Determinable Fair Value, Realized Upward (Downward) Price Adjustment, Annual Amount",
        "terseLabel": "Equity securities without readily determinable fair value, upward (downward) price adjustment, annual amount"
       }
      }
     },
     "localname": "EquitySecuritiesWithoutReadilyDeterminableFairValueRealizedUpwardDownwardPriceAdjustmentAnnualAmount",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/InvestmentsinNonMarketableSecuritiesNarrativeDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "cdxs_EquitySecuritiesWithoutReadilyDeterminableFairValueShares": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Equity Securities Without Readily Determinable Fair Value, Shares",
        "label": "Equity Securities Without Readily Determinable Fair Value, Shares",
        "terseLabel": "Equity securities without readily determinable fair value (in shares)"
       }
      }
     },
     "localname": "EquitySecuritiesWithoutReadilyDeterminableFairValueShares",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/InvestmentsinNonMarketableSecuritiesNarrativeDetails"
     ],
     "xbrltype": "sharesItemType"
    },
    "cdxs_EquitySecuritiesWithoutReadilyDeterminableFairValueSharesMilestonePaymentsReceived": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Equity Securities Without Readily Determinable Fair Value, Shares, Milestone Payments Received",
        "label": "Equity Securities Without Readily Determinable Fair Value, Shares, Milestone Payments Received",
        "terseLabel": "Milestone payments received (in shares)"
       }
      }
     },
     "localname": "EquitySecuritiesWithoutReadilyDeterminableFairValueSharesMilestonePaymentsReceived",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsMolecularAssociatesIncDetails",
      "http://www.codexis.com/role/InvestmentsinNonMarketableSecuritiesNarrativeDetails",
      "http://www.codexis.com/role/RelatedPartyTransactionsDetails"
     ],
     "xbrltype": "sharesItemType"
    },
    "cdxs_FacilityMaintenanceAgreementMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Facility Maintenance Agreement",
        "label": "Facility Maintenance Agreement [Member]",
        "terseLabel": "Facility maintenance agreement"
       }
      }
     },
     "localname": "FacilityMaintenanceAgreementMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesOtherCommitmentsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_FinanceLeaseCost": {
     "auth_ref": [],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsandContingenciesLeaseCostsDetails": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Finance Lease, Cost",
        "label": "Finance Lease, Cost",
        "totalLabel": "Finance lease costs"
       }
      }
     },
     "localname": "FinanceLeaseCost",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesLeaseCostsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "cdxs_FinancialReceivablesNotPastDueMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Financial Receivables Not Past Due",
        "label": "Financial Receivables Not Past Due [Member]",
        "terseLabel": "Current"
       }
      }
     },
     "localname": "FinancialReceivablesNotPastDueMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/AllowanceforCreditLossesSummaryofAccountsReceivablebyAgingCategoryDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_FinancialReceivablesPastDueMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Financial Receivables Past Due",
        "label": "Financial Receivables Past Due [Member]",
        "terseLabel": "Total over 31 Days"
       }
      }
     },
     "localname": "FinancialReceivablesPastDueMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/AllowanceforCreditLossesSummaryofAccountsReceivablebyAgingCategoryDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_GSKMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "GSK [Member]",
        "label": "GSK [Member]",
        "terseLabel": "GSK Platform"
       }
      }
     },
     "localname": "GSKMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsGSKPlatformTechnologyTransferCollaborationandLicenseAgreementDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_GlobalDevelopmentOptionandLicenseAgreementMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Global Development, Option and License Agreement [Member]",
        "label": "Global Development, Option and License Agreement [Member]",
        "terseLabel": "Global Development, Option and License Agreement"
       }
      }
     },
     "localname": "GlobalDevelopmentOptionandLicenseAgreementMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsNestleGlobalDevelopmentAgreementDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_GoodwillAllocationPercent": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Goodwill, Allocation Percent",
        "label": "Goodwill, Allocation Percent",
        "terseLabel": "Goodwill, allocation percent"
       }
      }
     },
     "localname": "GoodwillAllocationPercent",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesNarrativeDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "cdxs_HeadquartersRedwoodCityMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Headquarters, Redwood city.",
        "label": "Headquarters Redwood City [Member]",
        "terseLabel": "Headquarters Redwood City"
       }
      }
     },
     "localname": "HeadquartersRedwoodCityMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesNarrativeDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_IncentiveStockOptionsMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Incentive Stock Options [Member]",
        "label": "Incentive Stock Options [Member]",
        "terseLabel": "Incentive Stock Options"
       }
      }
     },
     "localname": "IncentiveStockOptionsMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationNarrativeDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_LeaseRightOfUseAssetAmortization": {
     "auth_ref": [],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows": {
       "order": 3.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Lease, Right-of-Use Asset, Amortization",
        "label": "Lease, Right-of-Use Asset, Amortization",
        "terseLabel": "Amortization expense - right-of-use assets - operating and finance leases"
       }
      }
     },
     "localname": "LeaseRightOfUseAssetAmortization",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "cdxs_LesseeOperatingLeaseOptionToExtendNumber": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Lessee, Operating Lease, Option To Extend, Number",
        "label": "Lessee, Operating Lease, Option To Extend, Number",
        "terseLabel": "Number of options to extend lease term"
       }
      }
     },
     "localname": "LesseeOperatingLeaseOptionToExtendNumber",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesNarrativeDetails"
     ],
     "xbrltype": "integerItemType"
    },
    "cdxs_LineOfCreditFacilityAccountsReceivableBorrowingBasePercentage": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Line Of Credit Facility, Accounts Receivable Borrowing Base Percentage",
        "label": "Line Of Credit Facility, Accounts Receivable Borrowing Base Percentage",
        "terseLabel": "Accounts receivable borrowing base percentage"
       }
      }
     },
     "localname": "LineOfCreditFacilityAccountsReceivableBorrowingBasePercentage",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesNarrativeDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "cdxs_MAIAgreementMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "MAI Agreement",
        "label": "MAI Agreement [Member]",
        "terseLabel": "MAI Agreement"
       }
      }
     },
     "localname": "MAIAgreementMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsMolecularAssociatesIncDetails",
      "http://www.codexis.com/role/RelatedPartyTransactionsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_MasterCollaborationResearchAgreementMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Master Collaboration &amp; Research Agreement",
        "label": "Master Collaboration &amp; Research Agreement [Member]",
        "terseLabel": "Master Collaboration &amp; Research Agreement"
       }
      }
     },
     "localname": "MasterCollaborationResearchAgreementMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsMolecularAssociatesIncDetails",
      "http://www.codexis.com/role/RelatedPartyTransactionsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_MerckMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Merck [Member]",
        "label": "Merck [Member]",
        "terseLabel": "Merck"
       }
      }
     },
     "localname": "MerckMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsMerckPlatformTechnologyTransferandLicenseAgreementDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsMerckSitagliptinCatalystSupplyAgreementDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_MilestoneOneMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Milestone One",
        "label": "Milestone One [Member]",
        "terseLabel": "Milestone One"
       }
      }
     },
     "localname": "MilestoneOneMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsNovartisDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsPortonDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsRocheDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_MilestonePaymentPerTargetGeneMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Milestone Payment Per Target Gene",
        "label": "Milestone Payment Per Target Gene [Member]",
        "terseLabel": "Milestone Payment Per Target Gene"
       }
      }
     },
     "localname": "MilestonePaymentPerTargetGeneMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTakedaDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_MilestoneThreeMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Milestone Three",
        "label": "Milestone Three [Member]",
        "terseLabel": "Milestone Three"
       }
      }
     },
     "localname": "MilestoneThreeMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsPortonDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_MilestoneTwoMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Milestone Two",
        "label": "Milestone Two [Member]",
        "terseLabel": "Milestone Two"
       }
      }
     },
     "localname": "MilestoneTwoMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsNovartisDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsPortonDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsRocheDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_MolecularAssembliesIncMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Molecular Assemblies, Inc.",
        "label": "Molecular Assemblies, Inc. [Member]",
        "terseLabel": "MAI"
       }
      }
     },
     "localname": "MolecularAssembliesIncMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsMolecularAssociatesIncDetails",
      "http://www.codexis.com/role/InvestmentsinNonMarketableSecuritiesCarryingValueandFairValueofSecuritiesDetails",
      "http://www.codexis.com/role/RelatedPartyTransactionsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_NestecLtd.NestleHealthSciencesMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Nestec Ltd. (Nestle Health Sciences) [Member]",
        "label": "Nestec Ltd. (Nestle Health Sciences) [Member]",
        "terseLabel": "Nestec Ltd. (Nestle Health Sciences)"
       }
      }
     },
     "localname": "NestecLtd.NestleHealthSciencesMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsNestleGlobalDevelopmentAgreementDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_NonStatutoryStockOptionsMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Non-Statutory Stock Options [Member]",
        "label": "Non-Statutory Stock Options [Member]",
        "terseLabel": "Non-Statutory Stock Options"
       }
      }
     },
     "localname": "NonStatutoryStockOptionsMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationNarrativeDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_NoncashActivityAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Noncash Activity",
        "label": "Noncash Activity [Abstract]",
        "terseLabel": "Non-cash activity:"
       }
      }
     },
     "localname": "NoncashActivityAbstract",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesOtherLeaseInformationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "cdxs_NovartisMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Novartis [Member]",
        "label": "Novartis [Member]",
        "terseLabel": "Novartis"
       }
      }
     },
     "localname": "NovartisMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsNovartisDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_NovelBiotherapeuticsMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Novel Biotherapeutics [Member]",
        "label": "Novel Biotherapeutics [Member]",
        "terseLabel": "Novel Biotherapeutics"
       }
      }
     },
     "localname": "NovelBiotherapeuticsMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesNarrativeDetails",
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationGoodwillDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_OfficeEquipmentAndFurnitureMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Office Equipment and Furniture [Member]",
        "label": "Office Equipment and Furniture [Member]",
        "terseLabel": "Office equipment and furniture"
       }
      }
     },
     "localname": "OfficeEquipmentAndFurnitureMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesPropertyPlantandEquipmentDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_OneCustomerMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "One Customer",
        "label": "One Customer [Member]",
        "terseLabel": "One Customer"
       }
      }
     },
     "localname": "OneCustomerMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesNarrativeDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_OperatingLossAndTaxCreditCarryforwardsLineItems": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "[Line Items] for Operating Loss and Tax Credit Carryforwards [Table]",
        "label": "Operating Loss and Tax Credit Carryforwards [Line Items]",
        "terseLabel": "Operating Loss and Tax Credit Carryforwards [Line Items]"
       }
      }
     },
     "localname": "OperatingLossAndTaxCreditCarryforwardsLineItems",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesNOLCarryforwardsandFederalResearchandDevelopmentTaxCreditsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "cdxs_OperatingLossAndTaxCreditCarryforwardsTable": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Operating Loss and Tax Credit Carryforwards [Table]",
        "label": "Operating Loss and Tax Credit Carryforwards [Table]",
        "terseLabel": "Operating Loss and Tax Credit Carryforwards"
       }
      }
     },
     "localname": "OperatingLossAndTaxCreditCarryforwardsTable",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesNOLCarryforwardsandFederalResearchandDevelopmentTaxCreditsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "cdxs_OtherInformationAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Other Information",
        "label": "Other Information [Abstract]",
        "terseLabel": "Other information:"
       }
      }
     },
     "localname": "OtherInformationAbstract",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesOtherLeaseInformationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "cdxs_PercentOfVotingInterestsThresholdToTriggerHigherExercisePrice": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Percent Of Voting Interests Threshold To Trigger Higher Exercise Price",
        "label": "Percent Of Voting Interests Threshold To Trigger Higher Exercise Price",
        "terseLabel": "Percent of voting interests"
       }
      }
     },
     "localname": "PercentOfVotingInterestsThresholdToTriggerHigherExercisePrice",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationNarrativeDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "cdxs_PerformanceEnzymesMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Performance Enzymes [Member]",
        "label": "Performance Enzymes [Member]",
        "terseLabel": "Performance Enzymes"
       }
      }
     },
     "localname": "PerformanceEnzymesMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesNarrativeDetails",
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationGoodwillDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_PfizerMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Pfizer",
        "label": "Pfizer [Member]",
        "terseLabel": "Pfizer"
       }
      }
     },
     "localname": "PfizerMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsPfizerEnzymeSupplyAgreementDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_PiperSandlerCoMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Piper Sandler &amp; Co",
        "label": "Piper Sandler &amp; Co [Member]",
        "terseLabel": "PSC"
       }
      }
     },
     "localname": "PiperSandlerCoMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CapitalStockDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_PortonMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Porton [Member]",
        "label": "Porton [Member]",
        "terseLabel": "Porton"
       }
      }
     },
     "localname": "PortonMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsPortonDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_ProductSalesMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Product Sales [Member]",
        "label": "Product Sales [Member]",
        "terseLabel": "Product revenue",
        "verboseLabel": "Product revenue ($514, $0 and $0 from a related party)"
       }
      }
     },
     "localname": "ProductSalesMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsMerckSitagliptinCatalystSupplyAgreementDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsMolecularAssociatesIncDetails",
      "http://www.codexis.com/role/ConsolidatedStatementsofOperations",
      "http://www.codexis.com/role/ConsolidatedStatementsofOperationsParenthetical",
      "http://www.codexis.com/role/RelatedPartyTransactionsDetails",
      "http://www.codexis.com/role/RevenueRecognitionDisaggregationofRevenueDetails",
      "http://www.codexis.com/role/RevenueRecognitionPerformanceObligationDetails",
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationSegmentReportingDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_PublicOfferingDirectOfferingCostsMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Public Offering, Direct Offering Costs",
        "label": "Public Offering, Direct Offering Costs [Member]",
        "terseLabel": "Public Offering, Direct Offering Costs"
       }
      }
     },
     "localname": "PublicOfferingDirectOfferingCostsMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CapitalStockDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_PublicOfferingUnderwritingDiscountsMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Public Offering, Underwriting Discounts",
        "label": "Public Offering, Underwriting Discounts [Member]",
        "terseLabel": "Public Offering, Underwriting Discounts"
       }
      }
     },
     "localname": "PublicOfferingUnderwritingDiscountsMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CapitalStockDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_ReceivableFromCollaborativeArrangement": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Receivable From Collaborative Arrangement",
        "label": "Receivable From Collaborative Arrangement",
        "terseLabel": "Milestone payment amount"
       }
      }
     },
     "localname": "ReceivableFromCollaborativeArrangement",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTateLyleDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "cdxs_RelatedPartyTransactionMilestonePaymentReceived": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Related Party Transaction, Milestone Payment Received",
        "label": "Related Party Transaction, Milestone Payment Received",
        "terseLabel": "MAI agreement milestone payment received"
       }
      }
     },
     "localname": "RelatedPartyTransactionMilestonePaymentReceived",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsMolecularAssociatesIncDetails",
      "http://www.codexis.com/role/RelatedPartyTransactionsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "cdxs_ResearchAndDevelopmentReimbursementFourthProgramMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Research and Development Reimbursement, Fourth Program",
        "label": "Research and Development Reimbursement, Fourth Program [Member]",
        "terseLabel": "Research and Development Reimbursement, Fourth Program"
       }
      }
     },
     "localname": "ResearchAndDevelopmentReimbursementFourthProgramMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTakedaDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_ResearchAndDevelopmentReimbursementThreeInitialProgramsMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Research and Development Reimbursement, Three Initial Programs",
        "label": "Research and Development Reimbursement, Three Initial Programs [Member]",
        "terseLabel": "Research and Development Reimbursement, Three Initial Programs"
       }
      }
     },
     "localname": "ResearchAndDevelopmentReimbursementThreeInitialProgramsMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTakedaDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_ResearchandDevelopmentAgreementMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Research and Development Agreement [Member]",
        "label": "Research and Development Agreement [Member]",
        "terseLabel": "Research and Development Agreement"
       }
      }
     },
     "localname": "ResearchandDevelopmentAgreementMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsNestleGlobalDevelopmentAgreementDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_ResearchandDevelopmentRevenueMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Research and Development Revenue [Member]",
        "label": "Research and Development Revenue [Member]",
        "terseLabel": "Research and development revenue",
        "verboseLabel": "Research and development revenue ($1,245, $1,955 and $900 from a related party)"
       }
      }
     },
     "localname": "ResearchandDevelopmentRevenueMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsGSKPlatformTechnologyTransferCollaborationandLicenseAgreementDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsMerckPlatformTechnologyTransferandLicenseAgreementDetails",
      "http://www.codexis.com/role/ConsolidatedStatementsofOperations",
      "http://www.codexis.com/role/ConsolidatedStatementsofOperationsParenthetical",
      "http://www.codexis.com/role/RevenueRecognitionDisaggregationofRevenueDetails",
      "http://www.codexis.com/role/RevenueRecognitionPerformanceObligationDetails",
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationSegmentReportingDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_RestrictedStockandRestrictedStockUnitsMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Restricted Stock and Restricted Stock Units [Member]",
        "label": "Restricted Stock and Restricted Stock Units [Member]",
        "terseLabel": "RSUs and RSAs"
       }
      }
     },
     "localname": "RestrictedStockandRestrictedStockUnitsMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationStockBasedCompensationExpenseDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_RevenueFromCollaborativeArrangementContingentAmounts": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Revenue From Collaborative Arrangement, Contingent Amounts",
        "label": "Revenue From Collaborative Arrangement, Contingent Amounts",
        "terseLabel": "Additional contingent payments"
       }
      }
     },
     "localname": "RevenueFromCollaborativeArrangementContingentAmounts",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsGSKPlatformTechnologyTransferCollaborationandLicenseAgreementDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "cdxs_RevenueFromContractWithCustomerPaymentTerms": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Revenue From Contract With Customer, Payment Terms",
        "label": "Revenue From Contract With Customer, Payment Terms",
        "terseLabel": "Payment terms"
       }
      }
     },
     "localname": "RevenueFromContractWithCustomerPaymentTerms",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionNarrativeDetails"
     ],
     "xbrltype": "durationItemType"
    },
    "cdxs_RevenueRecognitionAnnualPayment": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Revenue Recognition, Annual Payment",
        "label": "Revenue Recognition, Annual Payment",
        "terseLabel": "Revenue recognition, annual payment"
       }
      }
     },
     "localname": "RevenueRecognitionAnnualPayment",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsNovartisDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "cdxs_RevenueRecognitionContingentAnnualPaymentsTerm": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Revenue Recognition, Contingent Annual Payments, Term",
        "label": "Revenue Recognition, Contingent Annual Payments, Term",
        "terseLabel": "Contingent annual payments, term"
       }
      }
     },
     "localname": "RevenueRecognitionContingentAnnualPaymentsTerm",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsNovartisDetails"
     ],
     "xbrltype": "durationItemType"
    },
    "cdxs_RevenueRecognitionContingentAnnualReceivableIncrease": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Revenue Recognition, Contingent Annual Receivable Increase",
        "label": "Revenue Recognition, Contingent Annual Receivable Increase",
        "terseLabel": "Contingent annual receivable increase"
       }
      }
     },
     "localname": "RevenueRecognitionContingentAnnualReceivableIncrease",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsNovartisDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "cdxs_RevenueRecognitionContingentReceivable": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Revenue Recognition, Contingent Receivable",
        "label": "Revenue Recognition, Contingent Receivable",
        "terseLabel": "Contingent receivable"
       }
      }
     },
     "localname": "RevenueRecognitionContingentReceivable",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsMerckPlatformTechnologyTransferandLicenseAgreementDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsNestleGlobalDevelopmentAgreementDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsNovartisDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsPortonDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsRocheDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsTakedaDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsTateLyleDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "cdxs_RevenueRecognitionMilestoneRevenueNumberOfDaysForPayment": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Revenue Recognition, Milestone Revenue, Number Of Days For Payment",
        "label": "Revenue Recognition, Milestone Revenue, Number Of Days For Payment",
        "terseLabel": "Number of days for payment"
       }
      }
     },
     "localname": "RevenueRecognitionMilestoneRevenueNumberOfDaysForPayment",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsPortonDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsRocheDetails"
     ],
     "xbrltype": "durationItemType"
    },
    "cdxs_RevenueRecognitionTargetSalesForSalesMilestone": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Revenue Recognition, Target Sales for Sales Milestone",
        "label": "Revenue Recognition, Target Sales for Sales Milestone",
        "terseLabel": "Target sales for sales milestone"
       }
      }
     },
     "localname": "RevenueRecognitionTargetSalesForSalesMilestone",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsNestleGlobalDevelopmentAgreementDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "cdxs_RocheMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Roche",
        "label": "Roche [Member]",
        "terseLabel": "Roche"
       }
      }
     },
     "localname": "RocheMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsRocheDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_SaleOfStockCommissionsAndReimbursementsPercentageOfGrossSalesPrice": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Sale Of Stock, Commissions And Reimbursements, Percentage Of Gross Sales Price",
        "label": "Sale Of Stock, Commissions And Reimbursements, Percentage Of Gross Sales Price",
        "terseLabel": "Sale of stock, commissions and reimbursements, percentage of gross sales price"
       }
      }
     },
     "localname": "SaleOfStockCommissionsAndReimbursementsPercentageOfGrossSalesPrice",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CapitalStockDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "cdxs_SaleOfStockCommissionsPercentageOfGrossSalesPrice": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Sale Of Stock, Commissions, Percentage Of Gross Sales Price",
        "label": "Sale Of Stock, Commissions, Percentage Of Gross Sales Price",
        "terseLabel": "Sale of stock, commissions, percentage of gross sales price"
       }
      }
     },
     "localname": "SaleOfStockCommissionsPercentageOfGrossSalesPrice",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CapitalStockDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "cdxs_SaleOfStockConsiderationReceivedOnTransactionGross": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Sale of Stock, Consideration Received on Transaction, Gross",
        "label": "Sale of Stock, Consideration Received on Transaction, Gross",
        "terseLabel": "Gross proceeds from public offering"
       }
      }
     },
     "localname": "SaleOfStockConsiderationReceivedOnTransactionGross",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CapitalStockDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "cdxs_SaleOfStockPeriod": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Sale Of Stock, Period",
        "label": "Sale Of Stock, Period",
        "terseLabel": "Sale of stock, period"
       }
      }
     },
     "localname": "SaleOfStockPeriod",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CapitalStockDetails"
     ],
     "xbrltype": "durationItemType"
    },
    "cdxs_SaleOfStockValueOfSharesForIssuance": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Sale Of Stock, Value Of Shares For Issuance",
        "label": "Sale Of Stock, Value Of Shares For Issuance",
        "terseLabel": "Sale of stock, value of shares for issuance"
       }
      }
     },
     "localname": "SaleOfStockValueOfSharesForIssuance",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CapitalStockDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "cdxs_SalesBasedMilestoneMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Sales-Based Milestone [Member]",
        "label": "Sales-Based Milestone [Member]",
        "terseLabel": "Sales-based Milestone"
       }
      }
     },
     "localname": "SalesBasedMilestoneMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsNestleGlobalDevelopmentAgreementDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_SanCarlosMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "San Carlos",
        "label": "San Carlos [Member]",
        "terseLabel": "San Carlos"
       }
      }
     },
     "localname": "SanCarlosMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesNarrativeDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_SecurityOwnedNotReadilyMarketableMAIMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Security Owned Not Readily Marketable MAI",
        "label": "Security Owned Not Readily Marketable MAI [Member]",
        "terseLabel": "Total non-marketable equity securities"
       }
      }
     },
     "localname": "SecurityOwnedNotReadilyMarketableMAIMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/InvestmentsinNonMarketableSecuritiesCarryingValueandFairValueofSecuritiesDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_SeqWellMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "seqWell",
        "label": "seqWell [Member]",
        "terseLabel": "seqWell"
       }
      }
     },
     "localname": "SeqWellMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/InvestmentsinNonMarketableSecuritiesCarryingValueandFairValueofSecuritiesDetails",
      "http://www.codexis.com/role/InvestmentsinNonMarketableSecuritiesNarrativeDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_SeriesAAndBPreferredStockMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Series A And B Preferred Stock",
        "label": "Series A And B Preferred Stock [Member]",
        "terseLabel": "Series A and B Preferred Stock"
       }
      }
     },
     "localname": "SeriesAAndBPreferredStockMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsMolecularAssociatesIncDetails",
      "http://www.codexis.com/role/RelatedPartyTransactionsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_SeriesB2PreferredStockMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Series B-2 Preferred Stock",
        "label": "Series B-2 Preferred Stock [Member]",
        "terseLabel": "Series B-2 Preferred Stock"
       }
      }
     },
     "localname": "SeriesB2PreferredStockMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/InvestmentsinNonMarketableSecuritiesNarrativeDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_ShareBasedCompensationArrangementByShareBasedPaymentAwardExpirationPeriodUponTerminationOfService": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Share-Based Compensation Arrangement By Share-Based Payment Award, Expiration Period Upon Termination Of Service",
        "label": "Share-Based Compensation Arrangement By Share-Based Payment Award, Expiration Period Upon Termination Of Service",
        "terseLabel": "Expiration period of options upon employee's termination of service"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardExpirationPeriodUponTerminationOfService",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationNarrativeDetails"
     ],
     "xbrltype": "durationItemType"
    },
    "cdxs_ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfInstallments": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Share-Based Compensation Arrangement By Share-based Payment Award, Number Of Installments",
        "label": "Share-Based Compensation Arrangement By Share-based Payment Award, Number Of Installments",
        "terseLabel": "Number of installments"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfInstallments",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationNarrativeDetails"
     ],
     "xbrltype": "integerItemType"
    },
    "cdxs_ShareBasedCompensationArrangementByShareBasedPaymentAwardPurchasePriceOfCommonStockAboveMinimumThresholdPercent": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Share-based Compensation Arrangement by Share-based Payment Award, Purchase Price of Common Stock Above Minimum Threshold, Percent",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Purchase Price of Common Stock Above Minimum Threshold, Percent",
        "terseLabel": "Purchase price of common stock when voting percent is above minimum threshold"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardPurchasePriceOfCommonStockAboveMinimumThresholdPercent",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationNarrativeDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "cdxs_SharebasedCompensationArrangementBySharebasedPaymentAwardFutureVestingRightsPercentage": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Share-based Compensation Arrangement By Share-based Payment Award, Future Vesting Rights, Percentage",
        "label": "Share-based Compensation Arrangement By Share-based Payment Award, Future Vesting Rights, Percentage",
        "terseLabel": "Future vesting rights, percentage"
       }
      }
     },
     "localname": "SharebasedCompensationArrangementBySharebasedPaymentAwardFutureVestingRightsPercentage",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationNarrativeDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "cdxs_SharebasedCompensationArrangementbySharebasedPaymentAwardEstimatedPerformanceGoalAchievementRate": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Share-based Compensation Arrangement by Share-based Payment Award, Estimated Performance Goal Achievement Rate",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Estimated Performance Goal Achievement Rate",
        "terseLabel": "Estimated performance goal achievement rate"
       }
      }
     },
     "localname": "SharebasedCompensationArrangementbySharebasedPaymentAwardEstimatedPerformanceGoalAchievementRate",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationNarrativeDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "cdxs_SharebasedCompensationArrangementbySharebasedPaymentAwardNonOptionEquityInstrumentsExercisedWeightedAverageGrantDateFairValue": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Share-based Compensation Arrangement by Share-based Payment Award, Non-Option Equity Instruments, Exercised, Weighted Average Grant Date Fair Value",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Non-Option Equity Instruments, Exercised, Weighted Average Grant Date Fair Value",
        "terseLabel": "Exercised (in dollars per share)"
       }
      }
     },
     "localname": "SharebasedCompensationArrangementbySharebasedPaymentAwardNonOptionEquityInstrumentsExercisedWeightedAverageGrantDateFairValue",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationAwardActivityDetails"
     ],
     "xbrltype": "perShareItemType"
    },
    "cdxs_SharebasedCompensationArrangementbySharebasedPaymentAwardPerformanceAwardsThresholdLevelNumberofSharesMultiplier": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Share-based Compensation Arrangement by Share-based Payment Award, Performance Awards, Threshold Level, Number of Shares, Multiplier",
        "label": "Share-based Compensation Arrangement by Share-based Payment Award, Performance Awards, Threshold Level, Number of Shares, Multiplier",
        "terseLabel": "Threshold level multiplier"
       }
      }
     },
     "localname": "SharebasedCompensationArrangementbySharebasedPaymentAwardPerformanceAwardsThresholdLevelNumberofSharesMultiplier",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationNarrativeDetails"
     ],
     "xbrltype": "pureItemType"
    },
    "cdxs_ShippingAndDistributionCost": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Shipping And Distribution Cost",
        "label": "Shipping And Distribution Cost",
        "terseLabel": "Shipping and distribution cost"
       }
      }
     },
     "localname": "ShippingAndDistributionCost",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesNarrativeDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "cdxs_SitagliptinEnzymeMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Sitagliptin Enzyme",
        "label": "Sitagliptin Enzyme [Member]",
        "terseLabel": "Sitagliptin Enzyme"
       }
      }
     },
     "localname": "SitagliptinEnzymeMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsMerckSitagliptinCatalystSupplyAgreementDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_StrategicCollaborationAgreementMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Strategic Collaboration Agreement [Member]",
        "label": "Strategic Collaboration Agreement [Member]",
        "terseLabel": "Strategic Collaboration Agreement"
       }
      }
     },
     "localname": "StrategicCollaborationAgreementMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsNestleGlobalDevelopmentAgreementDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_SupplyAgreementMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Supply Agreement [Member]",
        "label": "Supply Agreement [Member]",
        "terseLabel": "Supply Agreement"
       }
      }
     },
     "localname": "SupplyAgreementMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsEnzymeSupplyAgreementDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsMerckSitagliptinCatalystSupplyAgreementDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_TakedaPharmaceuticalCoLtdMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Takeda Pharmaceutical Co. Ltd.",
        "label": "Takeda Pharmaceutical Co. Ltd. [Member]",
        "terseLabel": "Takeda"
       }
      }
     },
     "localname": "TakedaPharmaceuticalCoLtdMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTakedaDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_TateLyleMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Tate &amp; Lyle [Member]",
        "label": "Tate &amp; Lyle [Member]",
        "terseLabel": "Tate &amp; Lyle"
       }
      }
     },
     "localname": "TateLyleMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTateLyleDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_TechnologyTransferCollaborationandLicenseAgreementMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Technology Transfer, Collaboration and License Agreement [Member]",
        "label": "Technology Transfer, Collaboration and License Agreement [Member]",
        "terseLabel": "Technology Transfer and License Agreement"
       }
      }
     },
     "localname": "TechnologyTransferCollaborationandLicenseAgreementMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsMerckPlatformTechnologyTransferandLicenseAgreementDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_TermLoanMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Term Loan [Member]",
        "label": "Term Loan [Member]",
        "terseLabel": "Term Loan"
       }
      }
     },
     "localname": "TermLoanMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesNarrativeDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_TermOfCollaborativeResearchAndDevelopmentAgreement": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Term of collaborative research and development agreement.",
        "label": "Term of Collaborative Research and Development Agreement",
        "terseLabel": "Term of collaborative research and development agreement"
       }
      }
     },
     "localname": "TermOfCollaborativeResearchAndDevelopmentAgreement",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsMerckSitagliptinCatalystSupplyAgreementDetails"
     ],
     "xbrltype": "durationItemType"
    },
    "cdxs_UnderwrittenPublicOfferingMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Underwritten Public Offering [Member]",
        "label": "Underwritten Public Offering [Member]",
        "terseLabel": "Underwritten Public Offering"
       }
      }
     },
     "localname": "UnderwrittenPublicOfferingMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CapitalStockDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "cdxs_UpFrontPaymentMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Up-front Payment",
        "label": "Up-front Payment [Member]",
        "terseLabel": "Up-front Payment"
       }
      }
     },
     "localname": "UpFrontPaymentMember",
     "nsuri": "http://www.codexis.com/20221231",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsTakedaDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "country_IN": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "INDIA",
        "terseLabel": "India"
       }
      }
     },
     "localname": "IN",
     "nsuri": "http://xbrl.sec.gov/country/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesNarrativeDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "country_US": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "UNITED STATES",
        "terseLabel": "United States"
       }
      }
     },
     "localname": "US",
     "nsuri": "http://xbrl.sec.gov/country/2022",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationRevenuesDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "dei_AmendmentFlag": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Boolean flag that is true when the XBRL content amends previously-filed or accepted submission.",
        "label": "Amendment Flag",
        "terseLabel": "Amendment Flag"
       }
      }
     },
     "localname": "AmendmentFlag",
     "nsuri": "http://xbrl.sec.gov/dei/2022",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "booleanItemType"
    },
    "dei_AuditorFirmId": {
     "auth_ref": [
      "r703",
      "r704",
      "r705"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "PCAOB issued Audit Firm Identifier",
        "label": "Auditor Firm ID",
        "terseLabel": "Auditor Firm ID"
       }
      }
     },
     "localname": "AuditorFirmId",
     "nsuri": "http://xbrl.sec.gov/dei/2022",
     "presentation": [
      "http://www.codexis.com/role/AuditInformation"
     ],
     "xbrltype": "nonemptySequenceNumberItemType"
    },
    "dei_AuditorLocation": {
     "auth_ref": [
      "r703",
      "r704",
      "r705"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Auditor Location",
        "terseLabel": "Auditor Location"
       }
      }
     },
     "localname": "AuditorLocation",
     "nsuri": "http://xbrl.sec.gov/dei/2022",
     "presentation": [
      "http://www.codexis.com/role/AuditInformation"
     ],
     "xbrltype": "internationalNameItemType"
    },
    "dei_AuditorName": {
     "auth_ref": [
      "r703",
      "r704",
      "r705"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Auditor Name",
        "terseLabel": "Auditor Name"
       }
      }
     },
     "localname": "AuditorName",
     "nsuri": "http://xbrl.sec.gov/dei/2022",
     "presentation": [
      "http://www.codexis.com/role/AuditInformation"
     ],
     "xbrltype": "internationalNameItemType"
    },
    "dei_CityAreaCode": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Area code of city",
        "label": "City Area Code",
        "terseLabel": "City Area Code"
       }
      }
     },
     "localname": "CityAreaCode",
     "nsuri": "http://xbrl.sec.gov/dei/2022",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "normalizedStringItemType"
    },
    "dei_CoverAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Cover page.",
        "label": "Cover [Abstract]"
       }
      }
     },
     "localname": "CoverAbstract",
     "nsuri": "http://xbrl.sec.gov/dei/2022",
     "xbrltype": "stringItemType"
    },
    "dei_CurrentFiscalYearEndDate": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "End date of current fiscal year in the format --MM-DD.",
        "label": "Current Fiscal Year End Date",
        "terseLabel": "Current Fiscal Year End Date"
       }
      }
     },
     "localname": "CurrentFiscalYearEndDate",
     "nsuri": "http://xbrl.sec.gov/dei/2022",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "gMonthDayItemType"
    },
    "dei_DocumentAnnualReport": {
     "auth_ref": [
      "r703",
      "r704",
      "r705"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Boolean flag that is true only for a form used as an annual report.",
        "label": "Document Annual Report",
        "terseLabel": "Document Annual Report"
       }
      }
     },
     "localname": "DocumentAnnualReport",
     "nsuri": "http://xbrl.sec.gov/dei/2022",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "booleanItemType"
    },
    "dei_DocumentFiscalPeriodFocus": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Fiscal period values are FY, Q1, Q2, and Q3.  1st, 2nd and 3rd quarter 10-Q or 10-QT statements have value Q1, Q2, and Q3 respectively, with 10-K, 10-KT or other fiscal year statements having FY.",
        "label": "Document Fiscal Period Focus",
        "terseLabel": "Document Fiscal Period Focus"
       }
      }
     },
     "localname": "DocumentFiscalPeriodFocus",
     "nsuri": "http://xbrl.sec.gov/dei/2022",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "fiscalPeriodItemType"
    },
    "dei_DocumentFiscalYearFocus": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "This is focus fiscal year of the document report in YYYY format. For a 2006 annual report, which may also provide financial information from prior periods, fiscal 2006 should be given as the fiscal year focus. Example: 2006.",
        "label": "Document Fiscal Year Focus",
        "terseLabel": "Document Fiscal Year Focus"
       }
      }
     },
     "localname": "DocumentFiscalYearFocus",
     "nsuri": "http://xbrl.sec.gov/dei/2022",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "gYearItemType"
    },
    "dei_DocumentPeriodEndDate": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "For the EDGAR submission types of Form 8-K: the date of the report, the date of the earliest event reported; for the EDGAR submission types of Form N-1A: the filing date; for all other submission types: the end of the reporting or transition period.  The format of the date is YYYY-MM-DD.",
        "label": "Document Period End Date",
        "terseLabel": "Document Period End Date"
       }
      }
     },
     "localname": "DocumentPeriodEndDate",
     "nsuri": "http://xbrl.sec.gov/dei/2022",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "dateItemType"
    },
    "dei_DocumentTransitionReport": {
     "auth_ref": [
      "r706"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Boolean flag that is true only for a form used as a transition report.",
        "label": "Document Transition Report",
        "terseLabel": "Document Transition Report"
       }
      }
     },
     "localname": "DocumentTransitionReport",
     "nsuri": "http://xbrl.sec.gov/dei/2022",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "booleanItemType"
    },
    "dei_DocumentType": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The type of document being provided (such as 10-K, 10-Q, 485BPOS, etc). The document type is limited to the same value as the supporting SEC submission type, or the word 'Other'.",
        "label": "Document Type",
        "terseLabel": "Document Type"
       }
      }
     },
     "localname": "DocumentType",
     "nsuri": "http://xbrl.sec.gov/dei/2022",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "submissionTypeItemType"
    },
    "dei_DocumentsIncorporatedByReferenceTextBlock": {
     "auth_ref": [
      "r701"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Documents incorporated by reference.",
        "label": "Documents Incorporated by Reference [Text Block]",
        "terseLabel": "Documents Incorporated by Reference"
       }
      }
     },
     "localname": "DocumentsIncorporatedByReferenceTextBlock",
     "nsuri": "http://xbrl.sec.gov/dei/2022",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "textBlockItemType"
    },
    "dei_EntityAddressAddressLine1": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Address Line 1 such as Attn, Building Name, Street Name",
        "label": "Entity Address, Address Line One",
        "terseLabel": "Entity Address, Address Line One"
       }
      }
     },
     "localname": "EntityAddressAddressLine1",
     "nsuri": "http://xbrl.sec.gov/dei/2022",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "normalizedStringItemType"
    },
    "dei_EntityAddressCityOrTown": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Name of the City or Town",
        "label": "Entity Address, City or Town",
        "terseLabel": "Entity Address, City or Town"
       }
      }
     },
     "localname": "EntityAddressCityOrTown",
     "nsuri": "http://xbrl.sec.gov/dei/2022",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "normalizedStringItemType"
    },
    "dei_EntityAddressPostalZipCode": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Code for the postal or zip code",
        "label": "Entity Address, Postal Zip Code",
        "terseLabel": "Entity Address, Postal Zip Code"
       }
      }
     },
     "localname": "EntityAddressPostalZipCode",
     "nsuri": "http://xbrl.sec.gov/dei/2022",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "normalizedStringItemType"
    },
    "dei_EntityAddressStateOrProvince": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Name of the state or province.",
        "label": "Entity Address, State or Province",
        "terseLabel": "Entity Address, State or Province"
       }
      }
     },
     "localname": "EntityAddressStateOrProvince",
     "nsuri": "http://xbrl.sec.gov/dei/2022",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "stateOrProvinceItemType"
    },
    "dei_EntityCentralIndexKey": {
     "auth_ref": [
      "r700"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "A unique 10-digit SEC-issued value to identify entities that have filed disclosures with the SEC. It is commonly abbreviated as CIK.",
        "label": "Entity Central Index Key",
        "terseLabel": "Entity Central Index Key"
       }
      }
     },
     "localname": "EntityCentralIndexKey",
     "nsuri": "http://xbrl.sec.gov/dei/2022",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "centralIndexKeyItemType"
    },
    "dei_EntityCommonStockSharesOutstanding": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Indicate number of shares or other units outstanding of each of registrant's classes of capital or common stock or other ownership interests, if and as stated on cover of related periodic report. Where multiple classes or units exist define each class/interest by adding class of stock items such as Common Class A [Member], Common Class B [Member] or Partnership Interest [Member] onto the Instrument [Domain] of the Entity Listings, Instrument.",
        "label": "Entity Common Stock, Shares Outstanding",
        "terseLabel": "Entity Common Stock, Shares Outstanding"
       }
      }
     },
     "localname": "EntityCommonStockSharesOutstanding",
     "nsuri": "http://xbrl.sec.gov/dei/2022",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "sharesItemType"
    },
    "dei_EntityCurrentReportingStatus": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Indicate 'Yes' or 'No' whether registrants (1) have filed all reports required to be filed by Section 13 or 15(d) of the Securities Exchange Act of 1934 during the preceding 12 months (or for such shorter period that registrants were required to file such reports), and (2) have been subject to such filing requirements for the past 90 days. This information should be based on the registrant's current or most recent filing containing the related disclosure.",
        "label": "Entity Current Reporting Status",
        "terseLabel": "Entity Current Reporting Status"
       }
      }
     },
     "localname": "EntityCurrentReportingStatus",
     "nsuri": "http://xbrl.sec.gov/dei/2022",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "yesNoItemType"
    },
    "dei_EntityDomain": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "All the names of the entities being reported upon in a document. Any legal structure used to conduct activities or to hold assets. Some examples of such structures are corporations, partnerships, limited liability companies, grantor trusts, and other trusts. This item does not include business and geographical segments which are included in the geographical or business segments domains.",
        "label": "Entity [Domain]",
        "terseLabel": "Entity [Domain]"
       }
      }
     },
     "localname": "EntityDomain",
     "nsuri": "http://xbrl.sec.gov/dei/2022",
     "presentation": [
      "http://www.codexis.com/role/CapitalStockDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "dei_EntityEmergingGrowthCompany": {
     "auth_ref": [
      "r700"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Indicate if registrant meets the emerging growth company criteria.",
        "label": "Entity Emerging Growth Company",
        "terseLabel": "Entity Emerging Growth Company"
       }
      }
     },
     "localname": "EntityEmergingGrowthCompany",
     "nsuri": "http://xbrl.sec.gov/dei/2022",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "booleanItemType"
    },
    "dei_EntityFileNumber": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Commission file number. The field allows up to 17 characters. The prefix may contain 1-3 digits, the sequence number may contain 1-8 digits, the optional suffix may contain 1-4 characters, and the fields are separated with a hyphen.",
        "label": "Entity File Number",
        "terseLabel": "Entity File Number"
       }
      }
     },
     "localname": "EntityFileNumber",
     "nsuri": "http://xbrl.sec.gov/dei/2022",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "fileNumberItemType"
    },
    "dei_EntityFilerCategory": {
     "auth_ref": [
      "r700"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Indicate whether the registrant is one of the following: Large Accelerated Filer, Accelerated Filer, Non-accelerated Filer. Definitions of these categories are stated in Rule 12b-2 of the Exchange Act. This information should be based on the registrant's current or most recent filing containing the related disclosure.",
        "label": "Entity Filer Category",
        "terseLabel": "Entity Filer Category"
       }
      }
     },
     "localname": "EntityFilerCategory",
     "nsuri": "http://xbrl.sec.gov/dei/2022",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "filerCategoryItemType"
    },
    "dei_EntityIncorporationStateCountryCode": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Two-character EDGAR code representing the state or country of incorporation.",
        "label": "Entity Incorporation, State or Country Code",
        "terseLabel": "Entity Incorporation, State or Country Code"
       }
      }
     },
     "localname": "EntityIncorporationStateCountryCode",
     "nsuri": "http://xbrl.sec.gov/dei/2022",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "edgarStateCountryItemType"
    },
    "dei_EntityInteractiveDataCurrent": {
     "auth_ref": [
      "r707"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Boolean flag that is true when the registrant has submitted electronically every Interactive Data File required to be submitted pursuant to Rule 405 of Regulation S-T during the preceding 12 months (or for such shorter period that the registrant was required to submit such files).",
        "label": "Entity Interactive Data Current",
        "terseLabel": "Entity Interactive Data Current"
       }
      }
     },
     "localname": "EntityInteractiveDataCurrent",
     "nsuri": "http://xbrl.sec.gov/dei/2022",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "yesNoItemType"
    },
    "dei_EntityPublicFloat": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The aggregate market value of the voting and non-voting common equity held by non-affiliates computed by reference to the price at which the common equity was last sold, or the average bid and asked price of such common equity, as of the last business day of the registrant's most recently completed second fiscal quarter.",
        "label": "Entity Public Float",
        "terseLabel": "Entity Public Float"
       }
      }
     },
     "localname": "EntityPublicFloat",
     "nsuri": "http://xbrl.sec.gov/dei/2022",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "monetaryItemType"
    },
    "dei_EntityRegistrantName": {
     "auth_ref": [
      "r700"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The exact name of the entity filing the report as specified in its charter, which is required by forms filed with the SEC.",
        "label": "Entity Registrant Name",
        "terseLabel": "Entity Registrant Name"
       }
      }
     },
     "localname": "EntityRegistrantName",
     "nsuri": "http://xbrl.sec.gov/dei/2022",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "normalizedStringItemType"
    },
    "dei_EntityShellCompany": {
     "auth_ref": [
      "r700"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Boolean flag that is true when the registrant is a shell company as defined in Rule 12b-2 of the Exchange Act.",
        "label": "Entity Shell Company",
        "terseLabel": "Entity Shell Company"
       }
      }
     },
     "localname": "EntityShellCompany",
     "nsuri": "http://xbrl.sec.gov/dei/2022",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "booleanItemType"
    },
    "dei_EntitySmallBusiness": {
     "auth_ref": [
      "r700"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Indicates that the company is a Smaller Reporting Company (SRC).",
        "label": "Entity Small Business",
        "terseLabel": "Entity Small Business"
       }
      }
     },
     "localname": "EntitySmallBusiness",
     "nsuri": "http://xbrl.sec.gov/dei/2022",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "booleanItemType"
    },
    "dei_EntityTaxIdentificationNumber": {
     "auth_ref": [
      "r700"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The Tax Identification Number (TIN), also known as an Employer Identification Number (EIN), is a unique 9-digit value assigned by the IRS.",
        "label": "Entity Tax Identification Number",
        "terseLabel": "Entity Tax Identification Number"
       }
      }
     },
     "localname": "EntityTaxIdentificationNumber",
     "nsuri": "http://xbrl.sec.gov/dei/2022",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "employerIdItemType"
    },
    "dei_EntityVoluntaryFilers": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Indicate 'Yes' or 'No' if the registrant is not required to file reports pursuant to Section 13 or Section 15(d) of the Act.",
        "label": "Entity Voluntary Filers",
        "terseLabel": "Entity Voluntary Filers"
       }
      }
     },
     "localname": "EntityVoluntaryFilers",
     "nsuri": "http://xbrl.sec.gov/dei/2022",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "yesNoItemType"
    },
    "dei_EntityWellKnownSeasonedIssuer": {
     "auth_ref": [
      "r708"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Indicate 'Yes' or 'No' if the registrant is a well-known seasoned issuer, as defined in Rule 405 of the Securities Act. Is used on Form Type: 10-K, 10-Q, 8-K, 20-F, 6-K, 10-K/A, 10-Q/A, 20-F/A, 6-K/A, N-CSR, N-Q, N-1A.",
        "label": "Entity Well-known Seasoned Issuer",
        "terseLabel": "Entity Well-known Seasoned Issuer"
       }
      }
     },
     "localname": "EntityWellKnownSeasonedIssuer",
     "nsuri": "http://xbrl.sec.gov/dei/2022",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "yesNoItemType"
    },
    "dei_IcfrAuditorAttestationFlag": {
     "auth_ref": [
      "r703",
      "r704",
      "r705"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "ICFR Auditor Attestation Flag",
        "terseLabel": "ICFR Auditor Attestation Flag"
       }
      }
     },
     "localname": "IcfrAuditorAttestationFlag",
     "nsuri": "http://xbrl.sec.gov/dei/2022",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "booleanItemType"
    },
    "dei_LegalEntityAxis": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The set of legal entities associated with a report.",
        "label": "Legal Entity [Axis]",
        "terseLabel": "Legal Entity [Axis]"
       }
      }
     },
     "localname": "LegalEntityAxis",
     "nsuri": "http://xbrl.sec.gov/dei/2022",
     "presentation": [
      "http://www.codexis.com/role/CapitalStockDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "dei_LocalPhoneNumber": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Local phone number for entity.",
        "label": "Local Phone Number",
        "terseLabel": "Local Phone Number"
       }
      }
     },
     "localname": "LocalPhoneNumber",
     "nsuri": "http://xbrl.sec.gov/dei/2022",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "normalizedStringItemType"
    },
    "dei_Security12bTitle": {
     "auth_ref": [
      "r699"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Title of a 12(b) registered security.",
        "label": "Title of 12(b) Security",
        "terseLabel": "Title of 12(b) Security"
       }
      }
     },
     "localname": "Security12bTitle",
     "nsuri": "http://xbrl.sec.gov/dei/2022",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "securityTitleItemType"
    },
    "dei_SecurityExchangeName": {
     "auth_ref": [
      "r702"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Name of the Exchange on which a security is registered.",
        "label": "Security Exchange Name",
        "terseLabel": "Security Exchange Name"
       }
      }
     },
     "localname": "SecurityExchangeName",
     "nsuri": "http://xbrl.sec.gov/dei/2022",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "edgarExchangeCodeItemType"
    },
    "dei_TradingSymbol": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Trading symbol of an instrument as listed on an exchange.",
        "label": "Trading Symbol",
        "terseLabel": "Trading Symbol"
       }
      }
     },
     "localname": "TradingSymbol",
     "nsuri": "http://xbrl.sec.gov/dei/2022",
     "presentation": [
      "http://www.codexis.com/role/CoverPage"
     ],
     "xbrltype": "tradingSymbolItemType"
    },
    "srt_AffiliatedEntityMember": {
     "auth_ref": [
      "r645",
      "r765",
      "r808",
      "r809",
      "r810"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Affiliated Entity [Member]",
        "terseLabel": "Affiliated Entity"
       }
      }
     },
     "localname": "AffiliatedEntityMember",
     "nsuri": "http://fasb.org/srt/2022",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsMolecularAssociatesIncDetails",
      "http://www.codexis.com/role/ConsolidatedBalanceSheetsParenthetical",
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlowsParenthetical",
      "http://www.codexis.com/role/ConsolidatedStatementsofOperationsParenthetical",
      "http://www.codexis.com/role/RelatedPartyTransactionsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_AmericasMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Americas [Member]",
        "terseLabel": "Americas"
       }
      }
     },
     "localname": "AmericasMember",
     "nsuri": "http://fasb.org/srt/2022",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionDisaggregationofRevenueDetails",
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationRevenuesDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_AsiaPacificMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Asia Pacific [Member]",
        "terseLabel": "APAC"
       }
      }
     },
     "localname": "AsiaPacificMember",
     "nsuri": "http://fasb.org/srt/2022",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionDisaggregationofRevenueDetails",
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationRevenuesDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_ConsolidationItemsAxis": {
     "auth_ref": [
      "r224",
      "r267",
      "r285",
      "r286",
      "r287",
      "r288",
      "r289",
      "r291",
      "r295",
      "r367",
      "r368",
      "r369",
      "r370",
      "r372",
      "r373",
      "r375",
      "r377",
      "r378",
      "r754",
      "r755"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Consolidation Items [Axis]",
        "terseLabel": "Consolidation Items [Axis]"
       }
      }
     },
     "localname": "ConsolidationItemsAxis",
     "nsuri": "http://fasb.org/srt/2022",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationGoodwillDetails",
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationSegmentReportingDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "srt_ConsolidationItemsDomain": {
     "auth_ref": [
      "r224",
      "r267",
      "r285",
      "r286",
      "r287",
      "r288",
      "r289",
      "r291",
      "r295",
      "r367",
      "r368",
      "r369",
      "r370",
      "r372",
      "r373",
      "r375",
      "r377",
      "r378",
      "r754",
      "r755"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Consolidation Items [Domain]",
        "terseLabel": "Consolidation Items [Domain]"
       }
      }
     },
     "localname": "ConsolidationItemsDomain",
     "nsuri": "http://fasb.org/srt/2022",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationGoodwillDetails",
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationSegmentReportingDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_CounterpartyNameAxis": {
     "auth_ref": [
      "r222",
      "r223",
      "r382",
      "r393",
      "r655",
      "r657"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Counterparty Name [Axis]",
        "terseLabel": "Counterparty Name [Axis]"
       }
      }
     },
     "localname": "CounterpartyNameAxis",
     "nsuri": "http://fasb.org/srt/2022",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsGSKPlatformTechnologyTransferCollaborationandLicenseAgreementDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsMerckPlatformTechnologyTransferandLicenseAgreementDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsMerckSitagliptinCatalystSupplyAgreementDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsMolecularAssociatesIncDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsNestleGlobalDevelopmentAgreementDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsNovartisDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsPfizerEnzymeSupplyAgreementDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsPortonDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsRocheDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsTakedaDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsTateLyleDetails",
      "http://www.codexis.com/role/RelatedPartyTransactionsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "srt_EquityMethodInvesteeNameDomain": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Investment, Name [Domain]",
        "terseLabel": "Investment, Name [Domain]"
       }
      }
     },
     "localname": "EquityMethodInvesteeNameDomain",
     "nsuri": "http://fasb.org/srt/2022",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsMolecularAssociatesIncDetails",
      "http://www.codexis.com/role/RelatedPartyTransactionsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_MajorCustomersAxis": {
     "auth_ref": [
      "r301",
      "r681",
      "r762",
      "r824"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Customer [Axis]",
        "terseLabel": "Customer [Axis]"
       }
      }
     },
     "localname": "MajorCustomersAxis",
     "nsuri": "http://fasb.org/srt/2022",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesNarrativeDetails",
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationConcentrationRiskDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "srt_MaximumMember": {
     "auth_ref": [
      "r363",
      "r364",
      "r365",
      "r366",
      "r455",
      "r592",
      "r617",
      "r647",
      "r648",
      "r676",
      "r689",
      "r698",
      "r756",
      "r813",
      "r814",
      "r815",
      "r816",
      "r817",
      "r818"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Maximum [Member]",
        "terseLabel": "Maximum"
       }
      }
     },
     "localname": "MaximumMember",
     "nsuri": "http://fasb.org/srt/2022",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesPropertyPlantandEquipmentDetails",
      "http://www.codexis.com/role/CapitalStockDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsGSKPlatformTechnologyTransferCollaborationandLicenseAgreementDetails",
      "http://www.codexis.com/role/RevenueRecognitionNarrativeDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_MinimumMember": {
     "auth_ref": [
      "r363",
      "r364",
      "r365",
      "r366",
      "r455",
      "r592",
      "r617",
      "r647",
      "r648",
      "r676",
      "r689",
      "r698",
      "r756",
      "r813",
      "r814",
      "r815",
      "r816",
      "r817",
      "r818"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Minimum [Member]",
        "terseLabel": "Minimum"
       }
      }
     },
     "localname": "MinimumMember",
     "nsuri": "http://fasb.org/srt/2022",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesPropertyPlantandEquipmentDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsGSKPlatformTechnologyTransferCollaborationandLicenseAgreementDetails",
      "http://www.codexis.com/role/RevenueRecognitionNarrativeDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_NameOfMajorCustomerDomain": {
     "auth_ref": [
      "r301",
      "r681",
      "r762",
      "r824"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Customer [Domain]",
        "terseLabel": "Customer [Domain]"
       }
      }
     },
     "localname": "NameOfMajorCustomerDomain",
     "nsuri": "http://fasb.org/srt/2022",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesNarrativeDetails",
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationConcentrationRiskDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_ProductOrServiceAxis": {
     "auth_ref": [
      "r297",
      "r595",
      "r679",
      "r696",
      "r751",
      "r752",
      "r762",
      "r823"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Product and Service [Axis]",
        "terseLabel": "Product and Service [Axis]"
       }
      }
     },
     "localname": "ProductOrServiceAxis",
     "nsuri": "http://fasb.org/srt/2022",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsGSKPlatformTechnologyTransferCollaborationandLicenseAgreementDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsMerckPlatformTechnologyTransferandLicenseAgreementDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsMerckSitagliptinCatalystSupplyAgreementDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsMolecularAssociatesIncDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsPfizerEnzymeSupplyAgreementDetails",
      "http://www.codexis.com/role/ConsolidatedStatementsofOperations",
      "http://www.codexis.com/role/ConsolidatedStatementsofOperationsParenthetical",
      "http://www.codexis.com/role/RelatedPartyTransactionsDetails",
      "http://www.codexis.com/role/RevenueRecognitionDisaggregationofRevenueDetails",
      "http://www.codexis.com/role/RevenueRecognitionPerformanceObligationDetails",
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationSegmentReportingDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "srt_ProductsAndServicesDomain": {
     "auth_ref": [
      "r297",
      "r595",
      "r679",
      "r696",
      "r751",
      "r752",
      "r762",
      "r823"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Product and Service [Domain]",
        "terseLabel": "Product and Service [Domain]"
       }
      }
     },
     "localname": "ProductsAndServicesDomain",
     "nsuri": "http://fasb.org/srt/2022",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsGSKPlatformTechnologyTransferCollaborationandLicenseAgreementDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsMerckPlatformTechnologyTransferandLicenseAgreementDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsMerckSitagliptinCatalystSupplyAgreementDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsMolecularAssociatesIncDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsPfizerEnzymeSupplyAgreementDetails",
      "http://www.codexis.com/role/ConsolidatedStatementsofOperations",
      "http://www.codexis.com/role/ConsolidatedStatementsofOperationsParenthetical",
      "http://www.codexis.com/role/RelatedPartyTransactionsDetails",
      "http://www.codexis.com/role/RevenueRecognitionDisaggregationofRevenueDetails",
      "http://www.codexis.com/role/RevenueRecognitionPerformanceObligationDetails",
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationSegmentReportingDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_RangeAxis": {
     "auth_ref": [
      "r363",
      "r364",
      "r365",
      "r366",
      "r436",
      "r455",
      "r487",
      "r488",
      "r489",
      "r591",
      "r592",
      "r617",
      "r647",
      "r648",
      "r676",
      "r689",
      "r698",
      "r747",
      "r756",
      "r814",
      "r815",
      "r816",
      "r817",
      "r818"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Statistical Measurement [Axis]",
        "terseLabel": "Range [Axis]"
       }
      }
     },
     "localname": "RangeAxis",
     "nsuri": "http://fasb.org/srt/2022",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesPropertyPlantandEquipmentDetails",
      "http://www.codexis.com/role/CapitalStockDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsGSKPlatformTechnologyTransferCollaborationandLicenseAgreementDetails",
      "http://www.codexis.com/role/RevenueRecognitionNarrativeDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "srt_RangeMember": {
     "auth_ref": [
      "r363",
      "r364",
      "r365",
      "r366",
      "r436",
      "r455",
      "r487",
      "r488",
      "r489",
      "r591",
      "r592",
      "r617",
      "r647",
      "r648",
      "r676",
      "r689",
      "r698",
      "r747",
      "r756",
      "r814",
      "r815",
      "r816",
      "r817",
      "r818"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Statistical Measurement [Domain]",
        "terseLabel": "Range [Domain]"
       }
      }
     },
     "localname": "RangeMember",
     "nsuri": "http://fasb.org/srt/2022",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesPropertyPlantandEquipmentDetails",
      "http://www.codexis.com/role/CapitalStockDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsGSKPlatformTechnologyTransferCollaborationandLicenseAgreementDetails",
      "http://www.codexis.com/role/RevenueRecognitionNarrativeDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_RealEstateAndAccumulatedDepreciationDescriptionOfPropertyAxis": {
     "auth_ref": [
      "r646",
      "r826",
      "r827",
      "r828",
      "r829",
      "r830",
      "r831",
      "r832",
      "r833"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Name of Property [Axis]",
        "terseLabel": "Name of Property [Axis]"
       }
      }
     },
     "localname": "RealEstateAndAccumulatedDepreciationDescriptionOfPropertyAxis",
     "nsuri": "http://fasb.org/srt/2022",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesNarrativeDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "srt_RealEstateAndAccumulatedDepreciationNameOfPropertyDomain": {
     "auth_ref": [
      "r646",
      "r826",
      "r827",
      "r828",
      "r829",
      "r830",
      "r831",
      "r832",
      "r833"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Name of Property [Domain]",
        "terseLabel": "Name of Property [Domain]"
       }
      }
     },
     "localname": "RealEstateAndAccumulatedDepreciationNameOfPropertyDomain",
     "nsuri": "http://fasb.org/srt/2022",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesNarrativeDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_RepurchaseAgreementCounterpartyNameDomain": {
     "auth_ref": [
      "r222",
      "r223",
      "r382",
      "r393",
      "r656",
      "r657"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Counterparty Name [Domain]",
        "terseLabel": "Counterparty Name [Domain]"
       }
      }
     },
     "localname": "RepurchaseAgreementCounterpartyNameDomain",
     "nsuri": "http://fasb.org/srt/2022",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsGSKPlatformTechnologyTransferCollaborationandLicenseAgreementDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsMerckPlatformTechnologyTransferandLicenseAgreementDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsMerckSitagliptinCatalystSupplyAgreementDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsMolecularAssociatesIncDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsNestleGlobalDevelopmentAgreementDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsNovartisDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsPfizerEnzymeSupplyAgreementDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsPortonDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsRocheDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsTakedaDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsTateLyleDetails",
      "http://www.codexis.com/role/RelatedPartyTransactionsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_ScenarioForecastMember": {
     "auth_ref": [
      "r456",
      "r731"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Forecast [Member]",
        "terseLabel": "Forecast"
       }
      }
     },
     "localname": "ScenarioForecastMember",
     "nsuri": "http://fasb.org/srt/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationNarrativeDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_ScenarioUnspecifiedDomain": {
     "auth_ref": [
      "r238",
      "r456",
      "r710",
      "r731"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Scenario [Domain]",
        "terseLabel": "Scenario [Domain]"
       }
      }
     },
     "localname": "ScenarioUnspecifiedDomain",
     "nsuri": "http://fasb.org/srt/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationNarrativeDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_ScheduleOfEquityMethodInvestmentEquityMethodInvesteeNameAxis": {
     "auth_ref": [
      "r311"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Investment, Name [Axis]",
        "terseLabel": "Investment, Name [Axis]"
       }
      }
     },
     "localname": "ScheduleOfEquityMethodInvestmentEquityMethodInvesteeNameAxis",
     "nsuri": "http://fasb.org/srt/2022",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsMolecularAssociatesIncDetails",
      "http://www.codexis.com/role/RelatedPartyTransactionsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "srt_SegmentGeographicalDomain": {
     "auth_ref": [
      "r298",
      "r299",
      "r636",
      "r637",
      "r638",
      "r639",
      "r640",
      "r641",
      "r642",
      "r643",
      "r644",
      "r680",
      "r697",
      "r762"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Geographical [Domain]",
        "terseLabel": "Geographical [Domain]"
       }
      }
     },
     "localname": "SegmentGeographicalDomain",
     "nsuri": "http://fasb.org/srt/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesNarrativeDetails",
      "http://www.codexis.com/role/RevenueRecognitionDisaggregationofRevenueDetails",
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationRevenuesDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "srt_StatementGeographicalAxis": {
     "auth_ref": [
      "r298",
      "r299",
      "r630",
      "r636",
      "r637",
      "r638",
      "r639",
      "r640",
      "r641",
      "r642",
      "r643",
      "r644",
      "r680",
      "r697",
      "r762"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Geographical [Axis]",
        "terseLabel": "Geographical [Axis]"
       }
      }
     },
     "localname": "StatementGeographicalAxis",
     "nsuri": "http://fasb.org/srt/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesNarrativeDetails",
      "http://www.codexis.com/role/RevenueRecognitionDisaggregationofRevenueDetails",
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationRevenuesDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "srt_StatementScenarioAxis": {
     "auth_ref": [
      "r238",
      "r456",
      "r710",
      "r711",
      "r731"
     ],
     "lang": {
      "en-us": {
       "role": {
        "label": "Scenario [Axis]",
        "terseLabel": "Scenario [Axis]"
       }
      }
     },
     "localname": "StatementScenarioAxis",
     "nsuri": "http://fasb.org/srt/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationNarrativeDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_AccountingPoliciesAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Accounting Policies [Abstract]",
        "terseLabel": "Accounting Policies [Abstract]"
       }
      }
     },
     "localname": "AccountingPoliciesAbstract",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "xbrltype": "stringItemType"
    },
    "us-gaap_AccountsAndOtherReceivablesNetCurrent": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount, after allowance, receivable from customers, clients, or other third-parties, and receivables classified as other due within one year or the normal operating cycle, if longer.",
        "label": "Accounts and Other Receivables, Net, Current",
        "terseLabel": "Accounts and other receivables, net, current"
       }
      }
     },
     "localname": "AccountsAndOtherReceivablesNetCurrent",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsPfizerEnzymeSupplyAgreementDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AccountsNotesAndLoansReceivableNetCurrent": {
     "auth_ref": [
      "r303",
      "r614",
      "r663"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedBalanceSheets": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      },
      "http://www.codexis.com/role/ConsolidatedBalanceSheetsParenthetical": {
       "order": 4.0,
       "parentTag": "us-gaap_AssetsCurrent",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount, after allowance for credit loss, of accounts and financing receivables, classified as current. Includes, but is not limited to, notes and loan receivable.",
        "label": "Accounts and Financing Receivable, after Allowance for Credit Loss, Current",
        "totalLabel": "Total financial assets, net"
       }
      }
     },
     "localname": "AccountsNotesAndLoansReceivableNetCurrent",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AccountsPayableCurrent": {
     "auth_ref": [
      "r16",
      "r695"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedBalanceSheets": {
       "order": 1.0,
       "parentTag": "us-gaap_LiabilitiesCurrent",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Carrying value as of the balance sheet date of liabilities incurred (and for which invoices have typically been received) and payable to vendors for goods and services received that are used in an entity's business. Used to reflect the current portion of the liabilities (due within one year or within the normal operating cycle if longer).",
        "label": "Accounts Payable, Current",
        "verboseLabel": "Accounts payable"
       }
      }
     },
     "localname": "AccountsPayableCurrent",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AccountsReceivableGross": {
     "auth_ref": [
      "r196",
      "r303"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount, before allowance for credit loss, of right to consideration from customer for product sold and service rendered in normal course of business.",
        "label": "Accounts Receivable, before Allowance for Credit Loss",
        "terseLabel": "Accounts receivable, before allowance for credit loss"
       }
      }
     },
     "localname": "AccountsReceivableGross",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/AllowanceforCreditLossesSummaryofAccountsReceivablebyAgingCategoryDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AccountsReceivableMember": {
     "auth_ref": [
      "r632"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Due from customers or clients for goods or services that have been delivered or sold.",
        "label": "Accounts Receivable [Member]",
        "terseLabel": "Accounts Receivable"
       }
      }
     },
     "localname": "AccountsReceivableMember",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesNarrativeDetails",
      "http://www.codexis.com/role/RevenueRecognitionNarrativeDetails",
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationConcentrationRiskDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_AccountsReceivableNetCurrent": {
     "auth_ref": [
      "r303",
      "r304"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedBalanceSheets": {
       "order": 1.0,
       "parentTag": "us-gaap_NotesReceivableGross",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount, after allowance for credit loss, of right to consideration from customer for product sold and service rendered in normal course of business, classified as current.",
        "label": "Accounts Receivable, after Allowance for Credit Loss, Current",
        "verboseLabel": "Accounts receivable"
       }
      }
     },
     "localname": "AccountsReceivableNetCurrent",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AccruedLiabilitiesCurrent": {
     "auth_ref": [
      "r19"
     ],
     "calculation": {
      "http://www.codexis.com/role/BalanceSheetDetailsOtherAccruedLiabilitiesDetails": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      },
      "http://www.codexis.com/role/ConsolidatedBalanceSheets": {
       "order": 3.0,
       "parentTag": "us-gaap_LiabilitiesCurrent",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Carrying value as of the balance sheet date of obligations incurred and payable, pertaining to costs that are statutory in nature, are incurred on contractual obligations, or accumulate over time and for which invoices have not yet been received or will not be rendered. Examples include taxes, interest, rent and utilities. Used to reflect the current portion of the liabilities (due within one year or within the normal operating cycle if longer).",
        "label": "Accrued Liabilities, Current",
        "totalLabel": "Total other accrued liabilities",
        "verboseLabel": "Other accrued liabilities"
       }
      }
     },
     "localname": "AccruedLiabilitiesCurrent",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetDetailsOtherAccruedLiabilitiesDetails",
      "http://www.codexis.com/role/ConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AccruedProfessionalFeesCurrentAndNoncurrent": {
     "auth_ref": [
      "r159",
      "r173"
     ],
     "calculation": {
      "http://www.codexis.com/role/BalanceSheetDetailsOtherAccruedLiabilitiesDetails": {
       "order": 2.0,
       "parentTag": "us-gaap_AccruedLiabilitiesCurrent",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Carrying value as of the balance sheet date of obligations incurred through that date and payable for professional fees, such as for legal and accounting services received.",
        "label": "Accrued Professional Fees",
        "terseLabel": "Accrued professional and outside service fees"
       }
      }
     },
     "localname": "AccruedProfessionalFeesCurrentAndNoncurrent",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetDetailsOtherAccruedLiabilitiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment": {
     "auth_ref": [
      "r85",
      "r189"
     ],
     "calculation": {
      "http://www.codexis.com/role/BalanceSheetDetailsPropertyandEquipmentnetDetails": {
       "order": 2.0,
       "parentTag": "us-gaap_PropertyPlantAndEquipmentNet",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of accumulated depreciation, depletion and amortization for physical assets used in the normal conduct of business to produce goods and services.",
        "label": "Accumulated Depreciation, Depletion and Amortization, Property, Plant, and Equipment",
        "negatedTerseLabel": "Less: accumulated depreciation and amortization"
       }
      }
     },
     "localname": "AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetDetailsPropertyandEquipmentnetDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AdditionalPaidInCapital": {
     "auth_ref": [
      "r7",
      "r695"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedBalanceSheets": {
       "order": 3.0,
       "parentTag": "us-gaap_StockholdersEquity",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of excess of issue price over par or stated value of stock and from other transaction involving stock or stockholder. Includes, but is not limited to, additional paid-in capital (APIC) for common and preferred stock.",
        "label": "Additional Paid in Capital",
        "verboseLabel": "Additional paid-in capital"
       }
      }
     },
     "localname": "AdditionalPaidInCapital",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AdditionalPaidInCapitalMember": {
     "auth_ref": [
      "r496",
      "r497",
      "r498",
      "r728",
      "r729",
      "r730",
      "r802"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Excess of issue price over par or stated value of the entity's capital stock and amounts received from other transactions involving the entity's stock or stockholders.",
        "label": "Additional Paid-in Capital [Member]",
        "terseLabel": "Additional Paid-in Capital"
       }
      }
     },
     "localname": "AdditionalPaidInCapitalMember",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofStockholdersEquity"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_AdjustmentsRelatedToTaxWithholdingForShareBasedCompensation": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of decrease to equity for grantee's tax withholding obligation for award under share-based payment arrangement.",
        "label": "Share-Based Payment Arrangement, Decrease for Tax Withholding Obligation",
        "negatedTerseLabel": "Taxes paid related to net share settlement of equity awards"
       }
      }
     },
     "localname": "AdjustmentsRelatedToTaxWithholdingForShareBasedCompensation",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofStockholdersEquity"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue": {
     "auth_ref": [
      "r118",
      "r119",
      "r459"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of increase to additional paid-in capital (APIC) for recognition of cost for award under share-based payment arrangement.",
        "label": "APIC, Share-Based Payment Arrangement, Increase for Cost Recognition",
        "terseLabel": "Employee stock-based compensation"
       }
      }
     },
     "localname": "AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofStockholdersEquity"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AdjustmentsToReconcileNetIncomeLossToCashProvidedByUsedInOperatingActivitiesAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Adjustments to Reconcile Net Income (Loss) to Cash Provided by (Used in) Operating Activities [Abstract]",
        "verboseLabel": "Adjustments to reconcile net loss to net cash provided by (used in) operating activities:"
       }
      }
     },
     "localname": "AdjustmentsToReconcileNetIncomeLossToCashProvidedByUsedInOperatingActivitiesAbstract",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_AdvertisingCostsPolicyTextBlock": {
     "auth_ref": [
      "r501"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Disclosure of accounting policy for advertising cost.",
        "label": "Advertising Cost [Policy Text Block]",
        "terseLabel": "Advertising"
       }
      }
     },
     "localname": "AdvertisingCostsPolicyTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesPolicies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_AdvertisingExpense": {
     "auth_ref": [
      "r502"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount charged to advertising expense for the period, which are expenses incurred with the objective of increasing revenue for a specified brand, product or product line.",
        "label": "Advertising Expense",
        "terseLabel": "Advertising expense"
       }
      }
     },
     "localname": "AdvertisingExpense",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesNarrativeDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AllocatedShareBasedCompensationExpense": {
     "auth_ref": [
      "r491"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of expense for award under share-based payment arrangement. Excludes amount capitalized.",
        "label": "Share-Based Payment Arrangement, Expense",
        "terseLabel": "Share-based payment arrangement, expense"
       }
      }
     },
     "localname": "AllocatedShareBasedCompensationExpense",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationNarrativeDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AllowanceForCreditLossesOnFinancingReceivablesTableTextBlock": {
     "auth_ref": [
      "r72",
      "r743"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Tabular disclosure of allowance for credit loss on financing receivable.",
        "label": "Financing Receivable, Allowance for Credit Loss [Table Text Block]",
        "terseLabel": "Analysis of Allowance for Credit Losses"
       }
      }
     },
     "localname": "AllowanceForCreditLossesOnFinancingReceivablesTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/AllowanceforCreditLossesTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_AllowanceForNotesAndLoansReceivableCurrent": {
     "auth_ref": [
      "r199",
      "r305",
      "r315"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedBalanceSheets": {
       "order": 2.0,
       "parentTag": "us-gaap_AccountsNotesAndLoansReceivableNetCurrent",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of allowance for credit loss on financing receivable, classified as current.",
        "label": "Financing Receivable, Allowance for Credit Loss, Current",
        "negatedTerseLabel": "Less: allowances",
        "periodEndLabel": "Balance at end of period",
        "periodStartLabel": "Balance at beginning of period"
       }
      }
     },
     "localname": "AllowanceForNotesAndLoansReceivableCurrent",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/AllowanceforCreditLossesAnalysisofAllowanceforCreditLossesDetails",
      "http://www.codexis.com/role/ConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount": {
     "auth_ref": [
      "r247"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Securities (including those issuable pursuant to contingent stock agreements) that could potentially dilute basic earnings per share (EPS) or earnings per unit (EPU) in the future that were not included in the computation of diluted EPS or EPU because to do so would increase EPS or EPU amounts or decrease loss per share or unit amounts for the period presented.",
        "label": "Antidilutive Securities Excluded from Computation of Earnings Per Share, Amount",
        "terseLabel": "Total shares excluded as anti-dilutive (in shares)"
       }
      }
     },
     "localname": "AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/NetLossperShareDetails"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis": {
     "auth_ref": [
      "r55"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Information by type of antidilutive security.",
        "label": "Antidilutive Securities [Axis]",
        "terseLabel": "Antidilutive Securities [Axis]"
       }
      }
     },
     "localname": "AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/NetLossperShareDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table.",
        "label": "Antidilutive Securities Excluded from Computation of Earnings Per Share [Line Items]",
        "terseLabel": "Antidilutive Securities Excluded from Computation of Earnings Per Share [Line Items]"
       }
      }
     },
     "localname": "AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/NetLossperShareDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_AntidilutiveSecuritiesNameDomain": {
     "auth_ref": [
      "r55"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Incremental common shares attributable to securities that were not included in diluted earnings per share (EPS) because to do so would increase EPS amounts or decrease loss per share amounts for the period presented.",
        "label": "Antidilutive Securities, Name [Domain]",
        "terseLabel": "Antidilutive Securities, Name [Domain]"
       }
      }
     },
     "localname": "AntidilutiveSecuritiesNameDomain",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/NetLossperShareDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_AreaOfRealEstateProperty": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Area of a real estate property.",
        "label": "Area of Real Estate Property",
        "terseLabel": "Area of real estate property (in square feet)"
       }
      }
     },
     "localname": "AreaOfRealEstateProperty",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesNarrativeDetails"
     ],
     "xbrltype": "areaItemType"
    },
    "us-gaap_ArrangementsAndNonarrangementTransactionsMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Collaborative arrangement and arrangement other than collaborative applicable to revenue-generating activity or operations.",
        "label": "Collaborative Arrangement and Arrangement Other than Collaborative [Domain]",
        "terseLabel": "Arrangements and Non-arrangement Transactions [Domain]"
       }
      }
     },
     "localname": "ArrangementsAndNonarrangementTransactionsMember",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsEnzymeSupplyAgreementDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsMerckPlatformTechnologyTransferandLicenseAgreementDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsMerckSitagliptinCatalystSupplyAgreementDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsNestleGlobalDevelopmentAgreementDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsTateLyleDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_AssetRetirementObligation": {
     "auth_ref": [
      "r346",
      "r347"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The carrying amount of a liability for an asset retirement obligation. An asset retirement obligation is a legal obligation associated with the disposal or retirement of a tangible long-lived asset that results from the acquisition, construction or development, or the normal operations of a long-lived asset, except for certain obligations of lessees.",
        "label": "Asset Retirement Obligation",
        "terseLabel": "Asset retirement obligation"
       }
      }
     },
     "localname": "AssetRetirementObligation",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesNarrativeDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_Assets": {
     "auth_ref": [
      "r154",
      "r166",
      "r192",
      "r218",
      "r275",
      "r287",
      "r293",
      "r313",
      "r367",
      "r368",
      "r370",
      "r371",
      "r372",
      "r374",
      "r376",
      "r378",
      "r379",
      "r541",
      "r543",
      "r552",
      "r695",
      "r754",
      "r755",
      "r811"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedBalanceSheets": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Sum of the carrying amounts as of the balance sheet date of all assets that are recognized. Assets are probable future economic benefits obtained or controlled by an entity as a result of past transactions or events.",
        "label": "Assets",
        "totalLabel": "Total assets"
       }
      }
     },
     "localname": "Assets",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AssetsAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Assets [Abstract]",
        "verboseLabel": "Assets"
       }
      }
     },
     "localname": "AssetsAbstract",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedBalanceSheets"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_AssetsCurrent": {
     "auth_ref": [
      "r184",
      "r202",
      "r218",
      "r313",
      "r367",
      "r368",
      "r370",
      "r371",
      "r372",
      "r374",
      "r376",
      "r378",
      "r379",
      "r541",
      "r543",
      "r552",
      "r695",
      "r754",
      "r755",
      "r811"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedBalanceSheets": {
       "order": 1.0,
       "parentTag": "us-gaap_Assets",
       "weight": 1.0
      },
      "http://www.codexis.com/role/ConsolidatedBalanceSheetsParenthetical": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Sum of the carrying amounts as of the balance sheet date of all assets that are expected to be realized in cash, sold, or consumed within one year (or the normal operating cycle, if longer). Assets are probable future economic benefits obtained or controlled by an entity as a result of past transactions or events.",
        "label": "Assets, Current",
        "totalLabel": "Total current assets"
       }
      }
     },
     "localname": "AssetsCurrent",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AssetsCurrentAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Assets, Current [Abstract]",
        "verboseLabel": "Current assets:"
       }
      }
     },
     "localname": "AssetsCurrentAbstract",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedBalanceSheets"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_AvailableForSaleDebtSecuritiesGrossUnrealizedLoss": {
     "auth_ref": [
      "r78"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of unrealized loss on investment in debt security measured at fair value with change in fair value recognized in other comprehensive income (available-for-sale).",
        "label": "Debt Securities, Available-for-Sale, Unrealized Loss",
        "terseLabel": "Credit losses"
       }
      }
     },
     "localname": "AvailableForSaleDebtSecuritiesGrossUnrealizedLoss",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/FairValueMeasurementsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AvailableForSaleSecuritiesDebtSecurities": {
     "auth_ref": [
      "r77",
      "r308",
      "r324",
      "r609"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of investment in debt security measured at fair value with change in fair value recognized in other comprehensive income (available-for-sale).",
        "label": "Debt Securities, Available-for-Sale",
        "terseLabel": "Available-for-sale non-marketable interest-bearing debt securities"
       }
      }
     },
     "localname": "AvailableForSaleSecuritiesDebtSecurities",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/InvestmentsinNonMarketableSecuritiesNarrativeDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_AwardTypeAxis": {
     "auth_ref": [
      "r462",
      "r463",
      "r464",
      "r466",
      "r467",
      "r468",
      "r469",
      "r470",
      "r471",
      "r472",
      "r473",
      "r474",
      "r475",
      "r476",
      "r477",
      "r478",
      "r479",
      "r480",
      "r481",
      "r482",
      "r483",
      "r486",
      "r487",
      "r488",
      "r489",
      "r490"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Information by type of award under share-based payment arrangement.",
        "label": "Award Type [Axis]",
        "terseLabel": "Award Type [Axis]"
       }
      }
     },
     "localname": "AwardTypeAxis",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationAssumptionsUsedDetails",
      "http://www.codexis.com/role/StockbasedCompensationAwardActivityDetails",
      "http://www.codexis.com/role/StockbasedCompensationNarrativeDetails",
      "http://www.codexis.com/role/StockbasedCompensationStockBasedCompensationExpenseDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_BalanceSheetRelatedDisclosuresAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Balance Sheet Related Disclosures [Abstract]",
        "terseLabel": "Balance Sheet [Abstract]"
       }
      }
     },
     "localname": "BalanceSheetRelatedDisclosuresAbstract",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "xbrltype": "stringItemType"
    },
    "us-gaap_BasisOfAccountingPolicyPolicyTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Disclosure of accounting policy for basis of accounting, or basis of presentation, used to prepare the financial statements (for example, US Generally Accepted Accounting Principles, Other Comprehensive Basis of Accounting, IFRS).",
        "label": "Basis of Accounting, Policy [Policy Text Block]",
        "verboseLabel": "Basis of Presentation and Principles of Consolidation"
       }
      }
     },
     "localname": "BasisOfAccountingPolicyPolicyTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesPolicies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_CapitalExpendituresIncurredButNotYetPaid": {
     "auth_ref": [
      "r49",
      "r50",
      "r51"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Future cash outflow to pay for purchases of fixed assets that have occurred.",
        "label": "Capital Expenditures Incurred but Not yet Paid",
        "terseLabel": "Capital expenditures incurred but not yet paid"
       }
      }
     },
     "localname": "CapitalExpendituresIncurredButNotYetPaid",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CapitalizedContractCostNetCurrent": {
     "auth_ref": [
      "r331"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount, after accumulated amortization and accumulated impairment loss, of asset recognized from cost incurred to obtain or fulfill contract with customer; classified as current.",
        "label": "Capitalized Contract Cost, Net, Current",
        "terseLabel": "Contract costs"
       }
      }
     },
     "localname": "CapitalizedContractCostNetCurrent",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionContractswithCustomerDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CapitalizedCostsOfUnprovedPropertiesExcludedFromAmortizationByPropertyOrProjectAxis": {
     "auth_ref": [
      "r147",
      "r148",
      "r149"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Information by project.",
        "label": "Project [Axis]",
        "terseLabel": "Project [Axis]"
       }
      }
     },
     "localname": "CapitalizedCostsOfUnprovedPropertiesExcludedFromAmortizationByPropertyOrProjectAxis",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsNestleGlobalDevelopmentAgreementDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_Cash": {
     "auth_ref": [
      "r624",
      "r625",
      "r695",
      "r712"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of currency on hand as well as demand deposits with banks or financial institutions. Includes other kinds of accounts that have the general characteristics of demand deposits. Excludes cash and cash equivalents within disposal group and discontinued operation.",
        "label": "Cash",
        "terseLabel": "Cash"
       }
      }
     },
     "localname": "Cash",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetDetailsCashandCashEquivalentsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CashAndCashEquivalentsAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Cash and Cash Equivalents [Abstract]"
       }
      }
     },
     "localname": "CashAndCashEquivalentsAbstract",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "xbrltype": "stringItemType"
    },
    "us-gaap_CashAndCashEquivalentsAtCarryingValue": {
     "auth_ref": [
      "r46",
      "r187",
      "r653"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedBalanceSheetsParenthetical": {
       "order": 1.0,
       "parentTag": "us-gaap_AssetsCurrent",
       "weight": 1.0
      },
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows": {
       "order": 1.0,
       "parentTag": "us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of currency on hand as well as demand deposits with banks or financial institutions. Includes other kinds of accounts that have the general characteristics of demand deposits. Also includes short-term, highly liquid investments that are both readily convertible to known amounts of cash and so near their maturity that they present insignificant risk of changes in value because of changes in interest rates. Excludes cash and cash equivalents within disposal group and discontinued operation.",
        "label": "Cash and Cash Equivalents, at Carrying Value",
        "terseLabel": "Adjusted Cost",
        "verboseLabel": "Cash and cash equivalents"
       }
      }
     },
     "localname": "CashAndCashEquivalentsAtCarryingValue",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetDetailsCashandCashEquivalentsDetails",
      "http://www.codexis.com/role/ConsolidatedBalanceSheets",
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CashAndCashEquivalentsAxis": {
     "auth_ref": [
      "r187"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Information by type of cash and cash equivalent balance.",
        "label": "Cash and Cash Equivalents [Axis]",
        "terseLabel": "Cash and Cash Equivalents [Axis]"
       }
      }
     },
     "localname": "CashAndCashEquivalentsAxis",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetDetailsCashandCashEquivalentsDetails",
      "http://www.codexis.com/role/FairValueMeasurementsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_CashAndCashEquivalentsFairValueDisclosure": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Fair value portion of currency on hand as well as demand deposits with banks or financial institutions. Includes other kinds of accounts that have the general characteristics of demand deposits. Also includes short-term, highly liquid investments that are both readily convertible to known amounts of cash and so near their maturity that they present insignificant risk of changes in value because of changes in interest rates.",
        "label": "Cash and Cash Equivalents, Fair Value Disclosure",
        "terseLabel": "Estimated Fair Value",
        "verboseLabel": "Money market funds"
       }
      }
     },
     "localname": "CashAndCashEquivalentsFairValueDisclosure",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetDetailsCashandCashEquivalentsDetails",
      "http://www.codexis.com/role/FairValueMeasurementsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CashAndCashEquivalentsLineItems": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table.",
        "label": "Cash and Cash Equivalents [Line Items]",
        "terseLabel": "Cash and Cash Equivalents [Line Items]"
       }
      }
     },
     "localname": "CashAndCashEquivalentsLineItems",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetDetailsCashandCashEquivalentsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_CashAndCashEquivalentsRestrictedCashAndCashEquivalentsPolicy": {
     "auth_ref": [
      "r47",
      "r153"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Entity's cash and cash equivalents accounting policy with respect to restricted balances. Restrictions may include legally restricted deposits held as compensating balances against short-term borrowing arrangements, contracts entered into with others, or company statements of intention with regard to particular deposits; however, time deposits and short-term certificates of deposit are not generally included in legally restricted deposits.",
        "label": "Cash and Cash Equivalents, Restricted Cash and Cash Equivalents, Policy [Policy Text Block]",
        "verboseLabel": "Restricted Cash"
       }
      }
     },
     "localname": "CashAndCashEquivalentsRestrictedCashAndCashEquivalentsPolicy",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesPolicies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_CashAndCashEquivalentsUnrestrictedCashAndCashEquivalentsPolicy": {
     "auth_ref": [
      "r47"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Disclosure of accounting policy for cash and cash equivalents with respect to unrestricted balances.",
        "label": "Cash and Cash Equivalents, Unrestricted Cash and Cash Equivalents, Policy [Policy Text Block]",
        "verboseLabel": "Cash and Cash Equivalents"
       }
      }
     },
     "localname": "CashAndCashEquivalentsUnrestrictedCashAndCashEquivalentsPolicy",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesPolicies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents": {
     "auth_ref": [
      "r40",
      "r46",
      "r52"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of cash and cash equivalents, and cash and cash equivalents restricted to withdrawal or usage. Excludes amount for disposal group and discontinued operations. Cash includes, but is not limited to, currency on hand, demand deposits with banks or financial institutions, and other accounts with general characteristics of demand deposits. Cash equivalents include, but are not limited to, short-term, highly liquid investments that are both readily convertible to known amounts of cash and so near their maturity that they present insignificant risk of changes in value because of changes in interest rates.",
        "label": "Cash, Cash Equivalents, Restricted Cash, and Restricted Cash Equivalents",
        "periodEndLabel": "Cash, cash equivalents and restricted cash at the end of the year",
        "periodStartLabel": "Cash, cash equivalents and restricted cash at the beginning of the year",
        "totalLabel": "Total cash, cash equivalents and restricted cash at the end of the period"
       }
      }
     },
     "localname": "CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect": {
     "auth_ref": [
      "r40",
      "r143"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of increase (decrease) in cash, cash equivalents, and cash and cash equivalents restricted to withdrawal or usage; including effect from exchange rate change. Cash includes, but is not limited to, currency on hand, demand deposits with banks or financial institutions, and other accounts with general characteristics of demand deposits. Cash equivalents include, but are not limited to, short-term, highly liquid investments that are both readily convertible to known amounts of cash and so near their maturity that they present insignificant risk of changes in value because of changes in interest rates.",
        "label": "Cash, Cash Equivalents, Restricted Cash, and Restricted Cash Equivalents, Period Increase (Decrease), Including Exchange Rate Effect",
        "totalLabel": "Net increase (decrease) in cash, cash equivalents and restricted cash"
       }
      }
     },
     "localname": "CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ChangeInContractWithCustomerAssetAndLiabilityAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Change in Contract with Customer, Asset and Liability [Abstract]",
        "terseLabel": "Amounts included in contract liabilities at the beginning of the period:"
       }
      }
     },
     "localname": "ChangeInContractWithCustomerAssetAndLiabilityAbstract",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionRevenueRecognizedDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ChangeInContractWithCustomerLiabilityAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Change in Contract with Customer, Liability [Abstract]",
        "terseLabel": "Changes in the period:"
       }
      }
     },
     "localname": "ChangeInContractWithCustomerLiabilityAbstract",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionRevenueRecognizedDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ClassOfStockDomain": {
     "auth_ref": [
      "r193",
      "r194",
      "r195",
      "r218",
      "r241",
      "r242",
      "r244",
      "r246",
      "r254",
      "r255",
      "r313",
      "r367",
      "r370",
      "r371",
      "r372",
      "r378",
      "r379",
      "r391",
      "r392",
      "r395",
      "r399",
      "r406",
      "r552",
      "r649",
      "r709",
      "r724",
      "r732"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Share of stock differentiated by the voting rights the holder receives. Examples include, but are not limited to, common stock, redeemable preferred stock, nonredeemable preferred stock, and convertible stock.",
        "label": "Class of Stock [Domain]",
        "terseLabel": "Class of Stock [Domain]"
       }
      }
     },
     "localname": "ClassOfStockDomain",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsMolecularAssociatesIncDetails",
      "http://www.codexis.com/role/InvestmentsinNonMarketableSecuritiesNarrativeDetails",
      "http://www.codexis.com/role/RelatedPartyTransactionsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_ClassOfStockLineItems": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table.",
        "label": "Class of Stock [Line Items]",
        "terseLabel": "Class of Stock [Line Items]"
       }
      }
     },
     "localname": "ClassOfStockLineItems",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CapitalStockDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_CollaborativeArrangementDisclosureTextBlock": {
     "auth_ref": [
      "r538",
      "r539",
      "r540"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The entire disclosure for collaborative arrangements in which the entity is a participant, including a) information about the nature and purpose of such arrangements; b) its rights and obligations thereunder; c) the accounting policy for collaborative arrangements; and d) the income statement classification and amounts attributable to transactions arising from the collaborative arrangement between participants.",
        "label": "Collaborative Arrangement Disclosure [Text Block]",
        "terseLabel": "Collaborative Arrangements"
       }
      }
     },
     "localname": "CollaborativeArrangementDisclosureTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangements"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_CollaborativeArrangementsAndNoncollaborativeArrangementTransactionsLineItems": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table.",
        "label": "Collaborative Arrangement and Arrangement Other than Collaborative [Line Items]",
        "terseLabel": "Collaborative Arrangements and Non-collaborative Arrangement Transactions [Line Items]"
       }
      }
     },
     "localname": "CollaborativeArrangementsAndNoncollaborativeArrangementTransactionsLineItems",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsEnzymeSupplyAgreementDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsGSKPlatformTechnologyTransferCollaborationandLicenseAgreementDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsMerckPlatformTechnologyTransferandLicenseAgreementDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsMerckSitagliptinCatalystSupplyAgreementDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsMolecularAssociatesIncDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsNestleGlobalDevelopmentAgreementDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsNovartisDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsPfizerEnzymeSupplyAgreementDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsPortonDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsRocheDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsTakedaDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsTateLyleDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_CommitmentsAndContingencies": {
     "auth_ref": [
      "r23",
      "r160",
      "r172"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedBalanceSheets": {
       "order": 2.0,
       "parentTag": "us-gaap_LiabilitiesAndStockholdersEquity",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Represents the caption on the face of the balance sheet to indicate that the entity has entered into (1) purchase or supply arrangements that will require expending a portion of its resources to meet the terms thereof, and (2) is exposed to potential losses or, less frequently, gains, arising from (a) possible claims against a company's resources due to future performance under contract terms, and (b) possible losses or likely gains from uncertainties that will ultimately be resolved when one or more future events that are deemed likely to occur do occur or fail to occur.",
        "label": "Commitments and Contingencies",
        "verboseLabel": "Commitments and contingencies (Note 13)"
       }
      }
     },
     "localname": "CommitmentsAndContingencies",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CommitmentsAndContingenciesDisclosureAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Commitments and Contingencies Disclosure [Abstract]",
        "terseLabel": "Commitments and Contingencies Disclosure [Abstract]"
       }
      }
     },
     "localname": "CommitmentsAndContingenciesDisclosureAbstract",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "xbrltype": "stringItemType"
    },
    "us-gaap_CommitmentsAndContingenciesDisclosureTextBlock": {
     "auth_ref": [
      "r89",
      "r360",
      "r361",
      "r633",
      "r753"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The entire disclosure for commitments and contingencies.",
        "label": "Commitments and Contingencies Disclosure [Text Block]",
        "verboseLabel": "Commitments and Contingencies"
       }
      }
     },
     "localname": "CommitmentsAndContingenciesDisclosureTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingencies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_CommonStockCapitalSharesReservedForFutureIssuance": {
     "auth_ref": [
      "r24"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Aggregate number of common shares reserved for future issuance.",
        "label": "Common Stock, Capital Shares Reserved for Future Issuance",
        "terseLabel": "Shares reserved for future issuance (in shares)"
       }
      }
     },
     "localname": "CommonStockCapitalSharesReservedForFutureIssuance",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationNarrativeDetails"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_CommonStockMember": {
     "auth_ref": [
      "r728",
      "r729",
      "r802"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Stock that is subordinate to all other stock of the issuer.",
        "label": "Common Stock [Member]",
        "terseLabel": "Common Stock"
       }
      }
     },
     "localname": "CommonStockMember",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofStockholdersEquity"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_CommonStockParOrStatedValuePerShare": {
     "auth_ref": [
      "r6"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Face amount or stated value per share of common stock.",
        "label": "Common Stock, Par or Stated Value Per Share",
        "terseLabel": "Common stock, par value (in dollars per share)"
       }
      }
     },
     "localname": "CommonStockParOrStatedValuePerShare",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CapitalStockDetails",
      "http://www.codexis.com/role/ConsolidatedBalanceSheetsParenthetical"
     ],
     "xbrltype": "perShareItemType"
    },
    "us-gaap_CommonStockSharesAuthorized": {
     "auth_ref": [
      "r6"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The maximum number of common shares permitted to be issued by an entity's charter and bylaws.",
        "label": "Common Stock, Shares Authorized",
        "terseLabel": "Common stock, shares authorized (in shares)"
       }
      }
     },
     "localname": "CommonStockSharesAuthorized",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedBalanceSheetsParenthetical"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_CommonStockSharesIssued": {
     "auth_ref": [
      "r6"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Total number of common shares of an entity that have been sold or granted to shareholders (includes common shares that were issued, repurchased and remain in the treasury). These shares represent capital invested by the firm's shareholders and owners, and may be all or only a portion of the number of shares authorized. Shares issued include shares outstanding and shares held in the treasury.",
        "label": "Common Stock, Shares, Issued",
        "terseLabel": "Common stock, shares issued (in shares)"
       }
      }
     },
     "localname": "CommonStockSharesIssued",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedBalanceSheetsParenthetical"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_CommonStockSharesOutstanding": {
     "auth_ref": [
      "r6",
      "r98"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Number of shares of common stock outstanding. Common stock represent the ownership interest in a corporation.",
        "label": "Common Stock, Shares, Outstanding",
        "verboseLabel": "Common stock, shares outstanding (in shares)"
       }
      }
     },
     "localname": "CommonStockSharesOutstanding",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedBalanceSheetsParenthetical"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_CommonStockValue": {
     "auth_ref": [
      "r6",
      "r695"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedBalanceSheets": {
       "order": 2.0,
       "parentTag": "us-gaap_StockholdersEquity",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Aggregate par or stated value of issued nonredeemable common stock (or common stock redeemable solely at the option of the issuer). This item includes treasury stock repurchased by the entity. Note: elements for number of nonredeemable common shares, par value and other disclosure concepts are in another section within stockholders' equity.",
        "label": "Common Stock, Value, Issued",
        "verboseLabel": "Common stock, $0.0001 par value per share; 100,000 shares authorized; 65,811 and 65,109 shares issued and outstanding at December\u00a031, 2022 and December\u00a031, 2021, respectively"
       }
      }
     },
     "localname": "CommonStockValue",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CompensationAndRetirementDisclosureAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Retirement Benefits [Abstract]",
        "terseLabel": "Retirement Benefits [Abstract]"
       }
      }
     },
     "localname": "CompensationAndRetirementDisclosureAbstract",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "xbrltype": "stringItemType"
    },
    "us-gaap_ComponentsOfDeferredTaxAssetsAndLiabilitiesAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Components of Deferred Tax Assets and Liabilities [Abstract]",
        "terseLabel": "Components of Deferred Tax Assets and Liabilities [Abstract]"
       }
      }
     },
     "localname": "ComponentsOfDeferredTaxAssetsAndLiabilitiesAbstract",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesComponentsofDeferredTaxAssetsandLiabilitiesDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ComponentsOfIncomeTaxExpenseBenefitContinuingOperationsAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Components of Income Tax Expense (Benefit), Continuing Operations [Abstract]",
        "terseLabel": "Components of Income Tax Expense (Benefit), Continuing Operations [Abstract]"
       }
      }
     },
     "localname": "ComponentsOfIncomeTaxExpenseBenefitContinuingOperationsAbstract",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesComponentsofProvisionforIncomeTaxesDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ComputerEquipmentMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Long lived, depreciable assets that are used in the creation, maintenance and utilization of information systems.",
        "label": "Computer Equipment [Member]",
        "terseLabel": "Computer equipment and software"
       }
      }
     },
     "localname": "ComputerEquipmentMember",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetDetailsPropertyandEquipmentnetDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_ConcentrationRiskBenchmarkDomain": {
     "auth_ref": [
      "r58",
      "r59",
      "r140",
      "r141",
      "r301",
      "r632"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The denominator in a calculation of a disclosed concentration risk percentage.",
        "label": "Concentration Risk Benchmark [Domain]",
        "terseLabel": "Concentration Risk Benchmark [Domain]"
       }
      }
     },
     "localname": "ConcentrationRiskBenchmarkDomain",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesNarrativeDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsMerckSitagliptinCatalystSupplyAgreementDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsNovartisDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsPfizerEnzymeSupplyAgreementDetails",
      "http://www.codexis.com/role/RevenueRecognitionNarrativeDetails",
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationConcentrationRiskDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_ConcentrationRiskByBenchmarkAxis": {
     "auth_ref": [
      "r58",
      "r59",
      "r140",
      "r141",
      "r301",
      "r623",
      "r632"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Information by benchmark of concentration risk.",
        "label": "Concentration Risk Benchmark [Axis]",
        "terseLabel": "Concentration Risk Benchmark [Axis]"
       }
      }
     },
     "localname": "ConcentrationRiskByBenchmarkAxis",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesNarrativeDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsMerckSitagliptinCatalystSupplyAgreementDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsNovartisDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsPfizerEnzymeSupplyAgreementDetails",
      "http://www.codexis.com/role/RevenueRecognitionNarrativeDetails",
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationConcentrationRiskDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ConcentrationRiskByTypeAxis": {
     "auth_ref": [
      "r58",
      "r59",
      "r140",
      "r141",
      "r301",
      "r632",
      "r825"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Information by type of concentration risk, for example, but not limited to, asset, liability, net assets, geographic, customer, employees, supplier, lender.",
        "label": "Concentration Risk Type [Axis]",
        "terseLabel": "Concentration Risk Type [Axis]"
       }
      }
     },
     "localname": "ConcentrationRiskByTypeAxis",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesNarrativeDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsMerckSitagliptinCatalystSupplyAgreementDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsPfizerEnzymeSupplyAgreementDetails",
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationConcentrationRiskDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ConcentrationRiskCreditRisk": {
     "auth_ref": [
      "r164",
      "r259"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Disclosure of accounting policy for credit risk.",
        "label": "Concentration Risk, Credit Risk, Policy [Policy Text Block]",
        "terseLabel": "Concentrations of Credit Risk"
       }
      }
     },
     "localname": "ConcentrationRiskCreditRisk",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesPolicies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ConcentrationRiskLineItems": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table.",
        "label": "Concentration Risk [Line Items]",
        "terseLabel": "Concentration Risk [Line Items]"
       }
      }
     },
     "localname": "ConcentrationRiskLineItems",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationConcentrationRiskDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ConcentrationRiskPercentage1": {
     "auth_ref": [
      "r58",
      "r59",
      "r140",
      "r141",
      "r301"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "For an entity that discloses a concentration risk in relation to quantitative amount, which serves as the \"benchmark\" (or denominator) in the equation, this concept represents the concentration percentage derived from the division.",
        "label": "Concentration Risk, Percentage",
        "terseLabel": "Concentration risk, percentage",
        "verboseLabel": "Concentration risk, percentage"
       }
      }
     },
     "localname": "ConcentrationRiskPercentage1",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesNarrativeDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsMerckSitagliptinCatalystSupplyAgreementDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsPfizerEnzymeSupplyAgreementDetails",
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationConcentrationRiskDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "us-gaap_ConcentrationRiskTable": {
     "auth_ref": [
      "r56",
      "r58",
      "r59",
      "r60",
      "r140",
      "r142",
      "r632"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Describes the nature of a concentration, a benchmark to which it is compared, and the percentage that the risk is to the benchmark.",
        "label": "Concentration Risk [Table]",
        "terseLabel": "Concentration Risk [Table]"
       }
      }
     },
     "localname": "ConcentrationRiskTable",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationConcentrationRiskDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ConcentrationRiskTypeDomain": {
     "auth_ref": [
      "r58",
      "r59",
      "r140",
      "r141",
      "r301",
      "r632"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "For an entity that discloses a concentration risk as a percentage of some financial balance or benchmark, identifies the type (for example, asset, liability, net assets, geographic, customer, employees, supplier, lender) of the concentration.",
        "label": "Concentration Risk Type [Domain]",
        "terseLabel": "Concentration Risk Type [Domain]"
       }
      }
     },
     "localname": "ConcentrationRiskTypeDomain",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesNarrativeDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsMerckSitagliptinCatalystSupplyAgreementDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsPfizerEnzymeSupplyAgreementDetails",
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationConcentrationRiskDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_ConstructionInProgressMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Structure or a modification to a structure under construction. Includes recently completed structures or modifications to structures that have not been placed into service.",
        "label": "Construction in Progress [Member]",
        "terseLabel": "Construction in progress"
       }
      }
     },
     "localname": "ConstructionInProgressMember",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetDetailsPropertyandEquipmentnetDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_ContractWithCustomerAssetAndLiabilityTableTextBlock": {
     "auth_ref": [
      "r760"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Tabular disclosure of receivable, contract asset, and contract liability from contract with customer. Includes, but is not limited to, change in contract asset and contract liability.",
        "label": "Contract with Customer, Contract Asset, Contract Liability, and Receivable [Table Text Block]",
        "terseLabel": "Contract with Customer"
       }
      }
     },
     "localname": "ContractWithCustomerAssetAndLiabilityTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ContractWithCustomerAssetCreditLossExpense": {
     "auth_ref": [
      "r317",
      "r430",
      "r678"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of expense (reversal of expense) for expected credit loss on right to consideration in exchange for good or service transferred to customer when right is conditioned on something other than passage of time.",
        "label": "Contract with Customer, Asset, Credit Loss Expense (Reversal)",
        "terseLabel": "Impairment charges related to contract assets"
       }
      }
     },
     "localname": "ContractWithCustomerAssetCreditLossExpense",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionNarrativeDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ContractWithCustomerAssetGrossCurrent": {
     "auth_ref": [
      "r758",
      "r759"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedBalanceSheets": {
       "order": 2.0,
       "parentTag": "us-gaap_NotesReceivableGross",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount, before allowance for credit loss, of right to consideration in exchange for good or service transferred to customer when right is conditioned on something other than passage of time, classified as current.",
        "label": "Contract with Customer, Asset, before Allowance for Credit Loss, Current",
        "terseLabel": "Contract assets",
        "verboseLabel": "Contract assets"
       }
      }
     },
     "localname": "ContractWithCustomerAssetGrossCurrent",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedBalanceSheets",
      "http://www.codexis.com/role/RevenueRecognitionContractswithCustomerDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ContractWithCustomerLiability": {
     "auth_ref": [
      "r408",
      "r409",
      "r432"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of obligation to transfer good or service to customer for which consideration has been received or is receivable.",
        "label": "Contract with Customer, Liability",
        "terseLabel": "Contract liabilities: deferred revenue",
        "verboseLabel": "Contract liabilities, deferred revenue"
       }
      }
     },
     "localname": "ContractWithCustomerLiability",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsEnzymeSupplyAgreementDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsMolecularAssociatesIncDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsNovartisDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsPfizerEnzymeSupplyAgreementDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsPortonDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsRocheDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsTakedaDetails",
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlowsParenthetical",
      "http://www.codexis.com/role/RelatedPartyTransactionsDetails",
      "http://www.codexis.com/role/RevenueRecognitionContractswithCustomerDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ContractWithCustomerLiabilityCumulativeCatchUpAdjustmentToRevenueChangeInEstimateOfTransactionPrice": {
     "auth_ref": [
      "r677"
     ],
     "calculation": {
      "http://www.codexis.com/role/RevenueRecognitionRevenueRecognizedDetails": {
       "order": 1.0,
       "parentTag": "us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of increase (decrease) in revenue recognized for cumulative catch-up adjustment from change in estimate of transaction price which (increases) decreases obligation to transfer good or service to customer for which consideration from customer has been received or is due. Includes, but is not limited to, change in assessment of whether estimate of variable consideration is constrained.",
        "label": "Contract with Customer, Liability, Cumulative Catch-up Adjustment to Revenue, Change in Estimate of Transaction Price",
        "terseLabel": "Changes in the estimated transaction price allocated to performance obligations satisfied in prior periods"
       }
      }
     },
     "localname": "ContractWithCustomerLiabilityCumulativeCatchUpAdjustmentToRevenueChangeInEstimateOfTransactionPrice",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionRevenueRecognizedDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ContractWithCustomerLiabilityCurrent": {
     "auth_ref": [
      "r408",
      "r409",
      "r432"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedBalanceSheets": {
       "order": 5.0,
       "parentTag": "us-gaap_LiabilitiesCurrent",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of obligation to transfer good or service to customer for which consideration has been received or is receivable, classified as current.",
        "label": "Contract with Customer, Liability, Current",
        "terseLabel": "Deferred revenue",
        "verboseLabel": "Deferred revenue ($0 and $245 to a related party)"
       }
      }
     },
     "localname": "ContractWithCustomerLiabilityCurrent",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedBalanceSheets",
      "http://www.codexis.com/role/ConsolidatedBalanceSheetsParenthetical"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ContractWithCustomerLiabilityNoncurrent": {
     "auth_ref": [
      "r408",
      "r409",
      "r432"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedBalanceSheets": {
       "order": 2.0,
       "parentTag": "us-gaap_Liabilities",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of obligation to transfer good or service to customer for which consideration has been received or is receivable, classified as noncurrent.",
        "label": "Contract with Customer, Liability, Noncurrent",
        "verboseLabel": "Deferred revenue, net of current portion"
       }
      }
     },
     "localname": "ContractWithCustomerLiabilityNoncurrent",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ContractWithCustomerLiabilityRevenueRecognized": {
     "auth_ref": [
      "r433"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of revenue recognized that was previously included in balance of obligation to transfer good or service to customer for which consideration from customer has been received or is due.",
        "label": "Contract with Customer, Liability, Revenue Recognized",
        "terseLabel": "Liability, revenue recognized"
       }
      }
     },
     "localname": "ContractWithCustomerLiabilityRevenueRecognized",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsGSKPlatformTechnologyTransferCollaborationandLicenseAgreementDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsMerckPlatformTechnologyTransferandLicenseAgreementDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsMerckSitagliptinCatalystSupplyAgreementDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsNovartisDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsPfizerEnzymeSupplyAgreementDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsRocheDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ContractWithCustomerPerformanceObligationSatisfiedInPreviousPeriod": {
     "auth_ref": [
      "r416"
     ],
     "calculation": {
      "http://www.codexis.com/role/RevenueRecognitionRevenueRecognizedDetails": {
       "order": 2.0,
       "parentTag": "us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of revenue recognized from performance obligation satisfied or partially satisfied in previous reporting periods. Includes, but is not limited to, change in transaction price.",
        "label": "Contract with Customer, Performance Obligation Satisfied in Previous Period",
        "terseLabel": "Performance obligations satisfied"
       }
      }
     },
     "localname": "ContractWithCustomerPerformanceObligationSatisfiedInPreviousPeriod",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionRevenueRecognizedDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ConvertibleDebt": {
     "auth_ref": [
      "r1",
      "r156",
      "r167"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Including the current and noncurrent portions, carrying amount of debt identified as being convertible into another form of financial instrument (typically the entity's common stock) as of the balance sheet date, which originally required full repayment more than twelve months after issuance or greater than the normal operating cycle of the company.",
        "label": "Convertible Debt",
        "terseLabel": "Non-marketable debt security at carrying value"
       }
      }
     },
     "localname": "ConvertibleDebt",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/InvestmentsinNonMarketableSecuritiesNarrativeDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ConvertibleDebtMember": {
     "auth_ref": [
      "r94",
      "r380",
      "r381",
      "r383",
      "r384",
      "r385",
      "r386",
      "r387",
      "r388",
      "r389",
      "r390",
      "r671",
      "r672",
      "r673",
      "r674",
      "r675"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Borrowing which can be exchanged for a specified number of another security at the option of the issuer or the holder, for example, but not limited to, the entity's common stock.",
        "label": "Convertible Debt [Member]",
        "terseLabel": "Convertible Debt"
       }
      }
     },
     "localname": "ConvertibleDebtMember",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/FairValueMeasurementsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_CorporateNonSegmentMember": {
     "auth_ref": [
      "r70",
      "r286",
      "r287",
      "r288",
      "r289",
      "r295",
      "r737"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Corporate headquarters or functional department that may not earn revenues or may earn revenues that are only incidental to the activities of the entity and is not considered an operating segment.",
        "label": "Corporate, Non-Segment [Member]",
        "terseLabel": "Corporate, Non-Segment"
       }
      }
     },
     "localname": "CorporateNonSegmentMember",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationSegmentReportingDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_CostOfGoodsAndServicesSold": {
     "auth_ref": [
      "r30",
      "r595"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedStatementsofOperations": {
       "order": 1.0,
       "parentTag": "us-gaap_CostsAndExpenses",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The aggregate costs related to goods produced and sold and services rendered by an entity during the reporting period. This excludes costs incurred during the reporting period related to financial services rendered and other revenue generating activities.",
        "label": "Cost of Goods and Services Sold",
        "terseLabel": "Cost of product revenue"
       }
      }
     },
     "localname": "CostOfGoodsAndServicesSold",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofOperations",
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationSegmentReportingDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CostOfSalesMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Primary financial statement caption encompassing cost of sales.",
        "label": "Cost of Sales [Member]",
        "terseLabel": "Costs of product revenue"
       }
      }
     },
     "localname": "CostOfSalesMember",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationStockBasedCompensationExpenseDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_CostsAndExpenses": {
     "auth_ref": [
      "r28"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedStatementsofOperations": {
       "order": 2.0,
       "parentTag": "us-gaap_OperatingIncomeLoss",
       "weight": -1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Total costs of sales and operating expenses for the period.",
        "label": "Costs and Expenses",
        "negatedTotalLabel": "Total costs and operating expenses",
        "totalLabel": "Total costs and operating expenses"
       }
      }
     },
     "localname": "CostsAndExpenses",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofOperations",
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationSegmentReportingDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CreditFacilityAxis": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Information by type of credit facility. Credit facilities provide capital to borrowers without the need to structure a loan for each borrowing.",
        "label": "Credit Facility [Axis]",
        "terseLabel": "Credit Facility [Axis]"
       }
      }
     },
     "localname": "CreditFacilityAxis",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesNarrativeDetails",
      "http://www.codexis.com/role/CommitmentsandContingenciesNarrativeDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_CreditFacilityDomain": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Type of credit facility. Credit facilities provide capital to borrowers without the need to structure a loan for each borrowing.",
        "label": "Credit Facility [Domain]",
        "terseLabel": "Credit Facility [Domain]"
       }
      }
     },
     "localname": "CreditFacilityDomain",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesNarrativeDetails",
      "http://www.codexis.com/role/CommitmentsandContingenciesNarrativeDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_CreditLossFinancialInstrumentTextBlock": {
     "auth_ref": [
      "r316",
      "r319",
      "r320",
      "r322",
      "r323",
      "r325",
      "r326"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The entire disclosure for credit loss on financial instrument measured at amortized cost basis, net investment in lease, off-balance sheet credit exposure, and available-for-sale debt security.",
        "label": "Credit Loss, Financial Instrument [Text Block]",
        "terseLabel": "Allowance for Credit Losses"
       }
      }
     },
     "localname": "CreditLossFinancialInstrumentTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/AllowanceforCreditLosses"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_CurrentForeignTaxExpenseBenefit": {
     "auth_ref": [
      "r726",
      "r797"
     ],
     "calculation": {
      "http://www.codexis.com/role/IncomeTaxesComponentsofProvisionforIncomeTaxesDetails": {
       "order": 2.0,
       "parentTag": "us-gaap_CurrentIncomeTaxExpenseBenefit",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of current foreign income tax expense (benefit) pertaining to income (loss) from continuing operations.",
        "label": "Current Foreign Tax Expense (Benefit)",
        "terseLabel": "Foreign"
       }
      }
     },
     "localname": "CurrentForeignTaxExpenseBenefit",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesComponentsofProvisionforIncomeTaxesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CurrentIncomeTaxExpenseBenefit": {
     "auth_ref": [
      "r133",
      "r522",
      "r530",
      "r726"
     ],
     "calculation": {
      "http://www.codexis.com/role/IncomeTaxesComponentsofProvisionforIncomeTaxesDetails": {
       "order": 1.0,
       "parentTag": "us-gaap_IncomeTaxExpenseBenefit",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of current income tax expense (benefit) pertaining to taxable income (loss) from continuing operations.",
        "label": "Current Income Tax Expense (Benefit)",
        "totalLabel": "Total current provision"
       }
      }
     },
     "localname": "CurrentIncomeTaxExpenseBenefit",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesComponentsofProvisionforIncomeTaxesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CurrentIncomeTaxExpenseBenefitContinuingOperationsAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Current Income Tax Expense (Benefit), Continuing Operations [Abstract]",
        "terseLabel": "Current provision:"
       }
      }
     },
     "localname": "CurrentIncomeTaxExpenseBenefitContinuingOperationsAbstract",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesComponentsofProvisionforIncomeTaxesDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_CurrentStateAndLocalTaxExpenseBenefit": {
     "auth_ref": [
      "r726",
      "r797",
      "r799"
     ],
     "calculation": {
      "http://www.codexis.com/role/IncomeTaxesComponentsofProvisionforIncomeTaxesDetails": {
       "order": 1.0,
       "parentTag": "us-gaap_CurrentIncomeTaxExpenseBenefit",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of current state and local tax expense (benefit) attributable to income (loss) from continuing operations. Includes, but is not limited to, current regional, territorial, and provincial tax expense (benefit) for non-US (United States of America) jurisdiction.",
        "label": "Current State and Local Tax Expense (Benefit)",
        "terseLabel": "State"
       }
      }
     },
     "localname": "CurrentStateAndLocalTaxExpenseBenefit",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesComponentsofProvisionforIncomeTaxesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_CustomerConcentrationRiskMember": {
     "auth_ref": [
      "r57",
      "r301"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Reflects the percentage that revenues in the period from one or more significant customers is to net revenues, as defined by the entity, such as total net revenues, product line revenues, segment revenues. The risk is the materially adverse effects of loss of a significant customer.",
        "label": "Customer Concentration Risk [Member]",
        "terseLabel": "Customer Concentration Risk"
       }
      }
     },
     "localname": "CustomerConcentrationRiskMember",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesNarrativeDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsPfizerEnzymeSupplyAgreementDetails",
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationConcentrationRiskDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_DebtAndEquitySecuritiesUnrealizedGainLoss": {
     "auth_ref": [],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows": {
       "order": 7.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of unrealized gain (loss) on investment in debt and equity securities.",
        "label": "Debt and Equity Securities, Unrealized Gain (Loss)",
        "negatedTerseLabel": "Unrealized gain on non-marketable securities (($208) and ($983) from a related party)",
        "terseLabel": "Unrealized gain on non-marketable securities"
       }
      }
     },
     "localname": "DebtAndEquitySecuritiesUnrealizedGainLoss",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows",
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlowsParenthetical"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DebtConversionConvertedInstrumentSharesIssued1": {
     "auth_ref": [
      "r49",
      "r51"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The number of shares issued in exchange for the original debt being converted in a noncash (or part noncash) transaction. \"Part noncash\" refers to that portion of the transaction not resulting in cash receipts or payments in the period.",
        "label": "Debt Conversion, Converted Instrument, Shares Issued",
        "terseLabel": "Non-marketable debt security (in shares)"
       }
      }
     },
     "localname": "DebtConversionConvertedInstrumentSharesIssued1",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/InvestmentsinNonMarketableSecuritiesNarrativeDetails"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_DebtInstrumentBasisSpreadOnVariableRate1": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Percentage points added to the reference rate to compute the variable rate on the debt instrument.",
        "label": "Debt Instrument, Basis Spread on Variable Rate",
        "terseLabel": "Basis spread on variable rate"
       }
      }
     },
     "localname": "DebtInstrumentBasisSpreadOnVariableRate1",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesNarrativeDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "us-gaap_DebtInstrumentCollateralAmount": {
     "auth_ref": [
      "r163"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of assets pledged to secure a debt instrument.",
        "label": "Debt Instrument, Collateral Amount",
        "terseLabel": "Debt instrument, collateral amount"
       }
      }
     },
     "localname": "DebtInstrumentCollateralAmount",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesNarrativeDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DebtInstrumentInterestRateStatedPercentage": {
     "auth_ref": [
      "r21",
      "r381"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Contractual interest rate for funds borrowed, under the debt agreement.",
        "label": "Debt Instrument, Interest Rate, Stated Percentage",
        "terseLabel": "Interest rate, stated percentage"
       }
      }
     },
     "localname": "DebtInstrumentInterestRateStatedPercentage",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesNarrativeDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "us-gaap_DebtSecuritiesAvailableForSaleAllowanceForCreditLossWriteoff": {
     "auth_ref": [
      "r327"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of writeoff of allowance for credit loss on investment in debt security measured at fair value with change in fair value recognized in other comprehensive income (available-for-sale).",
        "label": "Debt Securities, Available-for-Sale, Allowance for Credit Loss, Writeoff",
        "terseLabel": "Other-than-temporary impairment losses"
       }
      }
     },
     "localname": "DebtSecuritiesAvailableForSaleAllowanceForCreditLossWriteoff",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/FairValueMeasurementsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DeferredForeignIncomeTaxExpenseBenefit": {
     "auth_ref": [
      "r133",
      "r726",
      "r798"
     ],
     "calculation": {
      "http://www.codexis.com/role/IncomeTaxesComponentsofProvisionforIncomeTaxesDetails": {
       "order": 1.0,
       "parentTag": "us-gaap_DeferredIncomeTaxExpenseBenefit",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of deferred foreign income tax expense (benefit) pertaining to income (loss) from continuing operations.",
        "label": "Deferred Foreign Income Tax Expense (Benefit)",
        "terseLabel": "Foreign"
       }
      }
     },
     "localname": "DeferredForeignIncomeTaxExpenseBenefit",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesComponentsofProvisionforIncomeTaxesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DeferredIncomeTaxExpenseBenefit": {
     "auth_ref": [
      "r44",
      "r133",
      "r523",
      "r529",
      "r530",
      "r726"
     ],
     "calculation": {
      "http://www.codexis.com/role/IncomeTaxesComponentsofProvisionforIncomeTaxesDetails": {
       "order": 2.0,
       "parentTag": "us-gaap_IncomeTaxExpenseBenefit",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of deferred income tax expense (benefit) pertaining to income (loss) from continuing operations.",
        "label": "Deferred Income Tax Expense (Benefit)",
        "totalLabel": "Total deferred benefit"
       }
      }
     },
     "localname": "DeferredIncomeTaxExpenseBenefit",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesComponentsofProvisionforIncomeTaxesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DeferredIncomeTaxExpenseBenefitContinuingOperationsAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Deferred Income Tax Expense (Benefit), Continuing Operations [Abstract]",
        "terseLabel": "Deferred benefit:"
       }
      }
     },
     "localname": "DeferredIncomeTaxExpenseBenefitContinuingOperationsAbstract",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesComponentsofProvisionforIncomeTaxesDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_DeferredIncomeTaxLiabilities": {
     "auth_ref": [
      "r3",
      "r4",
      "r155",
      "r165",
      "r516"
     ],
     "calculation": {
      "http://www.codexis.com/role/IncomeTaxesComponentsofDeferredTaxAssetsandLiabilitiesDetails": {
       "order": 2.0,
       "parentTag": "us-gaap_DeferredTaxLiabilities",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of deferred tax liability attributable to taxable temporary differences.",
        "label": "Deferred Tax Liabilities, Gross",
        "negatedTotalLabel": "Total deferred tax liabilities:"
       }
      }
     },
     "localname": "DeferredIncomeTaxLiabilities",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesComponentsofDeferredTaxAssetsandLiabilitiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DeferredTaxAssetsCapitalLossCarryforwards": {
     "auth_ref": [
      "r131",
      "r796"
     ],
     "calculation": {
      "http://www.codexis.com/role/IncomeTaxesComponentsofDeferredTaxAssetsandLiabilitiesDetails": {
       "order": 5.0,
       "parentTag": "us-gaap_DeferredTaxAssetsGross",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount before allocation of valuation allowances of deferred tax asset attributable to deductible capital loss carryforwards.",
        "label": "Deferred Tax Assets, Capital Loss Carryforwards",
        "terseLabel": "Capital losses"
       }
      }
     },
     "localname": "DeferredTaxAssetsCapitalLossCarryforwards",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesComponentsofDeferredTaxAssetsandLiabilitiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DeferredTaxAssetsDeferredIncome": {
     "auth_ref": [
      "r131",
      "r796"
     ],
     "calculation": {
      "http://www.codexis.com/role/IncomeTaxesComponentsofDeferredTaxAssetsandLiabilitiesDetails": {
       "order": 7.0,
       "parentTag": "us-gaap_DeferredTaxAssetsGross",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount before allocation of valuation allowances of deferred tax asset attributable to deductible temporary differences from deferred income.",
        "label": "Deferred Tax Assets, Deferred Income",
        "terseLabel": "Deferred revenues"
       }
      }
     },
     "localname": "DeferredTaxAssetsDeferredIncome",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesComponentsofDeferredTaxAssetsandLiabilitiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DeferredTaxAssetsGoodwillAndIntangibleAssets": {
     "auth_ref": [],
     "calculation": {
      "http://www.codexis.com/role/IncomeTaxesComponentsofDeferredTaxAssetsandLiabilitiesDetails": {
       "order": 4.0,
       "parentTag": "us-gaap_DeferredTaxAssetsGross",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount before allocation of valuation allowances of deferred tax asset attributable to deductible temporary differences from intangible assets including goodwill.",
        "label": "Deferred Tax Assets, Goodwill and Intangible Assets",
        "terseLabel": "Intangible assets"
       }
      }
     },
     "localname": "DeferredTaxAssetsGoodwillAndIntangibleAssets",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesComponentsofDeferredTaxAssetsandLiabilitiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DeferredTaxAssetsGross": {
     "auth_ref": [
      "r517"
     ],
     "calculation": {
      "http://www.codexis.com/role/IncomeTaxesComponentsofDeferredTaxAssetsandLiabilitiesDetails": {
       "order": 1.0,
       "parentTag": "us-gaap_DeferredTaxLiabilities",
       "weight": -1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount before allocation of valuation allowances of deferred tax asset attributable to deductible temporary differences and carryforwards.",
        "label": "Deferred Tax Assets, Gross",
        "totalLabel": "Total deferred tax assets:"
       }
      }
     },
     "localname": "DeferredTaxAssetsGross",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesComponentsofDeferredTaxAssetsandLiabilitiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DeferredTaxAssetsGrossAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Deferred Tax Assets, Gross [Abstract]",
        "terseLabel": "Deferred tax assets:"
       }
      }
     },
     "localname": "DeferredTaxAssetsGrossAbstract",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesComponentsofDeferredTaxAssetsandLiabilitiesDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_DeferredTaxAssetsInProcessResearchAndDevelopment": {
     "auth_ref": [
      "r131",
      "r796"
     ],
     "calculation": {
      "http://www.codexis.com/role/IncomeTaxesComponentsofDeferredTaxAssetsandLiabilitiesDetails": {
       "order": 11.0,
       "parentTag": "us-gaap_DeferredTaxAssetsGross",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount before allocation of valuation allowances of deferred tax asset attributable to deductible temporary differences from in-process research and development costs expensed in connection with a business combination.",
        "label": "Deferred Tax Assets, in Process Research and Development",
        "terseLabel": "R&amp;D Capitalization"
       }
      }
     },
     "localname": "DeferredTaxAssetsInProcessResearchAndDevelopment",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesComponentsofDeferredTaxAssetsandLiabilitiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DeferredTaxAssetsInvestments": {
     "auth_ref": [],
     "calculation": {
      "http://www.codexis.com/role/IncomeTaxesComponentsofDeferredTaxAssetsandLiabilitiesDetails": {
       "order": 8.0,
       "parentTag": "us-gaap_DeferredTaxAssetsGross",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount before allocation of valuation allowances of deferred tax asset attributable to deductible temporary differences from investments (excludes investments in subsidiaries and equity method investments).",
        "label": "Deferred Tax Assets, Investments",
        "terseLabel": "Unrealized gain/loss"
       }
      }
     },
     "localname": "DeferredTaxAssetsInvestments",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesComponentsofDeferredTaxAssetsandLiabilitiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DeferredTaxAssetsOperatingLossCarryforwards": {
     "auth_ref": [
      "r131",
      "r796"
     ],
     "calculation": {
      "http://www.codexis.com/role/IncomeTaxesComponentsofDeferredTaxAssetsandLiabilitiesDetails": {
       "order": 6.0,
       "parentTag": "us-gaap_DeferredTaxAssetsGross",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount before allocation of valuation allowances of deferred tax asset attributable to deductible operating loss carryforwards.",
        "label": "Deferred Tax Assets, Operating Loss Carryforwards",
        "terseLabel": "Net operating losses"
       }
      }
     },
     "localname": "DeferredTaxAssetsOperatingLossCarryforwards",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesComponentsofDeferredTaxAssetsandLiabilitiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DeferredTaxAssetsOperatingLossCarryforwardsNotSubjectToExpiration": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount before allocation of valuation allowances of deferred tax asset attributable to deductible operating loss carryforwards that are not subject to expiration dates.",
        "label": "Deferred Tax Assets, Operating Loss Carryforwards, Not Subject to Expiration",
        "terseLabel": "Net operating losses, not subject to expiration, amount"
       }
      }
     },
     "localname": "DeferredTaxAssetsOperatingLossCarryforwardsNotSubjectToExpiration",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesNOLCarryforwardsandFederalResearchandDevelopmentTaxCreditsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DeferredTaxAssetsOther": {
     "auth_ref": [
      "r131",
      "r796"
     ],
     "calculation": {
      "http://www.codexis.com/role/IncomeTaxesComponentsofDeferredTaxAssetsandLiabilitiesDetails": {
       "order": 10.0,
       "parentTag": "us-gaap_DeferredTaxAssetsGross",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount, before allocation of valuation allowance, of deferred tax asset attributable to deductible temporary differences, classified as other.",
        "label": "Deferred Tax Assets, Other",
        "terseLabel": "Other assets"
       }
      }
     },
     "localname": "DeferredTaxAssetsOther",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesComponentsofDeferredTaxAssetsandLiabilitiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DeferredTaxAssetsPropertyPlantAndEquipment": {
     "auth_ref": [],
     "calculation": {
      "http://www.codexis.com/role/IncomeTaxesComponentsofDeferredTaxAssetsandLiabilitiesDetails": {
       "order": 9.0,
       "parentTag": "us-gaap_DeferredTaxAssetsGross",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount before allocation of valuation allowances of deferred tax asset attributable to deductible temporary differences from property, plant, and equipment.",
        "label": "Deferred Tax Assets, Property, Plant and Equipment",
        "terseLabel": "Depreciation"
       }
      }
     },
     "localname": "DeferredTaxAssetsPropertyPlantAndEquipment",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesComponentsofDeferredTaxAssetsandLiabilitiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DeferredTaxAssetsTaxCreditCarryforwards": {
     "auth_ref": [
      "r129",
      "r131",
      "r796"
     ],
     "calculation": {
      "http://www.codexis.com/role/IncomeTaxesComponentsofDeferredTaxAssetsandLiabilitiesDetails": {
       "order": 2.0,
       "parentTag": "us-gaap_DeferredTaxAssetsGross",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount, before allocation of a valuation allowances, of deferred tax assets attributable to deductible tax credit carryforwards including, but not limited to, research, foreign, general business, alternative minimum tax, and other deductible tax credit carryforwards.",
        "label": "Deferred Tax Assets, Tax Credit Carryforwards",
        "terseLabel": "Credits"
       }
      }
     },
     "localname": "DeferredTaxAssetsTaxCreditCarryforwards",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesComponentsofDeferredTaxAssetsandLiabilitiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DeferredTaxAssetsTaxDeferredExpenseCompensationAndBenefitsShareBasedCompensationCost": {
     "auth_ref": [
      "r131",
      "r796"
     ],
     "calculation": {
      "http://www.codexis.com/role/IncomeTaxesComponentsofDeferredTaxAssetsandLiabilitiesDetails": {
       "order": 1.0,
       "parentTag": "us-gaap_DeferredTaxAssetsGross",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount before allocation of valuation allowances of deferred tax asset attributable to deductible temporary differences from share-based compensation.",
        "label": "Deferred Tax Assets, Tax Deferred Expense, Compensation and Benefits, Share-Based Compensation Cost",
        "terseLabel": "Stock-based compensation"
       }
      }
     },
     "localname": "DeferredTaxAssetsTaxDeferredExpenseCompensationAndBenefitsShareBasedCompensationCost",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesComponentsofDeferredTaxAssetsandLiabilitiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DeferredTaxAssetsTaxDeferredExpenseReservesAndAccruals": {
     "auth_ref": [
      "r131",
      "r796"
     ],
     "calculation": {
      "http://www.codexis.com/role/IncomeTaxesComponentsofDeferredTaxAssetsandLiabilitiesDetails": {
       "order": 12.0,
       "parentTag": "us-gaap_DeferredTaxAssetsGross",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount before allocation of valuation allowances of deferred tax asset attributable to deductible temporary differences from reserves and accruals.",
        "label": "Deferred Tax Assets, Tax Deferred Expense, Reserves and Accruals",
        "terseLabel": "Reserves and accruals"
       }
      }
     },
     "localname": "DeferredTaxAssetsTaxDeferredExpenseReservesAndAccruals",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesComponentsofDeferredTaxAssetsandLiabilitiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DeferredTaxAssetsValuationAllowance": {
     "auth_ref": [
      "r518"
     ],
     "calculation": {
      "http://www.codexis.com/role/IncomeTaxesComponentsofDeferredTaxAssetsandLiabilitiesDetails": {
       "order": 3.0,
       "parentTag": "us-gaap_DeferredTaxLiabilities",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of deferred tax assets for which it is more likely than not that a tax benefit will not be realized.",
        "label": "Deferred Tax Assets, Valuation Allowance",
        "negatedTerseLabel": "Valuation allowance"
       }
      }
     },
     "localname": "DeferredTaxAssetsValuationAllowance",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesComponentsofDeferredTaxAssetsandLiabilitiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DeferredTaxLiabilities": {
     "auth_ref": [
      "r124",
      "r795"
     ],
     "calculation": {
      "http://www.codexis.com/role/IncomeTaxesComponentsofDeferredTaxAssetsandLiabilitiesDetails": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount, after deferred tax asset, of deferred tax liability attributable to taxable differences without jurisdictional netting.",
        "label": "Deferred Tax Liabilities, Net",
        "negatedTotalLabel": "Net deferred tax liabilities"
       }
      }
     },
     "localname": "DeferredTaxLiabilities",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesComponentsofDeferredTaxAssetsandLiabilitiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DeferredTaxLiabilitiesAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Deferred Tax Liabilities, Gross [Abstract]",
        "terseLabel": "Deferred tax liabilities:"
       }
      }
     },
     "localname": "DeferredTaxLiabilitiesAbstract",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesComponentsofDeferredTaxAssetsandLiabilitiesDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_DeferredTaxLiabilitiesOther": {
     "auth_ref": [
      "r131",
      "r796"
     ],
     "calculation": {
      "http://www.codexis.com/role/IncomeTaxesComponentsofDeferredTaxAssetsandLiabilitiesDetails": {
       "order": 3.0,
       "parentTag": "us-gaap_DeferredIncomeTaxLiabilities",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of deferred tax liability attributable to taxable temporary differences classified as other.",
        "label": "Deferred Tax Liabilities, Other",
        "negatedTerseLabel": "Other"
       }
      }
     },
     "localname": "DeferredTaxLiabilitiesOther",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesComponentsofDeferredTaxAssetsandLiabilitiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DeferredTaxLiabilitiesPropertyPlantAndEquipment": {
     "auth_ref": [
      "r131",
      "r796"
     ],
     "calculation": {
      "http://www.codexis.com/role/IncomeTaxesComponentsofDeferredTaxAssetsandLiabilitiesDetails": {
       "order": 1.0,
       "parentTag": "us-gaap_DeferredIncomeTaxLiabilities",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of deferred tax liability attributable to taxable temporary differences from property, plant, and equipment.",
        "label": "Deferred Tax Liabilities, Property, Plant and Equipment",
        "negatedLabel": "Property and Equipment"
       }
      }
     },
     "localname": "DeferredTaxLiabilitiesPropertyPlantAndEquipment",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesComponentsofDeferredTaxAssetsandLiabilitiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DeferredTaxLiabilitiesUndistributedForeignEarnings": {
     "auth_ref": [
      "r796"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of deferred tax liability attributable to taxable temporary differences from undistributed earnings of subsidiary and other recognized entity not within country of domicile. Includes, but is not limited to, other basis differences.",
        "label": "Deferred Tax Liabilities, Undistributed Foreign Earnings",
        "terseLabel": "Deferred tax liability from undistributed foreign earnings"
       }
      }
     },
     "localname": "DeferredTaxLiabilitiesUndistributedForeignEarnings",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesNarrativeDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DefinedContributionPlanCostRecognized": {
     "auth_ref": [
      "r454"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of cost for defined contribution plan.",
        "label": "Defined Contribution Plan, Cost",
        "terseLabel": "Defined contribution plan, cost"
       }
      }
     },
     "localname": "DefinedContributionPlanCostRecognized",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/A401kPlanDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DemandDepositsMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Accounts that may or may not bear interest and that depositor is entitled to withdraw at anytime without prior notice. Checking and negotiable order of withdrawal (NOW) accounts are the most common forms of demand deposits.",
        "label": "Demand Deposits [Member]",
        "terseLabel": "Demand deposits"
       }
      }
     },
     "localname": "DemandDepositsMember",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesNarrativeDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_Depreciation": {
     "auth_ref": [
      "r44",
      "r83"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows": {
       "order": 2.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The amount of expense recognized in the current period that reflects the allocation of the cost of tangible assets over the assets' useful lives. Includes production and non-production related depreciation.",
        "label": "Depreciation",
        "negatedLabel": "Depreciation",
        "terseLabel": "Depreciation expense",
        "verboseLabel": "Depreciation"
       }
      }
     },
     "localname": "Depreciation",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetDetailsPropertyandEquipmentnetDetails",
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows",
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationSegmentReportingDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_DisaggregationOfRevenueLineItems": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table.",
        "label": "Disaggregation of Revenue [Line Items]",
        "terseLabel": "Disaggregation of Revenue [Line Items]"
       }
      }
     },
     "localname": "DisaggregationOfRevenueLineItems",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionDisaggregationofRevenueDetails",
      "http://www.codexis.com/role/RevenueRecognitionNarrativeDetails",
      "http://www.codexis.com/role/RevenueRecognitionPerformanceObligationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_DisaggregationOfRevenueTable": {
     "auth_ref": [
      "r431",
      "r679",
      "r680",
      "r681",
      "r682",
      "r683",
      "r684",
      "r685"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Disclosure of information about disaggregation of revenue into categories depicting how nature, amount, timing, and uncertainty of revenue and cash flows are affected by economic factor.",
        "label": "Disaggregation of Revenue [Table]",
        "terseLabel": "Disaggregation of Revenue [Table]"
       }
      }
     },
     "localname": "DisaggregationOfRevenueTable",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionDisaggregationofRevenueDetails",
      "http://www.codexis.com/role/RevenueRecognitionNarrativeDetails",
      "http://www.codexis.com/role/RevenueRecognitionPerformanceObligationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_DisaggregationOfRevenueTableTextBlock": {
     "auth_ref": [
      "r762"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Tabular disclosure of disaggregation of revenue into categories depicting how nature, amount, timing, and uncertainty of revenue and cash flows are affected by economic factor.",
        "label": "Disaggregation of Revenue [Table Text Block]",
        "terseLabel": "Disaggregation of Revenue"
       }
      }
     },
     "localname": "DisaggregationOfRevenueTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_DisclosureOfCompensationRelatedCostsShareBasedPaymentsTextBlock": {
     "auth_ref": [
      "r461",
      "r492",
      "r493",
      "r495",
      "r500",
      "r690"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The entire disclosure for share-based payment arrangement.",
        "label": "Share-Based Payment Arrangement [Text Block]",
        "terseLabel": "Stock-based Compensation"
       }
      }
     },
     "localname": "DisclosureOfCompensationRelatedCostsShareBasedPaymentsTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensation"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_DisclosureOfCompensationRelatedCostsSharebasedPaymentsAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Share-Based Payment Arrangement [Abstract]",
        "terseLabel": "Disclosure of Compensation Related Costs, Share-based Payments [Abstract]"
       }
      }
     },
     "localname": "DisclosureOfCompensationRelatedCostsSharebasedPaymentsAbstract",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "xbrltype": "stringItemType"
    },
    "us-gaap_DomesticCountryMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Designated tax department of the government that is entitled to levy and collect income taxes from the entity in its country of domicile.",
        "label": "Domestic Tax Authority [Member]",
        "terseLabel": "Federal"
       }
      }
     },
     "localname": "DomesticCountryMember",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesNOLCarryforwardsandFederalResearchandDevelopmentTaxCreditsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_DueFromRelatedParties": {
     "auth_ref": [
      "r158",
      "r174",
      "r197",
      "r369",
      "r370",
      "r371",
      "r377",
      "r378",
      "r379",
      "r582",
      "r727"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "For an unclassified balance sheet, amounts due from related parties including affiliates, employees, joint ventures, officers and stockholders, immediate families thereof, and pension funds.",
        "label": "Due from Related Parties",
        "terseLabel": "Due from related parties"
       }
      }
     },
     "localname": "DueFromRelatedParties",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsMolecularAssociatesIncDetails",
      "http://www.codexis.com/role/RelatedPartyTransactionsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_EMEAMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Regions of Europe, Middle East and Africa.",
        "label": "EMEA [Member]",
        "terseLabel": "EMEA"
       }
      }
     },
     "localname": "EMEAMember",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionDisaggregationofRevenueDetails",
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationRevenuesDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_EarningsPerShareAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Earnings Per Share [Abstract]",
        "terseLabel": "Earnings Per Share [Abstract]"
       }
      }
     },
     "localname": "EarningsPerShareAbstract",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "xbrltype": "stringItemType"
    },
    "us-gaap_EarningsPerShareBasic": {
     "auth_ref": [
      "r210",
      "r230",
      "r231",
      "r232",
      "r233",
      "r234",
      "r239",
      "r241",
      "r244",
      "r245",
      "r246",
      "r250",
      "r547",
      "r548",
      "r611",
      "r615",
      "r660"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The amount of net income (loss) for the period per each share of common stock or unit outstanding during the reporting period.",
        "label": "Earnings Per Share, Basic",
        "terseLabel": "Net loss per share, basic (in dollars per share)"
       }
      }
     },
     "localname": "EarningsPerShareBasic",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofOperations"
     ],
     "xbrltype": "perShareItemType"
    },
    "us-gaap_EarningsPerShareDiluted": {
     "auth_ref": [
      "r210",
      "r230",
      "r231",
      "r232",
      "r233",
      "r234",
      "r241",
      "r244",
      "r245",
      "r246",
      "r250",
      "r547",
      "r548",
      "r611",
      "r615",
      "r660"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The amount of net income (loss) for the period available to each share of common stock or common unit outstanding during the reporting period and to each share or unit that would have been outstanding assuming the issuance of common shares or units for all dilutive potential common shares or units outstanding during the reporting period.",
        "label": "Earnings Per Share, Diluted",
        "terseLabel": "Net loss per share, diluted (in dollars per share)"
       }
      }
     },
     "localname": "EarningsPerShareDiluted",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofOperations"
     ],
     "xbrltype": "perShareItemType"
    },
    "us-gaap_EarningsPerShareTextBlock": {
     "auth_ref": [
      "r247",
      "r248",
      "r249",
      "r251"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The entire disclosure for earnings per share.",
        "label": "Earnings Per Share [Text Block]",
        "terseLabel": "Net Loss per Share"
       }
      }
     },
     "localname": "EarningsPerShareTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/NetLossperShare"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_EmployeeRelatedLiabilitiesCurrent": {
     "auth_ref": [
      "r19"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedBalanceSheets": {
       "order": 2.0,
       "parentTag": "us-gaap_LiabilitiesCurrent",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Total of the carrying values as of the balance sheet date of obligations incurred through that date and payable for obligations related to services received from employees, such as accrued salaries and bonuses, payroll taxes and fringe benefits. Used to reflect the current portion of the liabilities (due within one year or within the normal operating cycle if longer).",
        "label": "Employee-related Liabilities, Current",
        "terseLabel": "Employee-related liabilities, current",
        "verboseLabel": "Accrued compensation"
       }
      }
     },
     "localname": "EmployeeRelatedLiabilitiesCurrent",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedBalanceSheets",
      "http://www.codexis.com/role/RestructuringChargesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_EmployeeServiceShareBasedCompensationAggregateDisclosuresAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Share-Based Payment Arrangement, Additional Disclosure [Abstract]",
        "verboseLabel": "Schedule of stock-based compensation expense"
       }
      }
     },
     "localname": "EmployeeServiceShareBasedCompensationAggregateDisclosuresAbstract",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationStockBasedCompensationExpenseDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_EmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsLineItems": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table.",
        "label": "Share-Based Payment Arrangement, Expensed and Capitalized, Amount [Line Items]",
        "terseLabel": "Employee Service Share-based Compensation, Allocation of Recognized Period Costs [Line Items]"
       }
      }
     },
     "localname": "EmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsLineItems",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationStockBasedCompensationExpenseDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedPeriodForRecognition1": {
     "auth_ref": [
      "r494"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Weighted-average period over which cost not yet recognized is expected to be recognized for award under share-based payment arrangement, in 'PnYnMnDTnHnMnS' format, for example, 'P1Y5M13D' represents reported fact of one year, five months, and thirteen days.",
        "label": "Share-Based Payment Arrangement, Nonvested Award, Cost Not yet Recognized, Period for Recognition",
        "terseLabel": "Weighted-average remaining amortization period"
       }
      }
     },
     "localname": "EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedPeriodForRecognition1",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationNarrativeDetails"
     ],
     "xbrltype": "durationItemType"
    },
    "us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedShareBasedAwardsOtherThanOptions": {
     "auth_ref": [
      "r792"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of cost to be recognized for nonvested award under share-based payment arrangement. Excludes share and unit options.",
        "label": "Share-Based Payment Arrangement, Nonvested Award, Excluding Option, Cost Not yet Recognized, Amount",
        "terseLabel": "Unrecognized compensation cost, awards other than options"
       }
      }
     },
     "localname": "EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedShareBasedAwardsOtherThanOptions",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationNarrativeDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedStockOptions": {
     "auth_ref": [
      "r792"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of cost to be recognized for option under share-based payment arrangement.",
        "label": "Share-Based Payment Arrangement, Nonvested Award, Option, Cost Not yet Recognized, Amount",
        "terseLabel": "Unrecognized compensation cost, options"
       }
      }
     },
     "localname": "EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedStockOptions",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationNarrativeDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_EmployeeStockOptionMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Share-based payment arrangement granting right, subject to vesting and other restrictions, to purchase or sell certain number of shares at predetermined price for specified period of time.",
        "label": "Share-Based Payment Arrangement, Option [Member]",
        "terseLabel": "Stock options"
       }
      }
     },
     "localname": "EmployeeStockOptionMember",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationAssumptionsUsedDetails",
      "http://www.codexis.com/role/StockbasedCompensationNarrativeDetails",
      "http://www.codexis.com/role/StockbasedCompensationStockBasedCompensationExpenseDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_EquipmentMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Tangible personal property used to produce goods and services.",
        "label": "Equipment [Member]",
        "terseLabel": "Laboratory equipment"
       }
      }
     },
     "localname": "EquipmentMember",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetDetailsPropertyandEquipmentnetDetails",
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesPropertyPlantandEquipmentDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_EquityAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Equity [Abstract]",
        "terseLabel": "Equity [Abstract]"
       }
      }
     },
     "localname": "EquityAbstract",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "xbrltype": "stringItemType"
    },
    "us-gaap_EquityComponentDomain": {
     "auth_ref": [
      "r98",
      "r181",
      "r206",
      "r207",
      "r208",
      "r225",
      "r226",
      "r227",
      "r229",
      "r235",
      "r237",
      "r253",
      "r314",
      "r407",
      "r496",
      "r497",
      "r498",
      "r525",
      "r526",
      "r546",
      "r553",
      "r554",
      "r555",
      "r556",
      "r557",
      "r558",
      "r578",
      "r618",
      "r619",
      "r620"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Components of equity are the parts of the total Equity balance including that which is allocated to common, preferred, treasury stock, retained earnings, etc.",
        "label": "Equity Component [Domain]",
        "terseLabel": "Equity Component [Domain]"
       }
      }
     },
     "localname": "EquityComponentDomain",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofStockholdersEquity"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_EquitySecuritiesWithoutReadilyDeterminableFairValueAmount": {
     "auth_ref": [
      "r309"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of investment in equity security without readily determinable fair value.",
        "label": "Equity Securities without Readily Determinable Fair Value, Amount",
        "terseLabel": "Investment in non-marketable equity securities"
       }
      }
     },
     "localname": "EquitySecuritiesWithoutReadilyDeterminableFairValueAmount",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/InvestmentsinNonMarketableSecuritiesCarryingValueandFairValueofSecuritiesDetails",
      "http://www.codexis.com/role/InvestmentsinNonMarketableSecuritiesNarrativeDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_EquitySecuritiesWithoutReadilyDeterminableFairValueLineItems": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table.",
        "label": "Equity Securities without Readily Determinable Fair Value [Line Items]",
        "terseLabel": "Equity Securities without Readily Determinable Fair Value [Line Items]"
       }
      }
     },
     "localname": "EquitySecuritiesWithoutReadilyDeterminableFairValueLineItems",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/InvestmentsinNonMarketableSecuritiesCarryingValueandFairValueofSecuritiesDetails",
      "http://www.codexis.com/role/InvestmentsinNonMarketableSecuritiesNarrativeDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_EquitySecuritiesWithoutReadilyDeterminableFairValueTable": {
     "auth_ref": [
      "r738",
      "r739",
      "r740"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Disclosure of information about investment in equity security without readily determinable fair value.",
        "label": "Equity Securities without Readily Determinable Fair Value [Table]",
        "terseLabel": "Equity Securities without Readily Determinable Fair Value [Table]"
       }
      }
     },
     "localname": "EquitySecuritiesWithoutReadilyDeterminableFairValueTable",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/InvestmentsinNonMarketableSecuritiesCarryingValueandFairValueofSecuritiesDetails",
      "http://www.codexis.com/role/InvestmentsinNonMarketableSecuritiesNarrativeDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_EquitySecuritiesWithoutReadilyDeterminableFairValueTableTextBlock": {
     "auth_ref": [
      "r738",
      "r739",
      "r740"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Tabular disclosure of investment in equity security without readily determinable fair value.",
        "label": "Equity Securities without Readily Determinable Fair Value [Table Text Block]",
        "terseLabel": "Carrying Value of Non-marketable Equity Securities"
       }
      }
     },
     "localname": "EquitySecuritiesWithoutReadilyDeterminableFairValueTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/InvestmentsinNonMarketableSecuritiesTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_EquitySecuritiesWithoutReadilyDeterminableFairValueUpwardPriceAdjustmentAnnualAmount": {
     "auth_ref": [
      "r310"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of gain from upward price adjustment on investment in equity security without readily determinable fair value.",
        "label": "Equity Securities without Readily Determinable Fair Value, Upward Price Adjustment, Annual Amount",
        "terseLabel": "Equity securities without readily determinable fair value, upward price adjustment, annual amount"
       }
      }
     },
     "localname": "EquitySecuritiesWithoutReadilyDeterminableFairValueUpwardPriceAdjustmentAnnualAmount",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/InvestmentsinNonMarketableSecuritiesNarrativeDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table.",
        "label": "Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items]",
        "terseLabel": "Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items]"
       }
      }
     },
     "localname": "FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/FairValueMeasurementsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable": {
     "auth_ref": [
      "r549",
      "r550",
      "r551"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Disclosure of information about asset and liability measured at fair value on recurring and nonrecurring basis.",
        "label": "Fair Value, Recurring and Nonrecurring [Table]",
        "terseLabel": "Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Table]"
       }
      }
     },
     "localname": "FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/FairValueMeasurementsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_FairValueAssetsMeasuredOnRecurringBasisTextBlock": {
     "auth_ref": [
      "r135",
      "r136"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Tabular disclosure of assets, including [financial] instruments measured at fair value that are classified in stockholders' equity, if any, by class that are measured at fair value on a recurring basis. The disclosures contemplated herein include the fair value measurements at the reporting date by the level within the fair value hierarchy in which the fair value measurements in their entirety fall, segregating fair value measurements using quoted prices in active markets for identical assets (Level 1), significant other observable inputs (Level 2), and significant unobservable inputs (Level 3).",
        "label": "Fair Value, Assets Measured on Recurring Basis [Table Text Block]",
        "verboseLabel": "Summary of Financial Instruments Measured at Fair Value on a Recurring Basis"
       }
      }
     },
     "localname": "FairValueAssetsMeasuredOnRecurringBasisTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/FairValueMeasurementsTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_FairValueByFairValueHierarchyLevelAxis": {
     "auth_ref": [
      "r385",
      "r438",
      "r439",
      "r440",
      "r441",
      "r442",
      "r443",
      "r550",
      "r588",
      "r589",
      "r590",
      "r672",
      "r673",
      "r686",
      "r687",
      "r688"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Information by level within fair value hierarchy and fair value measured at net asset value per share as practical expedient.",
        "label": "Fair Value Hierarchy and NAV [Axis]",
        "terseLabel": "Fair Value Hierarchy and NAV [Axis]"
       }
      }
     },
     "localname": "FairValueByFairValueHierarchyLevelAxis",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/FairValueMeasurementsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_FairValueDisclosuresAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Fair Value Disclosures [Abstract]",
        "terseLabel": "Fair Value Disclosures [Abstract]"
       }
      }
     },
     "localname": "FairValueDisclosuresAbstract",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "xbrltype": "stringItemType"
    },
    "us-gaap_FairValueInputsLevel1Member": {
     "auth_ref": [
      "r385",
      "r438",
      "r443",
      "r550",
      "r588",
      "r686",
      "r687",
      "r688"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Quoted prices in active markets for identical assets or liabilities that the reporting entity can access at the measurement date.",
        "label": "Fair Value, Inputs, Level 1 [Member]",
        "verboseLabel": "Level 1"
       }
      }
     },
     "localname": "FairValueInputsLevel1Member",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/FairValueMeasurementsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_FairValueInputsLevel2Member": {
     "auth_ref": [
      "r385",
      "r438",
      "r443",
      "r550",
      "r589",
      "r672",
      "r673",
      "r686",
      "r687",
      "r688"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Inputs other than quoted prices included within level 1 that are observable for an asset or liability, either directly or indirectly, including, but not limited to, quoted prices for similar assets or liabilities in active markets, or quoted prices for identical or similar assets or liabilities in inactive markets.",
        "label": "Fair Value, Inputs, Level 2 [Member]",
        "terseLabel": "Level 2"
       }
      }
     },
     "localname": "FairValueInputsLevel2Member",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/FairValueMeasurementsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_FairValueInputsLevel3Member": {
     "auth_ref": [
      "r385",
      "r438",
      "r439",
      "r440",
      "r441",
      "r442",
      "r443",
      "r550",
      "r590",
      "r672",
      "r673",
      "r686",
      "r687",
      "r688"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Unobservable inputs that reflect the entity's own assumption about the assumptions market participants would use in pricing.",
        "label": "Fair Value, Inputs, Level 3 [Member]",
        "verboseLabel": "Level\u00a03"
       }
      }
     },
     "localname": "FairValueInputsLevel3Member",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/FairValueMeasurementsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_FairValueMeasurementInputsDisclosureTextBlock": {
     "auth_ref": [
      "r138"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The entire disclosure of the fair value measurement of assets and liabilities, which includes financial instruments measured at fair value that are classified in shareholders' equity, which may be measured on a recurring or nonrecurring basis.",
        "label": "Fair Value Measurement and Measurement Inputs, Recurring and Nonrecurring [Text Block]",
        "verboseLabel": "Fair Value Measurements"
       }
      }
     },
     "localname": "FairValueMeasurementInputsDisclosureTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/FairValueMeasurements"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_FairValueMeasurementsFairValueHierarchyDomain": {
     "auth_ref": [
      "r385",
      "r438",
      "r439",
      "r440",
      "r441",
      "r442",
      "r443",
      "r588",
      "r589",
      "r590",
      "r672",
      "r673",
      "r686",
      "r687",
      "r688"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Categories used to prioritize the inputs to valuation techniques to measure fair value.",
        "label": "Fair Value Hierarchy and NAV [Domain]",
        "terseLabel": "Fair Value Hierarchy and NAV [Domain]"
       }
      }
     },
     "localname": "FairValueMeasurementsFairValueHierarchyDomain",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/FairValueMeasurementsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_FairValueOfFinancialInstrumentsPolicy": {
     "auth_ref": [
      "r137",
      "r139"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Disclosure of accounting policy for determining the fair value of financial instruments.",
        "label": "Fair Value of Financial Instruments, Policy [Policy Text Block]",
        "verboseLabel": "Fair Value Measurements"
       }
      }
     },
     "localname": "FairValueOfFinancialInstrumentsPolicy",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesPolicies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_FinanceLeaseInterestExpense": {
     "auth_ref": [
      "r563",
      "r568",
      "r694"
     ],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsandContingenciesLeaseCostsDetails": {
       "order": 2.0,
       "parentTag": "cdxs_FinanceLeaseCost",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of interest expense on finance lease liability.",
        "label": "Finance Lease, Interest Expense",
        "terseLabel": "Interest on lease obligations"
       }
      }
     },
     "localname": "FinanceLeaseInterestExpense",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesLeaseCostsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FinanceLeaseInterestPaymentOnLiability": {
     "auth_ref": [
      "r565",
      "r572"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of interest paid on finance lease liability.",
        "label": "Finance Lease, Interest Payment on Liability",
        "terseLabel": "Operating cash flow from finance leases"
       }
      }
     },
     "localname": "FinanceLeaseInterestPaymentOnLiability",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesOtherLeaseInformationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FinanceLeasePrincipalPayments": {
     "auth_ref": [
      "r564",
      "r572"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows": {
       "order": 4.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInFinancingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of cash outflow for principal payment on finance lease.",
        "label": "Finance Lease, Principal Payments",
        "negatedLabel": "Payments of lease obligations - Finance leases",
        "terseLabel": "Financing cash flows from finance leases"
       }
      }
     },
     "localname": "FinanceLeasePrincipalPayments",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesOtherLeaseInformationDetails",
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FinanceLeaseRightOfUseAsset": {
     "auth_ref": [
      "r561"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedBalanceSheets": {
       "order": 8.0,
       "parentTag": "us-gaap_Assets",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount, after accumulated amortization, of right-of-use asset from finance lease.",
        "label": "Finance Lease, Right-of-Use Asset, after Accumulated Amortization",
        "terseLabel": "Right-of-use assets - Finance leases, net"
       }
      }
     },
     "localname": "FinanceLeaseRightOfUseAsset",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FinanceLeaseRightOfUseAssetAmortization": {
     "auth_ref": [
      "r563",
      "r568",
      "r694"
     ],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsandContingenciesLeaseCostsDetails": {
       "order": 1.0,
       "parentTag": "cdxs_FinanceLeaseCost",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of amortization expense attributable to right-of-use asset from finance lease.",
        "label": "Finance Lease, Right-of-Use Asset, Amortization",
        "terseLabel": "Amortization of right-of-use assets"
       }
      }
     },
     "localname": "FinanceLeaseRightOfUseAssetAmortization",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesLeaseCostsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_FinancialInstrumentsFinancialAssetsBalanceSheetGroupingsAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Financial Instruments, Financial Assets, Balance Sheet Groupings [Abstract]",
        "terseLabel": "Financial Instruments, Financial Assets, Balance Sheet Groupings [Abstract]"
       }
      }
     },
     "localname": "FinancialInstrumentsFinancialAssetsBalanceSheetGroupingsAbstract",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/FairValueMeasurementsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_FinancingReceivableAllowanceForCreditLossesLineItems": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table.",
        "label": "Financing Receivable, Allowance for Credit Loss [Line Items]",
        "terseLabel": "Financing Receivable, Allowance for Credit Loss [Line Items]"
       }
      }
     },
     "localname": "FinancingReceivableAllowanceForCreditLossesLineItems",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/AllowanceforCreditLossesSummaryofAccountsReceivablebyAgingCategoryDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_FinancingReceivableAllowanceForCreditLossesRollForward": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "A roll forward is a reconciliation of a concept from the beginning of a period to the end of a period.",
        "label": "Financing Receivable, Allowance for Credit Loss [Roll Forward]",
        "terseLabel": "Financing Receivable, Allowance for Credit Loss [Roll Forward]"
       }
      }
     },
     "localname": "FinancingReceivableAllowanceForCreditLossesRollForward",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/AllowanceforCreditLossesAnalysisofAllowanceforCreditLossesDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_FinancingReceivableBeforeAllowanceForCreditLossAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Financing Receivable, before Allowance for Credit Loss [Abstract]",
        "terseLabel": "Financial assets:"
       }
      }
     },
     "localname": "FinancingReceivableBeforeAllowanceForCreditLossAbstract",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedBalanceSheets"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_FinancingReceivables30To59DaysPastDueMember": {
     "auth_ref": [
      "r665"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Financial asset more than 29 days past due but fewer than 60 days past due.",
        "label": "Financial Asset, 30 to 59 Days Past Due [Member]",
        "terseLabel": "31-60 Days"
       }
      }
     },
     "localname": "FinancingReceivables30To59DaysPastDueMember",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/AllowanceforCreditLossesSummaryofAccountsReceivablebyAgingCategoryDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_FinancingReceivables60To89DaysPastDueMember": {
     "auth_ref": [
      "r665"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Financial asset more than 59 days past due but fewer than 90 days past due.",
        "label": "Financial Asset, 60 to 89 Days Past Due [Member]",
        "terseLabel": "61-90 Days"
       }
      }
     },
     "localname": "FinancingReceivables60To89DaysPastDueMember",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/AllowanceforCreditLossesSummaryofAccountsReceivablebyAgingCategoryDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_FinancingReceivablesEqualToGreaterThan90DaysPastDueMember": {
     "auth_ref": [
      "r665"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Financial asset equal to or greater than 90 days past due.",
        "label": "Financial Asset, Equal to or Greater than 90 Days Past Due [Member]",
        "terseLabel": "91 Days and Over"
       }
      }
     },
     "localname": "FinancingReceivablesEqualToGreaterThan90DaysPastDueMember",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/AllowanceforCreditLossesSummaryofAccountsReceivablebyAgingCategoryDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_FinancingReceivablesPeriodPastDueAxis": {
     "auth_ref": [
      "r306",
      "r318",
      "r665"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Information by period in which financial asset is past due or not past due.",
        "label": "Financial Asset, Aging [Axis]",
        "terseLabel": "Financial Asset, Period Past Due [Axis]"
       }
      }
     },
     "localname": "FinancingReceivablesPeriodPastDueAxis",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/AllowanceforCreditLossesSummaryofAccountsReceivablebyAgingCategoryDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_FinancingReceivablesPeriodPastDueDomain": {
     "auth_ref": [
      "r306",
      "r318",
      "r665"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Period in which financial asset is past due or not past due. For past due, element name and standard label in Financial Asset, [numeric lower end] to [numeric higher end] [date measure] Past Due [Member] or Financial Asset, Greater than [low end numeric value] [date measure] Past Due [Member] or Financial Asset, Less than [high end numeric value] [date measure] Past Due [Member] formats.",
        "label": "Financial Asset, Aging [Domain]",
        "terseLabel": "Financial Asset, Period Past Due [Domain]"
       }
      }
     },
     "localname": "FinancingReceivablesPeriodPastDueDomain",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/AllowanceforCreditLossesSummaryofAccountsReceivablebyAgingCategoryDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_ForeignCurrencyTransactionsAndTranslationsPolicyTextBlock": {
     "auth_ref": [
      "r560"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Disclosure of accounting policy for (1) transactions denominated in a currency other than the reporting enterprise's functional currency, (2) translating foreign currency financial statements that are incorporated into the financial statements of the reporting enterprise by consolidation, combination, or the equity method of accounting, and (3) remeasurement of the financial statements of a foreign reporting enterprise in a hyperinflationary economy.",
        "label": "Foreign Currency Transactions and Translations Policy [Policy Text Block]",
        "verboseLabel": "Foreign Currency Translation"
       }
      }
     },
     "localname": "ForeignCurrencyTransactionsAndTranslationsPolicyTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesPolicies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_FurnitureAndFixturesMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Equipment commonly used in offices and stores that have no permanent connection to the structure of a building or utilities. Examples include, but are not limited to, desks, chairs, tables, and bookcases.",
        "label": "Furniture and Fixtures [Member]",
        "terseLabel": "Office equipment and furniture"
       }
      }
     },
     "localname": "FurnitureAndFixturesMember",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetDetailsPropertyandEquipmentnetDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_Goodwill": {
     "auth_ref": [
      "r190",
      "r332",
      "r608",
      "r666",
      "r695",
      "r745",
      "r746"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedBalanceSheets": {
       "order": 7.0,
       "parentTag": "us-gaap_Assets",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount after accumulated impairment loss of an asset representing future economic benefits arising from other assets acquired in a business combination that are not individually identified and separately recognized.",
        "label": "Goodwill",
        "terseLabel": "Goodwill",
        "verboseLabel": "Goodwill"
       }
      }
     },
     "localname": "Goodwill",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetDetailsGoodwillDetails",
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesNarrativeDetails",
      "http://www.codexis.com/role/ConsolidatedBalanceSheets",
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationGoodwillDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_GoodwillAndIntangibleAssetsGoodwillPolicy": {
     "auth_ref": [
      "r342",
      "r343",
      "r666"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Disclosure of accounting policy for goodwill. This accounting policy also may address how an entity assesses and measures impairment of goodwill, how reporting units are determined, how goodwill is allocated to such units, and how the fair values of the reporting units are determined.",
        "label": "Goodwill and Intangible Assets, Goodwill, Policy [Policy Text Block]",
        "terseLabel": "Goodwill"
       }
      }
     },
     "localname": "GoodwillAndIntangibleAssetsGoodwillPolicy",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesPolicies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_GranteeStatusAxis": {
     "auth_ref": [
      "r458",
      "r460",
      "r462",
      "r463",
      "r464",
      "r466",
      "r467",
      "r468",
      "r469",
      "r470",
      "r471",
      "r472",
      "r473",
      "r474",
      "r475",
      "r476",
      "r477",
      "r478",
      "r479",
      "r480",
      "r481",
      "r482",
      "r483",
      "r486",
      "r487",
      "r488",
      "r489",
      "r490"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Information by status of recipient to whom award is granted.",
        "label": "Grantee Status [Axis]",
        "terseLabel": "Grantee Status [Axis]"
       }
      }
     },
     "localname": "GranteeStatusAxis",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofStockholdersEquity",
      "http://www.codexis.com/role/StockbasedCompensationAssumptionsUsedDetails",
      "http://www.codexis.com/role/StockbasedCompensationNarrativeDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_GranteeStatusDomain": {
     "auth_ref": [
      "r458",
      "r460",
      "r462",
      "r463",
      "r464",
      "r466",
      "r467",
      "r468",
      "r469",
      "r470",
      "r471",
      "r472",
      "r473",
      "r474",
      "r475",
      "r476",
      "r477",
      "r478",
      "r479",
      "r480",
      "r481",
      "r482",
      "r483",
      "r486",
      "r487",
      "r488",
      "r489",
      "r490"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Status of recipient to whom award is granted.",
        "label": "Grantee Status [Domain]",
        "terseLabel": "Grantee Status [Domain]"
       }
      }
     },
     "localname": "GranteeStatusDomain",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofStockholdersEquity",
      "http://www.codexis.com/role/StockbasedCompensationAssumptionsUsedDetails",
      "http://www.codexis.com/role/StockbasedCompensationNarrativeDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_ImpairmentOfLongLivedAssetsHeldForUse": {
     "auth_ref": [
      "r44",
      "r82",
      "r87"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The aggregate amount of write-downs for impairments recognized during the period for long lived assets held for use (including those held for disposal by means other than sale).",
        "label": "Impairment, Long-Lived Asset, Held-for-Use",
        "terseLabel": "Impairment of long-lived assets held-for-use"
       }
      }
     },
     "localname": "ImpairmentOfLongLivedAssetsHeldForUse",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesNarrativeDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ImpairmentOrDisposalOfLongLivedAssetsPolicyTextBlock": {
     "auth_ref": [
      "r81",
      "r88"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Disclosure of accounting policy for recognizing and measuring the impairment of long-lived assets. An entity also may disclose its accounting policy for long-lived assets to be sold. This policy excludes goodwill and intangible assets.",
        "label": "Impairment or Disposal of Long-Lived Assets, Policy [Policy Text Block]",
        "terseLabel": "Impairment of Long-Lived Assets"
       }
      }
     },
     "localname": "ImpairmentOrDisposalOfLongLivedAssetsPolicyTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesPolicies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesDomestic": {
     "auth_ref": [
      "r219",
      "r531"
     ],
     "calculation": {
      "http://www.codexis.com/role/IncomeTaxesComponentsofLossBeforeProvisionforIncomeTaxesDetails": {
       "order": 1.0,
       "parentTag": "us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The portion of earnings or loss from continuing operations before income taxes that is attributable to domestic operations.",
        "label": "Income (Loss) from Continuing Operations before Income Taxes, Domestic",
        "terseLabel": "United States"
       }
      }
     },
     "localname": "IncomeLossFromContinuingOperationsBeforeIncomeTaxesDomestic",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesComponentsofLossBeforeProvisionforIncomeTaxesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest": {
     "auth_ref": [
      "r26",
      "r151",
      "r161",
      "r176",
      "r275",
      "r286",
      "r292",
      "r295",
      "r612",
      "r662"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedStatementsofOperations": {
       "order": 1.0,
       "parentTag": "us-gaap_NetIncomeLoss",
       "weight": 1.0
      },
      "http://www.codexis.com/role/IncomeTaxesComponentsofLossBeforeProvisionforIncomeTaxesDetails": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of income (loss) from continuing operations, including income (loss) from equity method investments, before deduction of income tax expense (benefit), and income (loss) attributable to noncontrolling interest.",
        "label": "Income (Loss) from Continuing Operations before Income Taxes, Noncontrolling Interest",
        "totalLabel": "Loss before income taxes"
       }
      }
     },
     "localname": "IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofOperations",
      "http://www.codexis.com/role/IncomeTaxesComponentsofLossBeforeProvisionforIncomeTaxesDetails",
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationSegmentReportingDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesForeign": {
     "auth_ref": [
      "r219",
      "r531"
     ],
     "calculation": {
      "http://www.codexis.com/role/IncomeTaxesComponentsofLossBeforeProvisionforIncomeTaxesDetails": {
       "order": 2.0,
       "parentTag": "us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The portion of earnings or loss from continuing operations before income taxes that is attributable to foreign operations, which is defined as Income or Loss generated from operations located outside the entity's country of domicile.",
        "label": "Income (Loss) from Continuing Operations before Income Taxes, Foreign",
        "terseLabel": "Foreign"
       }
      }
     },
     "localname": "IncomeLossFromContinuingOperationsBeforeIncomeTaxesForeign",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesComponentsofLossBeforeProvisionforIncomeTaxesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncomeStatementAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Income Statement [Abstract]",
        "terseLabel": "Income Statement [Abstract]"
       }
      }
     },
     "localname": "IncomeStatementAbstract",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "xbrltype": "stringItemType"
    },
    "us-gaap_IncomeStatementLocationAxis": {
     "auth_ref": [
      "r344",
      "r351"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Information by location in the income statement.",
        "label": "Income Statement Location [Axis]",
        "verboseLabel": "Schedule of Employee Service Share-based Compensation, Allocation of Recognized Period Costs, by Report Line [Axis]"
       }
      }
     },
     "localname": "IncomeStatementLocationAxis",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationStockBasedCompensationExpenseDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_IncomeStatementLocationDomain": {
     "auth_ref": [
      "r351"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Location in the income statement.",
        "label": "Income Statement Location [Domain]",
        "verboseLabel": "Employee Service Share-based Compensation, Allocation of Recognized Period Costs, Report Line [Domain]"
       }
      }
     },
     "localname": "IncomeStatementLocationDomain",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationStockBasedCompensationExpenseDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_IncomeTaxAuthorityAxis": {
     "auth_ref": [
      "r126"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Information by tax jurisdiction.",
        "label": "Income Tax Authority [Axis]",
        "terseLabel": "Income Tax Authority [Axis]"
       }
      }
     },
     "localname": "IncomeTaxAuthorityAxis",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesNOLCarryforwardsandFederalResearchandDevelopmentTaxCreditsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_IncomeTaxAuthorityDomain": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Agency, division or body classification that levies income taxes, examines tax returns for compliance, or grants exemptions from or makes other decisions pertaining to income taxes.",
        "label": "Income Tax Authority [Domain]",
        "terseLabel": "Income Tax Authority [Domain]"
       }
      }
     },
     "localname": "IncomeTaxAuthorityDomain",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesNOLCarryforwardsandFederalResearchandDevelopmentTaxCreditsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_IncomeTaxDisclosureAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Income Tax Disclosure [Abstract]",
        "terseLabel": "Income Tax Disclosure [Abstract]"
       }
      }
     },
     "localname": "IncomeTaxDisclosureAbstract",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "xbrltype": "stringItemType"
    },
    "us-gaap_IncomeTaxDisclosureTextBlock": {
     "auth_ref": [
      "r220",
      "r508",
      "r514",
      "r521",
      "r527",
      "r532",
      "r534",
      "r535",
      "r536"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The entire disclosure for income taxes. Disclosures may include net deferred tax liability or asset recognized in an enterprise's statement of financial position, net change during the year in the total valuation allowance, approximate tax effect of each type of temporary difference and carryforward that gives rise to a significant portion of deferred tax liabilities and deferred tax assets, utilization of a tax carryback, and tax uncertainties information.",
        "label": "Income Tax Disclosure [Text Block]",
        "terseLabel": "Income Taxes"
       }
      }
     },
     "localname": "IncomeTaxDisclosureTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxes"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_IncomeTaxExpenseBenefit": {
     "auth_ref": [
      "r221",
      "r236",
      "r237",
      "r273",
      "r506",
      "r528",
      "r533",
      "r616"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedStatementsofOperations": {
       "order": 2.0,
       "parentTag": "us-gaap_NetIncomeLoss",
       "weight": -1.0
      },
      "http://www.codexis.com/role/IncomeTaxesComponentsofProvisionforIncomeTaxesDetails": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      },
      "http://www.codexis.com/role/IncomeTaxesTaxRateReconciliationDetails": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of current income tax expense (benefit) and deferred income tax expense (benefit) pertaining to continuing operations.",
        "label": "Income Tax Expense (Benefit)",
        "totalLabel": "Provision for income taxes",
        "verboseLabel": "Provision for income taxes"
       }
      }
     },
     "localname": "IncomeTaxExpenseBenefit",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofOperations",
      "http://www.codexis.com/role/IncomeTaxesComponentsofProvisionforIncomeTaxesDetails",
      "http://www.codexis.com/role/IncomeTaxesTaxRateReconciliationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncomeTaxExpenseBenefitContinuingOperationsIncomeTaxReconciliationAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Income Tax Expense (Benefit), Effective Income Tax Rate Reconciliation, Amount [Abstract]",
        "terseLabel": "Income Tax Rate Reconciliation"
       }
      }
     },
     "localname": "IncomeTaxExpenseBenefitContinuingOperationsIncomeTaxReconciliationAbstract",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesTaxRateReconciliationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_IncomeTaxPolicyTextBlock": {
     "auth_ref": [
      "r205",
      "r504",
      "r505",
      "r514",
      "r515",
      "r520",
      "r524"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Disclosure of accounting policy for income taxes, which may include its accounting policies for recognizing and measuring deferred tax assets and liabilities and related valuation allowances, recognizing investment tax credits, operating loss carryforwards, tax credit carryforwards, and other carryforwards, methodologies for determining its effective income tax rate and the characterization of interest and penalties in the financial statements.",
        "label": "Income Tax, Policy [Policy Text Block]",
        "verboseLabel": "Income Taxes"
       }
      }
     },
     "localname": "IncomeTaxPolicyTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesPolicies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_IncomeTaxReconciliationChangeInDeferredTaxAssetsValuationAllowance": {
     "auth_ref": [
      "r793"
     ],
     "calculation": {
      "http://www.codexis.com/role/IncomeTaxesTaxRateReconciliationDetails": {
       "order": 8.0,
       "parentTag": "us-gaap_IncomeTaxExpenseBenefit",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of the difference between reported income tax expense (benefit) and expected income tax expense (benefit) computed by applying the domestic federal statutory income tax rates to pretax income (loss) from continuing operations attributable to increase (decrease) in the valuation allowance for deferred tax assets.",
        "label": "Effective Income Tax Rate Reconciliation, Change in Deferred Tax Assets Valuation Allowance, Amount",
        "terseLabel": "Change in valuation allowance"
       }
      }
     },
     "localname": "IncomeTaxReconciliationChangeInDeferredTaxAssetsValuationAllowance",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesTaxRateReconciliationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncomeTaxReconciliationForeignIncomeTaxRateDifferential": {
     "auth_ref": [
      "r793"
     ],
     "calculation": {
      "http://www.codexis.com/role/IncomeTaxesTaxRateReconciliationDetails": {
       "order": 4.0,
       "parentTag": "us-gaap_IncomeTaxExpenseBenefit",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of the difference between reported income tax expense (benefit) and expected income tax expense (benefit) computed by applying the domestic federal statutory income tax rates to pretax income (loss) from continuing operations attributable to foreign income tax expense (benefit).",
        "label": "Effective Income Tax Rate Reconciliation, Foreign Income Tax Rate Differential, Amount",
        "terseLabel": "Foreign operations taxed at different rates"
       }
      }
     },
     "localname": "IncomeTaxReconciliationForeignIncomeTaxRateDifferential",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesTaxRateReconciliationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncomeTaxReconciliationIncomeTaxExpenseBenefitAtFederalStatutoryIncomeTaxRate": {
     "auth_ref": [
      "r507"
     ],
     "calculation": {
      "http://www.codexis.com/role/IncomeTaxesTaxRateReconciliationDetails": {
       "order": 1.0,
       "parentTag": "us-gaap_IncomeTaxExpenseBenefit",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The amount of income tax expense or benefit for the period computed by applying the domestic federal statutory tax rates to pretax income from continuing operations.",
        "label": "Effective Income Tax Rate Reconciliation at Federal Statutory Income Tax Rate, Amount",
        "terseLabel": "Tax benefit at federal statutory rate"
       }
      }
     },
     "localname": "IncomeTaxReconciliationIncomeTaxExpenseBenefitAtFederalStatutoryIncomeTaxRate",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesTaxRateReconciliationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncomeTaxReconciliationNondeductibleExpenseOther": {
     "auth_ref": [
      "r793"
     ],
     "calculation": {
      "http://www.codexis.com/role/IncomeTaxesTaxRateReconciliationDetails": {
       "order": 6.0,
       "parentTag": "us-gaap_IncomeTaxExpenseBenefit",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of the difference between reported income tax expense (benefit) and expected income tax expense (benefit) computed by applying the domestic federal statutory income tax rates to pretax income (loss) from continuing operations attributable to other nondeductible expenses.",
        "label": "Effective Income Tax Rate Reconciliation, Nondeductible Expense, Other, Amount",
        "terseLabel": "Other nondeductible items"
       }
      }
     },
     "localname": "IncomeTaxReconciliationNondeductibleExpenseOther",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesTaxRateReconciliationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncomeTaxReconciliationNondeductibleExpenseShareBasedCompensationCost": {
     "auth_ref": [
      "r793"
     ],
     "calculation": {
      "http://www.codexis.com/role/IncomeTaxesTaxRateReconciliationDetails": {
       "order": 5.0,
       "parentTag": "us-gaap_IncomeTaxExpenseBenefit",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of reported income tax expense (benefit) in excess of (less than) expected income tax expense (benefit) computed by applying domestic federal statutory income tax rate to pretax income (loss) from continuing operation, attributable to nondeductible expense for award under share-based payment arrangement. Includes, but is not limited to, expense determined to be nondeductible upon grant or after for award under share-based payment arrangement.",
        "label": "Effective Income Tax Rate Reconciliation, Nondeductible Expense, Share-Based Payment Arrangement, Amount",
        "terseLabel": "Stock-based compensation"
       }
      }
     },
     "localname": "IncomeTaxReconciliationNondeductibleExpenseShareBasedCompensationCost",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesTaxRateReconciliationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncomeTaxReconciliationStateAndLocalIncomeTaxes": {
     "auth_ref": [
      "r793"
     ],
     "calculation": {
      "http://www.codexis.com/role/IncomeTaxesTaxRateReconciliationDetails": {
       "order": 2.0,
       "parentTag": "us-gaap_IncomeTaxExpenseBenefit",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of the difference between reported income tax expense (benefit) and expected income tax expense (benefit) computed by applying the domestic federal statutory income tax rates to pretax income (loss) from continuing operations attributable to state and local income tax expense (benefit).",
        "label": "Effective Income Tax Rate Reconciliation, State and Local Income Taxes, Amount",
        "terseLabel": "State taxes"
       }
      }
     },
     "localname": "IncomeTaxReconciliationStateAndLocalIncomeTaxes",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesTaxRateReconciliationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncomeTaxReconciliationTaxCreditsResearch": {
     "auth_ref": [
      "r793"
     ],
     "calculation": {
      "http://www.codexis.com/role/IncomeTaxesTaxRateReconciliationDetails": {
       "order": 3.0,
       "parentTag": "us-gaap_IncomeTaxExpenseBenefit",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of the difference between reported income tax expense (benefit) and expected income tax expense (benefit) computed by applying the domestic federal statutory income tax rates to pretax income (loss) from continuing operations attributable to research tax credit.",
        "label": "Effective Income Tax Rate Reconciliation, Tax Credit, Research, Amount",
        "negatedTerseLabel": "Research and development credits"
       }
      }
     },
     "localname": "IncomeTaxReconciliationTaxCreditsResearch",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesTaxRateReconciliationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncomeTaxesPaidNet": {
     "auth_ref": [
      "r48"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The amount of cash paid during the current period to foreign, federal, state, and local authorities as taxes on income, net of any cash received during the current period as refunds for the overpayment of taxes.",
        "label": "Income Taxes Paid, Net",
        "terseLabel": "Income taxes"
       }
      }
     },
     "localname": "IncomeTaxesPaidNet",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncreaseDecreaseInAccountsPayable": {
     "auth_ref": [
      "r43"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows": {
       "order": 12.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The increase (decrease) during the reporting period in the aggregate amount of liabilities incurred (and for which invoices have typically been received) and payable to vendors for goods and services received that are used in an entity's business.",
        "label": "Increase (Decrease) in Accounts Payable",
        "verboseLabel": "Accounts payable"
       }
      }
     },
     "localname": "IncreaseDecreaseInAccountsPayable",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncreaseDecreaseInAccruedLiabilities": {
     "auth_ref": [
      "r43"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows": {
       "order": 13.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The increase (decrease) during the reporting period in the aggregate amount of expenses incurred but not yet paid.",
        "label": "Increase (Decrease) in Accrued Liabilities",
        "terseLabel": "Accrued compensation and other accrued liabilities"
       }
      }
     },
     "localname": "IncreaseDecreaseInAccruedLiabilities",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncreaseDecreaseInContractWithCustomerLiability": {
     "auth_ref": [
      "r593",
      "r722"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows": {
       "order": 15.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of increase (decrease) in obligation to transfer good or service to customer for which consideration has been received or is receivable.",
        "label": "Increase (Decrease) in Contract with Customer, Liability",
        "verboseLabel": "Deferred revenue ($0, $245, $0 to a related party)"
       }
      }
     },
     "localname": "IncreaseDecreaseInContractWithCustomerLiability",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncreaseDecreaseInFinanceReceivables": {
     "auth_ref": [
      "r43"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows": {
       "order": 9.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The increase (decrease) during the reporting period in outstanding loans including accrued interest.",
        "label": "Increase (Decrease) in Finance Receivables",
        "negatedTerseLabel": "Financial assets ($0, $0 and ($450) from a related party)",
        "terseLabel": "Financial assets"
       }
      }
     },
     "localname": "IncreaseDecreaseInFinanceReceivables",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows",
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlowsParenthetical"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncreaseDecreaseInInventories": {
     "auth_ref": [
      "r43"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows": {
       "order": 10.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The increase (decrease) during the reporting period in the aggregate value of all inventory held by the reporting entity, associated with underlying transactions that are classified as operating activities.",
        "label": "Increase (Decrease) in Inventories",
        "negatedLabel": "Inventories"
       }
      }
     },
     "localname": "IncreaseDecreaseInInventories",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncreaseDecreaseInOperatingCapitalAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Increase (Decrease) in Operating Capital [Abstract]",
        "verboseLabel": "Changes in operating assets and liabilities:"
       }
      }
     },
     "localname": "IncreaseDecreaseInOperatingCapitalAbstract",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_IncreaseDecreaseInOtherNoncurrentLiabilities": {
     "auth_ref": [],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows": {
       "order": 14.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of increase (decrease) in noncurrent operating liabilities classified as other.",
        "label": "Increase (Decrease) in Other Noncurrent Liabilities",
        "terseLabel": "Other long-term liabilities"
       }
      }
     },
     "localname": "IncreaseDecreaseInOtherNoncurrentLiabilities",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets": {
     "auth_ref": [
      "r43"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows": {
       "order": 11.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of increase (decrease) in prepaid expenses, and assets classified as other.",
        "label": "Increase (Decrease) in Prepaid Expense and Other Assets",
        "negatedLabel": "Prepaid expenses and other assets"
       }
      }
     },
     "localname": "IncreaseDecreaseInPrepaidDeferredExpenseAndOtherAssets",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_IncreaseDecreaseInStockholdersEquityRollForward": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "A roll forward is a reconciliation of a concept from the beginning of a period to the end of a period.",
        "label": "Increase (Decrease) in Stockholders' Equity [Roll Forward]",
        "terseLabel": "Increase (Decrease) in Stockholders' Equity [Roll Forward]"
       }
      }
     },
     "localname": "IncreaseDecreaseInStockholdersEquityRollForward",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofStockholdersEquity"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_IndemnificationGuaranteeMember": {
     "auth_ref": [
      "r90",
      "r93"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "An agreement (contract) that contingently requires the guarantor to make payments to the guaranteed party in compensation for that party's or parties' loss or injury attributable to specified events or actions, such as a patent infringement action against an entity that relied on certain representations as to ownership rights made by a software vendor.",
        "label": "Indemnification Agreement [Member]",
        "terseLabel": "Indemnification agreement"
       }
      }
     },
     "localname": "IndemnificationGuaranteeMember",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesNarrativeDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_InterestPaidNet": {
     "auth_ref": [
      "r213",
      "r215",
      "r216"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of cash paid for interest, excluding capitalized interest, classified as operating activity. Includes, but is not limited to, payment to settle zero-coupon bond for accreted interest of debt discount and debt instrument with insignificant coupon interest rate in relation to effective interest rate of borrowing attributable to accreted interest of debt discount.",
        "label": "Interest Paid, Excluding Capitalized Interest, Operating Activities",
        "terseLabel": "Interest paid"
       }
      }
     },
     "localname": "InterestPaidNet",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_InventoryFinishedGoods": {
     "auth_ref": [
      "r716"
     ],
     "calculation": {
      "http://www.codexis.com/role/BalanceSheetDetailsScheduleofInventoryComponentsDetails": {
       "order": 3.0,
       "parentTag": "us-gaap_InventoryNet",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount before valuation and LIFO reserves of completed merchandise or goods expected to be sold within one year or operating cycle, if longer.",
        "label": "Inventory, Finished Goods, Gross",
        "terseLabel": "Finished goods"
       }
      }
     },
     "localname": "InventoryFinishedGoods",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetDetailsScheduleofInventoryComponentsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_InventoryNet": {
     "auth_ref": [
      "r201",
      "r654",
      "r695"
     ],
     "calculation": {
      "http://www.codexis.com/role/BalanceSheetDetailsScheduleofInventoryComponentsDetails": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      },
      "http://www.codexis.com/role/ConsolidatedBalanceSheetsParenthetical": {
       "order": 2.0,
       "parentTag": "us-gaap_AssetsCurrent",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount after valuation and LIFO reserves of inventory expected to be sold, or consumed within one year or operating cycle, if longer.",
        "label": "Inventory, Net",
        "totalLabel": "Total inventories",
        "verboseLabel": "Inventories"
       }
      }
     },
     "localname": "InventoryNet",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetDetailsScheduleofInventoryComponentsDetails",
      "http://www.codexis.com/role/ConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_InventoryNetAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Inventory, Net [Abstract]",
        "verboseLabel": "Schedule of Inventory Components"
       }
      }
     },
     "localname": "InventoryNetAbstract",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetDetailsScheduleofInventoryComponentsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_InventoryPolicyTextBlock": {
     "auth_ref": [
      "r186",
      "r200",
      "r252",
      "r328",
      "r329",
      "r330",
      "r594",
      "r658"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Disclosure of inventory accounting policy for inventory classes, including, but not limited to, basis for determining inventory amounts, methods by which amounts are added and removed from inventory classes, loss recognition on impairment of inventories, and situations in which inventories are stated above cost.",
        "label": "Inventory, Policy [Policy Text Block]",
        "terseLabel": "Inventories"
       }
      }
     },
     "localname": "InventoryPolicyTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesPolicies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_InventoryRawMaterials": {
     "auth_ref": [
      "r718"
     ],
     "calculation": {
      "http://www.codexis.com/role/BalanceSheetDetailsScheduleofInventoryComponentsDetails": {
       "order": 1.0,
       "parentTag": "us-gaap_InventoryNet",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount before valuation and LIFO reserves of raw materials expected to be sold, or consumed within one year or operating cycle, if longer.",
        "label": "Inventory, Raw Materials, Gross",
        "terseLabel": "Raw materials"
       }
      }
     },
     "localname": "InventoryRawMaterials",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetDetailsScheduleofInventoryComponentsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_InventoryValuationReserves": {
     "auth_ref": [
      "r79",
      "r719"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of valuation reserve for inventory.",
        "label": "Inventory Valuation Reserves",
        "terseLabel": "Inventory reserves"
       }
      }
     },
     "localname": "InventoryValuationReserves",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetDetailsScheduleofInventoryComponentsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_InventoryWorkInProcess": {
     "auth_ref": [
      "r717"
     ],
     "calculation": {
      "http://www.codexis.com/role/BalanceSheetDetailsScheduleofInventoryComponentsDetails": {
       "order": 2.0,
       "parentTag": "us-gaap_InventoryNet",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount before valuation and LIFO reserves of merchandise or goods in the production process expected to be completed within one year or operating cycle, if longer.",
        "label": "Inventory, Work in Process, Gross",
        "terseLabel": "Work in process"
       }
      }
     },
     "localname": "InventoryWorkInProcess",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetDetailsScheduleofInventoryComponentsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_InvestmentIncomeAmortizationOfDiscount": {
     "auth_ref": [
      "r33"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of accretion of purchase discount on nonoperating securities.",
        "label": "Investment Income, Amortization of Discount",
        "terseLabel": "Interest income from amortization of discount"
       }
      }
     },
     "localname": "InvestmentIncomeAmortizationOfDiscount",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/InvestmentsinNonMarketableSecuritiesNarrativeDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_InvestmentIncomeInterest": {
     "auth_ref": [
      "r32",
      "r268"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedStatementsofOperations": {
       "order": 2.0,
       "parentTag": "us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount before accretion (amortization) of purchase discount (premium) of interest income on nonoperating securities.",
        "label": "Investment Income, Interest",
        "verboseLabel": "Interest income"
       }
      }
     },
     "localname": "InvestmentIncomeInterest",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofOperations"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_InvestmentOwnedBalanceShares": {
     "auth_ref": [
      "r177",
      "r627"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Balance held at close of period in number of shares.",
        "label": "Investment Owned, Balance, Shares",
        "terseLabel": "Investment owned, balance (in shares)"
       }
      }
     },
     "localname": "InvestmentOwnedBalanceShares",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsMolecularAssociatesIncDetails",
      "http://www.codexis.com/role/RelatedPartyTransactionsDetails"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_InvestmentPolicyTextBlock": {
     "auth_ref": [
      "r312",
      "r822"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Disclosure of accounting policy for investment in financial asset.",
        "label": "Investment, Policy [Policy Text Block]",
        "terseLabel": "Investment in Non-Marketable Securities"
       }
      }
     },
     "localname": "InvestmentPolicyTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesPolicies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_InvestmentsAndOtherNoncurrentAssets": {
     "auth_ref": [],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedBalanceSheets": {
       "order": 4.0,
       "parentTag": "us-gaap_Assets",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of investments, and noncurrent assets classified as other.",
        "label": "Investments and Other Noncurrent Assets",
        "terseLabel": "Investment in non-marketable equity securities ($13,921 and $12,713 with a related party)",
        "verboseLabel": "Investment in non-marketable equity securities"
       }
      }
     },
     "localname": "InvestmentsAndOtherNoncurrentAssets",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedBalanceSheets",
      "http://www.codexis.com/role/ConsolidatedBalanceSheetsParenthetical"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_InvestmentsDebtAndEquitySecuritiesAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Investments, Debt and Equity Securities [Abstract]"
       }
      }
     },
     "localname": "InvestmentsDebtAndEquitySecuritiesAbstract",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "xbrltype": "stringItemType"
    },
    "us-gaap_InvestmentsInDebtAndEquityInstrumentsCashAndCashEquivalentsUnrealizedAndRealizedGainsLossesTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The entire disclosure for cash, cash equivalents, investments in debt and equity instruments (including cost and equity investees and related income statement amounts), equity and cost method investments, investments in joint ventures and any other investment.",
        "label": "Investments in Debt and Equity Instruments, Cash and Cash Equivalents, Unrealized and Realized Gains (Losses) [Text Block]",
        "terseLabel": "Investments in Non-Marketable Securities"
       }
      }
     },
     "localname": "InvestmentsInDebtAndEquityInstrumentsCashAndCashEquivalentsUnrealizedAndRealizedGainsLossesTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/InvestmentsinNonMarketableSecurities"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_LeaseCost": {
     "auth_ref": [
      "r576",
      "r694"
     ],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsandContingenciesLeaseCostsDetails": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of lease cost recognized by lessee for lease contract.",
        "label": "Lease, Cost",
        "totalLabel": "Total lease cost"
       }
      }
     },
     "localname": "LeaseCost",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesLeaseCostsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LeaseCostTableTextBlock": {
     "auth_ref": [
      "r806"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Tabular disclosure of lessee's lease cost. Includes, but is not limited to, interest expense for finance lease, amortization of right-of-use asset for finance lease, operating lease cost, short-term lease cost, variable lease cost and sublease income.",
        "label": "Lease, Cost [Table Text Block]",
        "terseLabel": "Lease Cost"
       }
      }
     },
     "localname": "LeaseCostTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_LeaseholdImprovementsMember": {
     "auth_ref": [
      "r84"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Additions or improvements to assets held under a lease arrangement.",
        "label": "Leasehold Improvements [Member]",
        "terseLabel": "Leasehold improvements"
       }
      }
     },
     "localname": "LeaseholdImprovementsMember",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetDetailsPropertyandEquipmentnetDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_LesseeLeasesPolicyTextBlock": {
     "auth_ref": [
      "r567"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Disclosure of accounting policy for leasing arrangement entered into by lessee.",
        "label": "Lessee, Leases [Policy Text Block]",
        "terseLabel": "Lease Accounting"
       }
      }
     },
     "localname": "LesseeLeasesPolicyTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesPolicies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_LesseeOperatingLeaseLeaseNotYetCommencedRenewalTerm1": {
     "auth_ref": [
      "r805"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Term of lessee's operating lease renewal for lease not yet commenced, in 'PnYnMnDTnHnMnS' format, for example, 'P1Y5M13D' represents reported fact of one year, five months, and thirteen days.",
        "label": "Lessee, Operating Lease, Lease Not yet Commenced, Renewal Term",
        "terseLabel": "Lease renewal term"
       }
      }
     },
     "localname": "LesseeOperatingLeaseLeaseNotYetCommencedRenewalTerm1",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesNarrativeDetails"
     ],
     "xbrltype": "durationItemType"
    },
    "us-gaap_LesseeOperatingLeaseLeaseNotYetCommencedTermOfContract1": {
     "auth_ref": [
      "r805"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Term of lessee's operating lease not yet commenced, in 'PnYnMnDTnHnMnS' format, for example, 'P1Y5M13D' represents reported fact of one year, five months, and thirteen days.",
        "label": "Lessee, Operating Lease, Lease Not yet Commenced, Term of Contract",
        "terseLabel": "Lease term"
       }
      }
     },
     "localname": "LesseeOperatingLeaseLeaseNotYetCommencedTermOfContract1",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesNarrativeDetails"
     ],
     "xbrltype": "durationItemType"
    },
    "us-gaap_LesseeOperatingLeaseLiabilityMaturityTableTextBlock": {
     "auth_ref": [
      "r807"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Tabular disclosure of undiscounted cash flows of lessee's operating lease liability. Includes, but is not limited to, reconciliation of undiscounted cash flows to operating lease liability recognized in statement of financial position.",
        "label": "Lessee, Operating Lease, Liability, Maturity [Table Text Block]",
        "terseLabel": "Operating Lease Maturity"
       }
      }
     },
     "localname": "LesseeOperatingLeaseLiabilityMaturityTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue": {
     "auth_ref": [
      "r577"
     ],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsandContingenciesMaturityAnalysisofOperatingLeaseDetails": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      },
      "http://www.codexis.com/role/CommitmentsandContingenciesMaturityAnalysisofOperatingLeaseDetails_1": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of lessee's undiscounted obligation for lease payment for operating lease.",
        "label": "Lessee, Operating Lease, Liability, to be Paid",
        "totalLabel": "Total minimum lease payments"
       }
      }
     },
     "localname": "LesseeOperatingLeaseLiabilityPaymentsDue",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesMaturityAnalysisofOperatingLeaseDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueAfterYearFive": {
     "auth_ref": [
      "r577"
     ],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsandContingenciesMaturityAnalysisofOperatingLeaseDetails": {
       "order": 6.0,
       "parentTag": "us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of lessee's undiscounted obligation for lease payment for operating lease due after fifth fiscal year following current fiscal year. Excludes interim and annual periods when interim periods are reported from current statement of financial position date (rolling approach).",
        "label": "Lessee, Operating Lease, Liability, to be Paid, after Year Five",
        "terseLabel": "Thereafter"
       }
      }
     },
     "localname": "LesseeOperatingLeaseLiabilityPaymentsDueAfterYearFive",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesMaturityAnalysisofOperatingLeaseDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths": {
     "auth_ref": [
      "r577"
     ],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsandContingenciesMaturityAnalysisofOperatingLeaseDetails": {
       "order": 1.0,
       "parentTag": "us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of lessee's undiscounted obligation for lease payment for operating lease to be paid in next fiscal year following current fiscal year. Excludes interim and annual periods when interim periods are reported from current statement of financial position date (rolling approach).",
        "label": "Lessee, Operating Lease, Liability, to be Paid, Year One",
        "terseLabel": "2023"
       }
      }
     },
     "localname": "LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesMaturityAnalysisofOperatingLeaseDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFive": {
     "auth_ref": [
      "r577"
     ],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsandContingenciesMaturityAnalysisofOperatingLeaseDetails": {
       "order": 5.0,
       "parentTag": "us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of lessee's undiscounted obligation for lease payment for operating lease to be paid in fifth fiscal year following current fiscal year. Excludes interim and annual periods when interim periods are reported from current statement of financial position date (rolling approach).",
        "label": "Lessee, Operating Lease, Liability, to be Paid, Year Five",
        "terseLabel": "2027"
       }
      }
     },
     "localname": "LesseeOperatingLeaseLiabilityPaymentsDueYearFive",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesMaturityAnalysisofOperatingLeaseDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearFour": {
     "auth_ref": [
      "r577"
     ],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsandContingenciesMaturityAnalysisofOperatingLeaseDetails": {
       "order": 4.0,
       "parentTag": "us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of lessee's undiscounted obligation for lease payment for operating lease to be paid in fourth fiscal year following current fiscal year. Excludes interim and annual periods when interim periods are reported from current statement of financial position date (rolling approach).",
        "label": "Lessee, Operating Lease, Liability, to be Paid, Year Four",
        "terseLabel": "2026"
       }
      }
     },
     "localname": "LesseeOperatingLeaseLiabilityPaymentsDueYearFour",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesMaturityAnalysisofOperatingLeaseDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearThree": {
     "auth_ref": [
      "r577"
     ],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsandContingenciesMaturityAnalysisofOperatingLeaseDetails": {
       "order": 3.0,
       "parentTag": "us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of lessee's undiscounted obligation for lease payment for operating lease to be paid in third fiscal year following current fiscal year. Excludes interim and annual periods when interim periods are reported from current statement of financial position date (rolling approach).",
        "label": "Lessee, Operating Lease, Liability, to be Paid, Year Three",
        "terseLabel": "2025"
       }
      }
     },
     "localname": "LesseeOperatingLeaseLiabilityPaymentsDueYearThree",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesMaturityAnalysisofOperatingLeaseDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LesseeOperatingLeaseLiabilityPaymentsDueYearTwo": {
     "auth_ref": [
      "r577"
     ],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsandContingenciesMaturityAnalysisofOperatingLeaseDetails": {
       "order": 2.0,
       "parentTag": "us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of lessee's undiscounted obligation for lease payment for operating lease to be paid in second fiscal year following current fiscal year. Excludes interim and annual periods when interim periods are reported from current statement of financial position date (rolling approach).",
        "label": "Lessee, Operating Lease, Liability, to be Paid, Year Two",
        "terseLabel": "2024"
       }
      }
     },
     "localname": "LesseeOperatingLeaseLiabilityPaymentsDueYearTwo",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesMaturityAnalysisofOperatingLeaseDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LesseeOperatingLeaseLiabilityUndiscountedExcessAmount": {
     "auth_ref": [
      "r577"
     ],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsandContingenciesMaturityAnalysisofOperatingLeaseDetails_1": {
       "order": 1.0,
       "parentTag": "us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of lessee's undiscounted obligation for lease payments in excess of discounted obligation for lease payments for operating lease.",
        "label": "Lessee, Operating Lease, Liability, Undiscounted Excess Amount",
        "verboseLabel": "Less: imputed interest"
       }
      }
     },
     "localname": "LesseeOperatingLeaseLiabilityUndiscountedExcessAmount",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesMaturityAnalysisofOperatingLeaseDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LesseeOperatingLeaseRenewalTerm": {
     "auth_ref": [
      "r804"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Term of lessee's operating lease renewal, in 'PnYnMnDTnHnMnS' format, for example, 'P1Y5M13D' represents reported fact of one year, five months, and thirteen days.",
        "label": "Lessee, Operating Lease, Renewal Term",
        "terseLabel": "Renewal term"
       }
      }
     },
     "localname": "LesseeOperatingLeaseRenewalTerm",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesNarrativeDetails"
     ],
     "xbrltype": "durationItemType"
    },
    "us-gaap_LetterOfCreditMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "A document typically issued by a financial institution which acts as a guarantee of payment to a beneficiary, or as the source of payment for a specific transaction (for example, wiring funds to a foreign exporter if and when specified merchandise is accepted pursuant to the terms of the letter of credit).",
        "label": "Letter of Credit [Member]",
        "terseLabel": "Letter of Credit"
       }
      }
     },
     "localname": "LetterOfCreditMember",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesNarrativeDetails",
      "http://www.codexis.com/role/CommitmentsandContingenciesNarrativeDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_Liabilities": {
     "auth_ref": [
      "r18",
      "r218",
      "r313",
      "r367",
      "r368",
      "r370",
      "r371",
      "r372",
      "r374",
      "r376",
      "r378",
      "r379",
      "r542",
      "r543",
      "r544",
      "r552",
      "r661",
      "r754",
      "r811",
      "r812"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedBalanceSheets": {
       "order": 1.0,
       "parentTag": "us-gaap_LiabilitiesAndStockholdersEquity",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Sum of the carrying amounts as of the balance sheet date of all liabilities that are recognized. Liabilities are probable future sacrifices of economic benefits arising from present obligations of an entity to transfer assets or provide services to other entities in the future.",
        "label": "Liabilities",
        "totalLabel": "Total liabilities"
       }
      }
     },
     "localname": "Liabilities",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LiabilitiesAndStockholdersEquity": {
     "auth_ref": [
      "r11",
      "r157",
      "r170",
      "r695",
      "r725",
      "r741",
      "r803"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedBalanceSheets": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of liabilities and equity items, including the portion of equity attributable to noncontrolling interests, if any.",
        "label": "Liabilities and Equity",
        "totalLabel": "Total liabilities and stockholders\u2019 equity"
       }
      }
     },
     "localname": "LiabilitiesAndStockholdersEquity",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LiabilitiesAndStockholdersEquityAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Liabilities and Equity [Abstract]",
        "verboseLabel": "Liabilities and Stockholders\u2019 Equity"
       }
      }
     },
     "localname": "LiabilitiesAndStockholdersEquityAbstract",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedBalanceSheets"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_LiabilitiesCurrent": {
     "auth_ref": [
      "r20",
      "r185",
      "r218",
      "r313",
      "r367",
      "r368",
      "r370",
      "r371",
      "r372",
      "r374",
      "r376",
      "r378",
      "r379",
      "r542",
      "r543",
      "r544",
      "r552",
      "r695",
      "r754",
      "r811",
      "r812"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedBalanceSheets": {
       "order": 1.0,
       "parentTag": "us-gaap_Liabilities",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Total obligations incurred as part of normal operations that are expected to be paid during the following twelve months or within one business cycle, if longer.",
        "label": "Liabilities, Current",
        "totalLabel": "Total current liabilities"
       }
      }
     },
     "localname": "LiabilitiesCurrent",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LiabilitiesCurrentAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Liabilities, Current [Abstract]",
        "verboseLabel": "Current liabilities:"
       }
      }
     },
     "localname": "LiabilitiesCurrentAbstract",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedBalanceSheets"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_LineOfCreditFacilityCurrentBorrowingCapacity": {
     "auth_ref": [
      "r17"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of current borrowing capacity under the credit facility considering any current restrictions on the amount that could be borrowed (for example, borrowings may be limited by the amount of current assets), but without considering any amounts currently outstanding under the facility.",
        "label": "Line of Credit Facility, Current Borrowing Capacity",
        "terseLabel": "Current borrowing capacity"
       }
      }
     },
     "localname": "LineOfCreditFacilityCurrentBorrowingCapacity",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesNarrativeDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LongTermPurchaseCommitmentLineItems": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table.",
        "label": "Long-Term Purchase Commitment [Line Items]",
        "terseLabel": "Long-term Purchase Commitment [Line Items]"
       }
      }
     },
     "localname": "LongTermPurchaseCommitmentLineItems",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesNarrativeDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_LongTermPurchaseCommitmentTable": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Schedule setting forth key provisions of an arrangement under which the entity has agreed to purchase goods or services over a period of time greater than one year or the normal operating cycle, if longer, including the item for which expenditures will be made, minimum quantities, milestones, time period and committed amount.",
        "label": "Long-Term Purchase Commitment [Table]",
        "terseLabel": "Long-term Purchase Commitment [Table]"
       }
      }
     },
     "localname": "LongTermPurchaseCommitmentTable",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesNarrativeDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_LossContingenciesByNatureOfContingencyAxis": {
     "auth_ref": [
      "r91",
      "r92",
      "r362",
      "r363",
      "r364",
      "r749",
      "r750"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Information by type of existing condition, situation, or set of circumstances involving uncertainty as to possible loss to an enterprise that will ultimately be resolved when one or more future events occur or fail to occur.",
        "label": "Loss Contingency Nature [Axis]",
        "terseLabel": "Loss Contingency Nature [Axis]"
       }
      }
     },
     "localname": "LossContingenciesByNatureOfContingencyAxis",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesNarrativeDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_LossContingenciesTable": {
     "auth_ref": [
      "r91",
      "r92",
      "r362",
      "r363",
      "r364",
      "r749",
      "r750"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Discloses the specific components (such as the nature, name, and date) of the loss contingency and gives an estimate of the possible loss or range of loss, or states that a reasonable estimate cannot be made. Excludes environmental contingencies, warranties and unconditional purchase obligations.",
        "label": "Loss Contingencies [Table]",
        "terseLabel": "Loss Contingencies [Table]"
       }
      }
     },
     "localname": "LossContingenciesTable",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesOtherCommitmentsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_LossContingencyAccrualCarryingValueCurrent": {
     "auth_ref": [
      "r362"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of loss contingency liability expected to be resolved within one year or the normal operating cycle, if longer.",
        "label": "Loss Contingency, Accrual, Current",
        "terseLabel": "Accruals for expenses related to indemnification issues"
       }
      }
     },
     "localname": "LossContingencyAccrualCarryingValueCurrent",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesNarrativeDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_LossContingencyNatureDomain": {
     "auth_ref": [
      "r91",
      "r92",
      "r362",
      "r363",
      "r364",
      "r749",
      "r750"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "An existing condition, situation, or set of circumstances involving uncertainty as to possible loss to an enterprise that will ultimately be resolved when one or more future events occur or fail to occur. Resolution of the uncertainty may confirm the incurrence of a loss or impairment of an asset or the incurrence of a liability.",
        "label": "Loss Contingency, Nature [Domain]",
        "terseLabel": "Loss Contingency, Nature [Domain]"
       }
      }
     },
     "localname": "LossContingencyNatureDomain",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesNarrativeDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_MoneyMarketFundsAtCarryingValue": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Investment in short-term money-market instruments (such as commercial paper, banker's acceptances, repurchase agreements, government securities, certificates of deposit, and so forth) which are highly liquid (that is, readily convertible to known amounts of cash) and so near their maturity that they present an insignificant risk of changes in value because of changes in interest rates. Generally, only investments with original maturities of three months or less qualify as cash equivalents by definition. Original maturity means an original maturity to the entity holding the investment. For example, both a three-month US Treasury bill and a three-year Treasury note purchased three months from maturity qualify as cash equivalents. However, a Treasury note purchased three-years ago does not become a cash equivalent when its remaining maturity is three months.",
        "label": "Money Market Funds, at Carrying Value",
        "terseLabel": "Money market funds"
       }
      }
     },
     "localname": "MoneyMarketFundsAtCarryingValue",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetDetailsCashandCashEquivalentsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_MoneyMarketFundsMember": {
     "auth_ref": [
      "r764"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Fund that invests in short-term money-market instruments, for example, but not limited to, commercial paper, banker's acceptances, repurchase agreements, government securities, certificates of deposit, and other highly liquid securities.",
        "label": "Money Market Funds [Member]",
        "terseLabel": "Money market funds"
       }
      }
     },
     "localname": "MoneyMarketFundsMember",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetDetailsCashandCashEquivalentsDetails",
      "http://www.codexis.com/role/FairValueMeasurementsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_NatureOfOperations": {
     "auth_ref": [
      "r256",
      "r262"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The entire disclosure for the nature of an entity's business, major products or services, principal markets including location, and the relative importance of its operations in each business and the basis for the determination, including but not limited to, assets, revenues, or earnings. For an entity that has not commenced principal operations, disclosures about the risks and uncertainties related to the activities in which the entity is currently engaged and an understanding of what those activities are being directed toward.",
        "label": "Nature of Operations [Text Block]",
        "verboseLabel": "Description of Business"
       }
      }
     },
     "localname": "NatureOfOperations",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/DescriptionofBusiness"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_NetCashProvidedByUsedInFinancingActivities": {
     "auth_ref": [
      "r214"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows": {
       "order": 3.0,
       "parentTag": "us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of cash inflow (outflow) from financing activities, including discontinued operations. Financing activity cash flows include obtaining resources from owners and providing them with a return on, and a return of, their investment; borrowing money and repaying amounts borrowed, or settling the obligation; and obtaining and paying for other resources obtained from creditors on long-term credit.",
        "label": "Net Cash Provided by (Used in) Financing Activities",
        "totalLabel": "Net cash provided by (used in) financing activities"
       }
      }
     },
     "localname": "NetCashProvidedByUsedInFinancingActivities",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_NetCashProvidedByUsedInFinancingActivitiesAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Net Cash Provided by (Used in) Financing Activities [Abstract]",
        "verboseLabel": "Financing activities:"
       }
      }
     },
     "localname": "NetCashProvidedByUsedInFinancingActivitiesAbstract",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_NetCashProvidedByUsedInInvestingActivities": {
     "auth_ref": [
      "r214"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows": {
       "order": 2.0,
       "parentTag": "us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of cash inflow (outflow) from investing activities, including discontinued operations. Investing activity cash flows include making and collecting loans and acquiring and disposing of debt or equity instruments and property, plant, and equipment and other productive assets.",
        "label": "Net Cash Provided by (Used in) Investing Activities",
        "totalLabel": "Net cash used in investing activities"
       }
      }
     },
     "localname": "NetCashProvidedByUsedInInvestingActivities",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_NetCashProvidedByUsedInInvestingActivitiesAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Net Cash Provided by (Used in) Investing Activities [Abstract]",
        "verboseLabel": "Investing activities:"
       }
      }
     },
     "localname": "NetCashProvidedByUsedInInvestingActivitiesAbstract",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_NetCashProvidedByUsedInOperatingActivities": {
     "auth_ref": [
      "r40",
      "r42",
      "r45"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows": {
       "order": 1.0,
       "parentTag": "us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect",
       "weight": 1.0
      }
     },
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of cash inflow (outflow) from operating activities, including discontinued operations. Operating activity cash flows include transactions, adjustments, and changes in value not defined as investing or financing activities.",
        "label": "Net Cash Provided by (Used in) Operating Activities",
        "totalLabel": "Net cash provided by (used in) operating activities"
       }
      }
     },
     "localname": "NetCashProvidedByUsedInOperatingActivities",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_NetCashProvidedByUsedInOperatingActivitiesAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Net Cash Provided by (Used in) Operating Activities [Abstract]",
        "verboseLabel": "Operating activities:"
       }
      }
     },
     "localname": "NetCashProvidedByUsedInOperatingActivitiesAbstract",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_NetIncomeLoss": {
     "auth_ref": [
      "r27",
      "r45",
      "r162",
      "r175",
      "r183",
      "r203",
      "r204",
      "r208",
      "r218",
      "r228",
      "r230",
      "r231",
      "r232",
      "r233",
      "r236",
      "r237",
      "r243",
      "r275",
      "r286",
      "r292",
      "r295",
      "r313",
      "r367",
      "r368",
      "r370",
      "r371",
      "r372",
      "r374",
      "r376",
      "r378",
      "r379",
      "r548",
      "r552",
      "r662",
      "r754"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows": {
       "order": 1.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": 1.0
      },
      "http://www.codexis.com/role/ConsolidatedStatementsofOperations": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The portion of profit or loss for the period, net of income taxes, which is attributable to the parent.",
        "label": "Net Income (Loss) Attributable to Parent",
        "terseLabel": "Net loss",
        "totalLabel": "Net loss"
       }
      }
     },
     "localname": "NetIncomeLoss",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows",
      "http://www.codexis.com/role/ConsolidatedStatementsofOperations",
      "http://www.codexis.com/role/ConsolidatedStatementsofStockholdersEquity"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_NewAccountingPronouncementsPolicyPolicyTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Disclosure of accounting policy pertaining to new accounting pronouncements that may impact the entity's financial reporting. Includes, but is not limited to, quantification of the expected or actual impact.",
        "label": "New Accounting Pronouncements, Policy [Policy Text Block]",
        "verboseLabel": "Accounting Pronouncements"
       }
      }
     },
     "localname": "NewAccountingPronouncementsPolicyPolicyTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesPolicies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_NoncashInvestingAndFinancingItemsAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Noncash Investing and Financing Items [Abstract]",
        "terseLabel": "Supplemental non-cash investing and financing activities:"
       }
      }
     },
     "localname": "NoncashInvestingAndFinancingItemsAbstract",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_NoncashOrPartNoncashAcquisitionNoncashFinancialOrEquityInstrumentConsiderationSharesIssued1": {
     "auth_ref": [
      "r49",
      "r50",
      "r51"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The number of shares issued as [noncash or part noncash] consideration for a business or asset acquired. Noncash is defined as transactions during a period that affect recognized assets or liabilities but that do not result in cash receipts or cash payments in the period. \"Part noncash\" refers to that portion of the transaction not resulting in cash receipts or cash payments in the period.",
        "label": "Noncash or Part Noncash Acquisition, Noncash Financial or Equity Instrument Consideration, Shares Issued",
        "terseLabel": "Noncash or part noncash acquisition, noncash financial or equity instrument consideration, shares issued (in shares)"
       }
      }
     },
     "localname": "NoncashOrPartNoncashAcquisitionNoncashFinancialOrEquityInstrumentConsiderationSharesIssued1",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/RelatedPartyTransactionsDetails"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_NoncurrentAssets": {
     "auth_ref": [
      "r299"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Long-lived assets other than financial instruments, long-term customer relationships of a financial institution, mortgage and other servicing rights, deferred policy acquisition costs, and deferred tax assets.",
        "label": "Long-Lived Assets",
        "terseLabel": "Long-lived assets"
       }
      }
     },
     "localname": "NoncurrentAssets",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationRevenuesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_NonmonetaryTransactionGrossOperatingRevenueRecognized": {
     "auth_ref": [
      "r144"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The amount of gross operating revenue recognized in a nonmonetary transaction.",
        "label": "Nonmonetary Transaction, Gross Operating Revenue Recognized",
        "terseLabel": "Revenue recognized from transactions"
       }
      }
     },
     "localname": "NonmonetaryTransactionGrossOperatingRevenueRecognized",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsMolecularAssociatesIncDetails",
      "http://www.codexis.com/role/RelatedPartyTransactionsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_NotesReceivableGross": {
     "auth_ref": [
      "r198",
      "r306",
      "r318",
      "r321",
      "r650",
      "r651",
      "r664",
      "r665",
      "r742",
      "r834"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedBalanceSheets": {
       "order": 1.0,
       "parentTag": "us-gaap_AccountsNotesAndLoansReceivableNetCurrent",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amortized cost, before allowance for credit loss, of financing receivable. Excludes financing receivable covered under loss sharing agreement and net investment in lease.",
        "label": "Financing Receivable, before Allowance for Credit Loss",
        "totalLabel": "Total financial assets"
       }
      }
     },
     "localname": "NotesReceivableGross",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_NumberOfOperatingSegments": {
     "auth_ref": [
      "r736"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Number of operating segments. An operating segment is a component of an enterprise: (a) that engages in business activities from which it may earn revenues and incur expenses (including revenues and expenses relating to transactions with other components of the same enterprise), (b) whose operating results are regularly reviewed by the enterprise's chief operating decision maker to make decisions about resources to be allocated to the segment and assess its performance, and (c) for which discrete financial information is available. An operating segment may engage in business activities for which it has yet to earn revenues, for example, start-up operations may be operating segments before earning revenues.",
        "label": "Number of Operating Segments",
        "terseLabel": "Number of operating segments"
       }
      }
     },
     "localname": "NumberOfOperatingSegments",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesNarrativeDetails",
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationNarrativeDetails"
     ],
     "xbrltype": "integerItemType"
    },
    "us-gaap_NumberOfReportableSegments": {
     "auth_ref": [
      "r736"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Number of segments reported by the entity. A reportable segment is a component of an entity for which there is an accounting requirement to report separate financial information on that component in the entity's financial statements.",
        "label": "Number of Reportable Segments",
        "terseLabel": "Number of reportable segments"
       }
      }
     },
     "localname": "NumberOfReportableSegments",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/DescriptionofBusinessDetails",
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationNarrativeDetails"
     ],
     "xbrltype": "integerItemType"
    },
    "us-gaap_NumberOfReportingUnits": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Number of reporting units tested for impairment of goodwill. A reporting unit is an operating segment or one level below an operating segment.",
        "label": "Number of Reporting Units",
        "terseLabel": "Number of reporting units"
       }
      }
     },
     "localname": "NumberOfReportingUnits",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesNarrativeDetails"
     ],
     "xbrltype": "integerItemType"
    },
    "us-gaap_OneTimeTerminationBenefitsMember": {
     "auth_ref": [
      "r667",
      "r668",
      "r669",
      "r670"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "A lump sum payment to an involuntarily terminated employee in conjunction with exit or disposal activities.",
        "label": "One-time Termination Benefits [Member]",
        "terseLabel": "One-time Termination Benefits"
       }
      }
     },
     "localname": "OneTimeTerminationBenefitsMember",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/RestructuringChargesDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_OperatingCostsAndExpensesAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Operating Costs and Expenses [Abstract]",
        "verboseLabel": "Costs and operating expenses:"
       }
      }
     },
     "localname": "OperatingCostsAndExpensesAbstract",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofOperations"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_OperatingIncomeLoss": {
     "auth_ref": [
      "r275",
      "r286",
      "r292",
      "r295",
      "r662"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedStatementsofOperations": {
       "order": 1.0,
       "parentTag": "us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The net result for the period of deducting operating expenses from operating revenues.",
        "label": "Operating Income (Loss)",
        "totalLabel": "Income (loss) from operations"
       }
      }
     },
     "localname": "OperatingIncomeLoss",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofOperations",
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationSegmentReportingDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OperatingLeaseCost": {
     "auth_ref": [
      "r569",
      "r694"
     ],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsandContingenciesLeaseCostsDetails": {
       "order": 3.0,
       "parentTag": "us-gaap_LeaseCost",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of single lease cost, calculated by allocation of remaining cost of lease over remaining lease term. Includes, but is not limited to, single lease cost, after impairment of right-of-use asset, calculated by amortization of remaining right-of-use asset and accretion of lease liability.",
        "label": "Operating Lease, Cost",
        "terseLabel": "Operating lease cost"
       }
      }
     },
     "localname": "OperatingLeaseCost",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesLeaseCostsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OperatingLeaseLiabilitiesPaymentsDueAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Lessee, Operating Lease, Liability, to be Paid [Abstract]",
        "terseLabel": "Operating Leases"
       }
      }
     },
     "localname": "OperatingLeaseLiabilitiesPaymentsDueAbstract",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesMaturityAnalysisofOperatingLeaseDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_OperatingLeaseLiability": {
     "auth_ref": [
      "r562"
     ],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsandContingenciesMaturityAnalysisofOperatingLeaseDetails": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      },
      "http://www.codexis.com/role/CommitmentsandContingenciesMaturityAnalysisofOperatingLeaseDetails_1": {
       "order": 2.0,
       "parentTag": "us-gaap_LesseeOperatingLeaseLiabilityPaymentsDue",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Present value of lessee's discounted obligation for lease payments from operating lease.",
        "label": "Operating Lease, Liability",
        "totalLabel": "Lease obligations"
       }
      }
     },
     "localname": "OperatingLeaseLiability",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesMaturityAnalysisofOperatingLeaseDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OperatingLeaseLiabilityCurrent": {
     "auth_ref": [
      "r562"
     ],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsandContingenciesMaturityAnalysisofOperatingLeaseDetails": {
       "order": 2.0,
       "parentTag": "us-gaap_OperatingLeaseLiability",
       "weight": 1.0
      },
      "http://www.codexis.com/role/ConsolidatedBalanceSheets": {
       "order": 4.0,
       "parentTag": "us-gaap_LiabilitiesCurrent",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Present value of lessee's discounted obligation for lease payments from operating lease, classified as current.",
        "label": "Operating Lease, Liability, Current",
        "terseLabel": "Current portion of lease obligations - Operating leases"
       }
      }
     },
     "localname": "OperatingLeaseLiabilityCurrent",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesMaturityAnalysisofOperatingLeaseDetails",
      "http://www.codexis.com/role/ConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OperatingLeaseLiabilityNoncurrent": {
     "auth_ref": [
      "r562"
     ],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsandContingenciesMaturityAnalysisofOperatingLeaseDetails": {
       "order": 1.0,
       "parentTag": "us-gaap_OperatingLeaseLiability",
       "weight": 1.0
      },
      "http://www.codexis.com/role/ConsolidatedBalanceSheets": {
       "order": 3.0,
       "parentTag": "us-gaap_Liabilities",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Present value of lessee's discounted obligation for lease payments from operating lease, classified as noncurrent.",
        "label": "Operating Lease, Liability, Noncurrent",
        "terseLabel": "Long-term lease obligations - Operating leases"
       }
      }
     },
     "localname": "OperatingLeaseLiabilityNoncurrent",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesMaturityAnalysisofOperatingLeaseDetails",
      "http://www.codexis.com/role/ConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OperatingLeasePayments": {
     "auth_ref": [
      "r566",
      "r572"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of cash outflow from operating lease, excluding payments to bring another asset to condition and location necessary for its intended use.",
        "label": "Operating Lease, Payments",
        "terseLabel": "Operating cash flows from operating leases"
       }
      }
     },
     "localname": "OperatingLeasePayments",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesOtherLeaseInformationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OperatingLeaseRightOfUseAsset": {
     "auth_ref": [
      "r561"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedBalanceSheets": {
       "order": 2.0,
       "parentTag": "us-gaap_Assets",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of lessee's right to use underlying asset under operating lease.",
        "label": "Operating Lease, Right-of-Use Asset",
        "terseLabel": "Right-of-use assets - Operating leases, net"
       }
      }
     },
     "localname": "OperatingLeaseRightOfUseAsset",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OperatingLeaseWeightedAverageDiscountRatePercent": {
     "auth_ref": [
      "r575",
      "r694"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Weighted average discount rate for operating lease calculated at point in time.",
        "label": "Operating Lease, Weighted Average Discount Rate, Percent",
        "verboseLabel": "Operating Leases, Weighted-average discount rate"
       }
      }
     },
     "localname": "OperatingLeaseWeightedAverageDiscountRatePercent",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesOtherLeaseInformationDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "us-gaap_OperatingLeaseWeightedAverageRemainingLeaseTerm1": {
     "auth_ref": [
      "r574",
      "r694"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Weighted average remaining lease term for operating lease, in 'PnYnMnDTnHnMnS' format, for example, 'P1Y5M13D' represents reported fact of one year, five months, and thirteen days.",
        "label": "Operating Lease, Weighted Average Remaining Lease Term",
        "terseLabel": "Operating Lease, Weighted-average remaining lease term"
       }
      }
     },
     "localname": "OperatingLeaseWeightedAverageRemainingLeaseTerm1",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesOtherLeaseInformationDetails"
     ],
     "xbrltype": "durationItemType"
    },
    "us-gaap_OperatingLossCarryforwards": {
     "auth_ref": [
      "r129"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of operating loss carryforward, before tax effects, available to reduce future taxable income under enacted tax laws.",
        "label": "Operating Loss Carryforwards",
        "terseLabel": "Net operating losses, amount"
       }
      }
     },
     "localname": "OperatingLossCarryforwards",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesNOLCarryforwardsandFederalResearchandDevelopmentTaxCreditsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OperatingSegmentsMember": {
     "auth_ref": [
      "r285",
      "r286",
      "r287",
      "r288",
      "r289",
      "r295"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Identifies components of an entity that engage in business activities from which they may earn revenue and incur expenses, including transactions with other components of the same entity.",
        "label": "Operating Segments [Member]",
        "terseLabel": "Operating Segments"
       }
      }
     },
     "localname": "OperatingSegmentsMember",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationGoodwillDetails",
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationSegmentReportingDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_OrganizationConsolidationAndPresentationOfFinancialStatementsAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Organization, Consolidation and Presentation of Financial Statements [Abstract]",
        "terseLabel": "Organization, Consolidation and Presentation of Financial Statements [Abstract]"
       }
      }
     },
     "localname": "OrganizationConsolidationAndPresentationOfFinancialStatementsAbstract",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "xbrltype": "stringItemType"
    },
    "us-gaap_OrganizationConsolidationBasisOfPresentationBusinessDescriptionAndAccountingPoliciesTextBlock": {
     "auth_ref": [
      "r53",
      "r54",
      "r64",
      "r134"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The entire disclosure for the general note to the financial statements for the reporting entity which may include, descriptions of the basis of presentation, business description, significant accounting policies, consolidations, reclassifications, new pronouncements not yet adopted and changes in accounting principles.",
        "label": "Organization, Consolidation, Basis of Presentation, Business Description and Accounting Policies [Text Block]",
        "verboseLabel": "Basis of Presentation and Summary of Significant Accounting Policies"
       }
      }
     },
     "localname": "OrganizationConsolidationBasisOfPresentationBusinessDescriptionAndAccountingPoliciesTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPolicies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_OtherAccruedLiabilitiesCurrentAndNoncurrent": {
     "auth_ref": [
      "r159",
      "r173"
     ],
     "calculation": {
      "http://www.codexis.com/role/BalanceSheetDetailsOtherAccruedLiabilitiesDetails": {
       "order": 3.0,
       "parentTag": "us-gaap_AccruedLiabilitiesCurrent",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of expenses incurred but not yet paid classified as other.",
        "label": "Other Accrued Liabilities",
        "terseLabel": "Other"
       }
      }
     },
     "localname": "OtherAccruedLiabilitiesCurrentAndNoncurrent",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetDetailsOtherAccruedLiabilitiesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OtherAggregatedInvestmentsMember": {
     "auth_ref": [
      "r626",
      "r628",
      "r629"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Other investments in debt and equity securities and other forms of securities that provide ownership interests.",
        "label": "Other Security Investments [Member]",
        "terseLabel": "Other investments in non-marketable equity securities"
       }
      }
     },
     "localname": "OtherAggregatedInvestmentsMember",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/InvestmentsinNonMarketableSecuritiesCarryingValueandFairValueofSecuritiesDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_OtherAssetsNoncurrent": {
     "auth_ref": [
      "r191"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedBalanceSheets": {
       "order": 5.0,
       "parentTag": "us-gaap_Assets",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of noncurrent assets classified as other.",
        "label": "Other Assets, Noncurrent",
        "verboseLabel": "Other non-current assets"
       }
      }
     },
     "localname": "OtherAssetsNoncurrent",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OtherCommitment": {
     "auth_ref": [],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsandContingenciesOtherCommitmentsDetails": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Minimum amount of other commitment not otherwise specified in the taxonomy. Excludes commitments explicitly modeled in the taxonomy, including but not limited to, long-term and short-term purchase commitments, recorded and unrecorded purchase obligations, supply commitments, registration payment arrangements, leases, debt, product warranties, guarantees, environmental remediation obligations, and pensions.",
        "label": "Other Commitment",
        "totalLabel": "Total"
       }
      }
     },
     "localname": "OtherCommitment",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesOtherCommitmentsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OtherCommitmentDueInNextTwelveMonths": {
     "auth_ref": [],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsandContingenciesOtherCommitmentsDetails": {
       "order": 2.0,
       "parentTag": "us-gaap_OtherCommitment",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of commitment classified as other to be paid in next fiscal year following current fiscal year. Excludes interim and annual periods when interim periods are reported from current statement of financial position date (rolling approach).",
        "label": "Other Commitment, to be Paid, Year One",
        "terseLabel": "2023"
       }
      }
     },
     "localname": "OtherCommitmentDueInNextTwelveMonths",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesOtherCommitmentsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OtherCommitmentDueInSecondYear": {
     "auth_ref": [],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsandContingenciesOtherCommitmentsDetails": {
       "order": 1.0,
       "parentTag": "us-gaap_OtherCommitment",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of commitment classified as other to be paid in second fiscal year following current fiscal year. Excludes interim and annual periods when interim periods are reported from current statement of financial position date (rolling approach).",
        "label": "Other Commitment, to be Paid, Year Two",
        "terseLabel": "2024 and Thereafter"
       }
      }
     },
     "localname": "OtherCommitmentDueInSecondYear",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesOtherCommitmentsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OtherCommitmentsAxis": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Information by type of other commitment.",
        "label": "Other Commitments [Axis]",
        "terseLabel": "Other Commitments [Axis]"
       }
      }
     },
     "localname": "OtherCommitmentsAxis",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesOtherCommitmentsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_OtherCommitmentsDomain": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Other future obligation.",
        "label": "Other Commitments [Domain]",
        "terseLabel": "Other Commitments [Domain]"
       }
      }
     },
     "localname": "OtherCommitmentsDomain",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesOtherCommitmentsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_OtherCommitmentsLineItems": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table.",
        "label": "Other Commitments [Line Items]",
        "terseLabel": "Other Commitments [Line Items]"
       }
      }
     },
     "localname": "OtherCommitmentsLineItems",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesOtherCommitmentsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_OtherLiabilitiesNoncurrent": {
     "auth_ref": [
      "r22"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedBalanceSheets": {
       "order": 4.0,
       "parentTag": "us-gaap_Liabilities",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of liabilities classified as other, due after one year or the normal operating cycle, if longer.",
        "label": "Other Liabilities, Noncurrent",
        "verboseLabel": "Other long-term liabilities"
       }
      }
     },
     "localname": "OtherLiabilitiesNoncurrent",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OtherNoncashIncomeExpense": {
     "auth_ref": [
      "r45"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows": {
       "order": 8.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of income (expense) included in net income that results in no cash inflow (outflow), classified as other.",
        "label": "Other Noncash Income (Expense)",
        "negatedLabel": "Other non-cash items"
       }
      }
     },
     "localname": "OtherNoncashIncomeExpense",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_OtherNonoperatingIncomeExpense": {
     "auth_ref": [
      "r34"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedStatementsofOperations": {
       "order": 3.0,
       "parentTag": "us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of income (expense) related to nonoperating activities, classified as other.",
        "label": "Other Nonoperating Income (Expense)",
        "terseLabel": "Other income (expense), net ($208, $983 and $0 from a related party)",
        "verboseLabel": "Other income (expense), net"
       }
      }
     },
     "localname": "OtherNonoperatingIncomeExpense",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofOperations",
      "http://www.codexis.com/role/ConsolidatedStatementsofOperationsParenthetical"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_PastDueFinancingReceivablesTableTextBlock": {
     "auth_ref": [
      "r73",
      "r74",
      "r665",
      "r744"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Tabular disclosure of aging analysis for financing receivable.",
        "label": "Financing Receivable, Past Due [Table Text Block]",
        "terseLabel": "Summary of Accounts Receivable by Aging"
       }
      }
     },
     "localname": "PastDueFinancingReceivablesTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/AllowanceforCreditLossesTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_PaymentsOfStockIssuanceCosts": {
     "auth_ref": [
      "r39"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows": {
       "order": 3.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInFinancingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The cash outflow for cost incurred directly with the issuance of an equity security.",
        "label": "Payments of Stock Issuance Costs",
        "negatedTerseLabel": "Costs incurred in connection with equity financing",
        "terseLabel": "Costs incurred in connection with offering"
       }
      }
     },
     "localname": "PaymentsOfStockIssuanceCosts",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CapitalStockDetails",
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows",
      "http://www.codexis.com/role/ConsolidatedStatementsofStockholdersEquityParenthetical"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_PaymentsRelatedToTaxWithholdingForShareBasedCompensation": {
     "auth_ref": [
      "r212"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows": {
       "order": 5.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInFinancingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of cash outflow to satisfy grantee's tax withholding obligation for award under share-based payment arrangement.",
        "label": "Payment, Tax Withholding, Share-Based Payment Arrangement",
        "negatedTerseLabel": "Taxes paid related to net share settlement of equity awards"
       }
      }
     },
     "localname": "PaymentsRelatedToTaxWithholdingForShareBasedCompensation",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_PaymentsToAcquireOtherInvestments": {
     "auth_ref": [
      "r37"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows": {
       "order": 3.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInInvestingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of cash outflow to acquire investments classified as other.",
        "label": "Payments to Acquire Other Investments",
        "negatedLabel": "Investment in non-marketable securities ($0, ($7,630) and ($1,000) in a related party)",
        "negatedTerseLabel": "Investments in non-marketable securities",
        "terseLabel": "Investments in non-marketable securities"
       }
      }
     },
     "localname": "PaymentsToAcquireOtherInvestments",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsMolecularAssociatesIncDetails",
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows",
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlowsParenthetical",
      "http://www.codexis.com/role/RelatedPartyTransactionsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_PaymentsToAcquirePropertyPlantAndEquipment": {
     "auth_ref": [
      "r36"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows": {
       "order": 1.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInInvestingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The cash outflow associated with the acquisition of long-lived, physical assets that are used in the normal conduct of business to produce goods and services and not intended for resale; includes cash outflows to pay for construction of self-constructed assets.",
        "label": "Payments to Acquire Property, Plant, and Equipment",
        "negatedLabel": "Purchase of property and equipment"
       }
      }
     },
     "localname": "PaymentsToAcquirePropertyPlantAndEquipment",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_PensionAndOtherPostretirementBenefitsDisclosureTextBlock": {
     "auth_ref": [
      "r436",
      "r437",
      "r443",
      "r445",
      "r447",
      "r448",
      "r449",
      "r450",
      "r451",
      "r452",
      "r453",
      "r454",
      "r457",
      "r688"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The entire disclosure for retirement benefits.",
        "label": "Retirement Benefits [Text Block]",
        "terseLabel": "401(k) Plan"
       }
      }
     },
     "localname": "PensionAndOtherPostretirementBenefitsDisclosureTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/A401kPlan"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_PerformanceSharesMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Share-based payment arrangement awarded for meeting performance target.",
        "label": "Performance Shares [Member]",
        "terseLabel": "PBOs"
       }
      }
     },
     "localname": "PerformanceSharesMember",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationAssumptionsUsedDetails",
      "http://www.codexis.com/role/StockbasedCompensationAwardActivityDetails",
      "http://www.codexis.com/role/StockbasedCompensationNarrativeDetails",
      "http://www.codexis.com/role/StockbasedCompensationStockBasedCompensationExpenseDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_PhantomShareUnitsPSUsMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Share-based payment arrangement awarded as phantom share or unit.",
        "label": "Phantom Share Units (PSUs) [Member]",
        "terseLabel": "PSUs"
       }
      }
     },
     "localname": "PhantomShareUnitsPSUsMember",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationAwardActivityDetails",
      "http://www.codexis.com/role/StockbasedCompensationNarrativeDetails",
      "http://www.codexis.com/role/StockbasedCompensationStockBasedCompensationExpenseDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_PlanNameAxis": {
     "auth_ref": [
      "r766",
      "r767",
      "r768",
      "r769",
      "r770",
      "r771",
      "r772",
      "r773",
      "r774",
      "r775",
      "r776",
      "r777",
      "r778",
      "r779",
      "r780",
      "r781",
      "r782",
      "r783",
      "r784",
      "r785",
      "r786",
      "r787",
      "r788",
      "r789",
      "r790",
      "r791"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Information by plan name for share-based payment arrangement.",
        "label": "Plan Name [Axis]",
        "terseLabel": "Plan Name [Axis]"
       }
      }
     },
     "localname": "PlanNameAxis",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationNarrativeDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_PlanNameDomain": {
     "auth_ref": [
      "r766",
      "r767",
      "r768",
      "r769",
      "r770",
      "r771",
      "r772",
      "r773",
      "r774",
      "r775",
      "r776",
      "r777",
      "r778",
      "r779",
      "r780",
      "r781",
      "r782",
      "r783",
      "r784",
      "r785",
      "r786",
      "r787",
      "r788",
      "r789",
      "r790",
      "r791"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Plan name for share-based payment arrangement.",
        "label": "Plan Name [Domain]",
        "terseLabel": "Plan Name [Domain]"
       }
      }
     },
     "localname": "PlanNameDomain",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationNarrativeDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_PreferredStockParOrStatedValuePerShare": {
     "auth_ref": [
      "r5",
      "r391"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Face amount or stated value per share of preferred stock nonredeemable or redeemable solely at the option of the issuer.",
        "label": "Preferred Stock, Par or Stated Value Per Share",
        "terseLabel": "Preferred stock, par value (in dollars per share)"
       }
      }
     },
     "localname": "PreferredStockParOrStatedValuePerShare",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedBalanceSheetsParenthetical"
     ],
     "xbrltype": "perShareItemType"
    },
    "us-gaap_PreferredStockSharesAuthorized": {
     "auth_ref": [
      "r5"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The maximum number of nonredeemable preferred shares (or preferred stock redeemable solely at the option of the issuer) permitted to be issued by an entity's charter and bylaws.",
        "label": "Preferred Stock, Shares Authorized",
        "terseLabel": "Preferred stock, shares authorized (in shares)"
       }
      }
     },
     "localname": "PreferredStockSharesAuthorized",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedBalanceSheetsParenthetical"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_PreferredStockSharesIssued": {
     "auth_ref": [
      "r5",
      "r391"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Total number of nonredeemable preferred shares (or preferred stock redeemable solely at the option of the issuer) issued to shareholders (includes related preferred shares that were issued, repurchased, and remain in the treasury). May be all or portion of the number of preferred shares authorized. Excludes preferred shares that are classified as debt.",
        "label": "Preferred Stock, Shares Issued",
        "terseLabel": "Preferred stock, shares issued (in shares)"
       }
      }
     },
     "localname": "PreferredStockSharesIssued",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedBalanceSheetsParenthetical"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_PreferredStockSharesOutstanding": {
     "auth_ref": [
      "r5"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Aggregate share number for all nonredeemable preferred stock (or preferred stock redeemable solely at the option of the issuer) held by stockholders. Does not include preferred shares that have been repurchased.",
        "label": "Preferred Stock, Shares Outstanding",
        "terseLabel": "Preferred stock, shares outstanding (in shares)"
       }
      }
     },
     "localname": "PreferredStockSharesOutstanding",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedBalanceSheetsParenthetical"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_PreferredStockValue": {
     "auth_ref": [
      "r5",
      "r695"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedBalanceSheets": {
       "order": 1.0,
       "parentTag": "us-gaap_StockholdersEquity",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Aggregate par or stated value of issued nonredeemable preferred stock (or preferred stock redeemable solely at the option of the issuer). This item includes treasury stock repurchased by the entity. Note: elements for number of nonredeemable preferred shares, par value and other disclosure concepts are in another section within stockholders' equity.",
        "label": "Preferred Stock, Value, Issued",
        "terseLabel": "Preferred stock, $0.0001 par value per share; 5,000 shares authorized, none issued and outstanding"
       }
      }
     },
     "localname": "PreferredStockValue",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_PrepaidExpenseAndOtherAssetsCurrent": {
     "auth_ref": [
      "r720"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedBalanceSheetsParenthetical": {
       "order": 3.0,
       "parentTag": "us-gaap_AssetsCurrent",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of asset related to consideration paid in advance for costs that provide economic benefits in future periods, and amount of other assets that are expected to be realized or consumed within one year or the normal operating cycle, if longer.",
        "label": "Prepaid Expense and Other Assets, Current",
        "verboseLabel": "Prepaid expenses and other current assets"
       }
      }
     },
     "localname": "PrepaidExpenseAndOtherAssetsCurrent",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_PrimeRateMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Interest rate charged by financial institutions to their most creditworthy borrowers.",
        "label": "Prime Rate [Member]",
        "terseLabel": "Prime Rate"
       }
      }
     },
     "localname": "PrimeRateMember",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesNarrativeDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_ProceedsFromCollaborators": {
     "auth_ref": [
      "r41"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Cash received from collaborators during the current period.",
        "label": "Proceeds from Collaborators",
        "terseLabel": "Collaboration payment"
       }
      }
     },
     "localname": "ProceedsFromCollaborators",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsPortonDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ProceedsFromIssuanceOfCommonStock": {
     "auth_ref": [
      "r38"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows": {
       "order": 2.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInFinancingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The cash inflow from the additional capital contribution to the entity.",
        "label": "Proceeds from Issuance of Common Stock",
        "terseLabel": "Proceeds from issuance of common stock in connection with public offering"
       }
      }
     },
     "localname": "ProceedsFromIssuanceOfCommonStock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ProceedsFromSaleOfPropertyPlantAndEquipment": {
     "auth_ref": [
      "r35"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows": {
       "order": 2.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInInvestingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The cash inflow from the sale of long-lived, physical assets that are used in the normal conduct of business to produce goods and services and not intended for resale.",
        "label": "Proceeds from Sale of Property, Plant, and Equipment",
        "terseLabel": "Proceeds from sale of property and equipment"
       }
      }
     },
     "localname": "ProceedsFromSaleOfPropertyPlantAndEquipment",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ProceedsFromStockOptionsExercised": {
     "auth_ref": [
      "r38",
      "r116"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows": {
       "order": 1.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInFinancingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of cash inflow from exercise of option under share-based payment arrangement.",
        "label": "Proceeds from Stock Options Exercised",
        "verboseLabel": "Proceeds from exercises of stock options"
       }
      }
     },
     "localname": "ProceedsFromStockOptionsExercised",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ProjectMember": {
     "auth_ref": [
      "r150"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Planned program of work.",
        "label": "Project [Domain]",
        "terseLabel": "Project [Domain]"
       }
      }
     },
     "localname": "ProjectMember",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsNestleGlobalDevelopmentAgreementDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_PropertyPlantAndEquipmentByTypeAxis": {
     "auth_ref": [
      "r86"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Information by type of long-lived, physical assets used to produce goods and services and not intended for resale.",
        "label": "Long-Lived Tangible Asset [Axis]",
        "terseLabel": "Property, Plant and Equipment, Type [Axis]"
       }
      }
     },
     "localname": "PropertyPlantAndEquipmentByTypeAxis",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetDetailsPropertyandEquipmentnetDetails",
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesPropertyPlantandEquipmentDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_PropertyPlantAndEquipmentDisposals": {
     "auth_ref": [],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of divestiture of long-lived, physical assets used in the normal conduct of business and not intended for resale. Examples include, but are not limited to, land, buildings, machinery and equipment, office equipment, furniture and fixtures, and computer equipment.",
        "label": "Property, Plant and Equipment, Disposals",
        "terseLabel": "Equipment retired during period"
       }
      }
     },
     "localname": "PropertyPlantAndEquipmentDisposals",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetDetailsPropertyandEquipmentnetDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_PropertyPlantAndEquipmentGross": {
     "auth_ref": [
      "r84",
      "r188"
     ],
     "calculation": {
      "http://www.codexis.com/role/BalanceSheetDetailsPropertyandEquipmentnetDetails": {
       "order": 1.0,
       "parentTag": "us-gaap_PropertyPlantAndEquipmentNet",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount before accumulated depreciation, depletion and amortization of physical assets used in the normal conduct of business and not intended for resale. Examples include, but are not limited to, land, buildings, machinery and equipment, office equipment, and furniture and fixtures.",
        "label": "Property, Plant and Equipment, Gross",
        "terseLabel": "Property and equipment"
       }
      }
     },
     "localname": "PropertyPlantAndEquipmentGross",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetDetailsPropertyandEquipmentnetDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_PropertyPlantAndEquipmentLineItems": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table.",
        "label": "Property, Plant and Equipment [Line Items]",
        "terseLabel": "Property, Plant and Equipment [Line Items]"
       }
      }
     },
     "localname": "PropertyPlantAndEquipmentLineItems",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetDetailsPropertyandEquipmentnetDetails",
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesPropertyPlantandEquipmentDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_PropertyPlantAndEquipmentNet": {
     "auth_ref": [
      "r86",
      "r171",
      "r613",
      "r695"
     ],
     "calculation": {
      "http://www.codexis.com/role/BalanceSheetDetailsPropertyandEquipmentnetDetails": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      },
      "http://www.codexis.com/role/ConsolidatedBalanceSheets": {
       "order": 6.0,
       "parentTag": "us-gaap_Assets",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount after accumulated depreciation, depletion and amortization of physical assets used in the normal conduct of business to produce goods and services and not intended for resale. Examples include, but are not limited to, land, buildings, machinery and equipment, office equipment, and furniture and fixtures.",
        "label": "Property, Plant and Equipment, Net",
        "totalLabel": "Property and equipment, net",
        "verboseLabel": "Property and equipment, net"
       }
      }
     },
     "localname": "PropertyPlantAndEquipmentNet",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetDetailsPropertyandEquipmentnetDetails",
      "http://www.codexis.com/role/ConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_PropertyPlantAndEquipmentNetByTypeAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Property, Plant and Equipment, Net, by Type [Abstract]",
        "terseLabel": "Property, Plant and Equipment, Net, by Type [Abstract]"
       }
      }
     },
     "localname": "PropertyPlantAndEquipmentNetByTypeAbstract",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetDetailsPropertyandEquipmentnetDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_PropertyPlantAndEquipmentPolicyTextBlock": {
     "auth_ref": [
      "r86",
      "r634",
      "r635"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Disclosure of accounting policy for long-lived, physical asset used in normal conduct of business and not intended for resale. Includes, but is not limited to, work of art, historical treasure, and similar asset classified as collections.",
        "label": "Property, Plant and Equipment, Policy [Policy Text Block]",
        "terseLabel": "Property and Equipment"
       }
      }
     },
     "localname": "PropertyPlantAndEquipmentPolicyTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesPolicies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_PropertyPlantAndEquipmentTextBlock": {
     "auth_ref": [
      "r86"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Tabular disclosure of physical assets used in the normal conduct of business and not intended for resale. Includes, but is not limited to, balances by class of assets, depreciation and depletion expense and method used, including composite depreciation, and accumulated deprecation.",
        "label": "Property, Plant and Equipment [Table Text Block]",
        "terseLabel": "Property and Equipment, Net",
        "verboseLabel": "Schedule of Estimated Ranges of Useful Lives of Property and Equipment"
       }
      }
     },
     "localname": "PropertyPlantAndEquipmentTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetDetailsTables",
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_PropertyPlantAndEquipmentTypeDomain": {
     "auth_ref": [
      "r84"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Listing of long-lived, physical assets that are used in the normal conduct of business to produce goods and services and not intended for resale. Examples include land, buildings, machinery and equipment, and other types of furniture and equipment including, but not limited to, office equipment, furniture and fixtures, and computer equipment and software.",
        "label": "Long-Lived Tangible Asset [Domain]",
        "terseLabel": "Property, Plant and Equipment, Type [Domain]"
       }
      }
     },
     "localname": "PropertyPlantAndEquipmentTypeDomain",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetDetailsPropertyandEquipmentnetDetails",
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesPropertyPlantandEquipmentDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_PropertyPlantAndEquipmentUsefulLife": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Useful life of long lived, physical assets used in the normal conduct of business and not intended for resale, in 'PnYnMnDTnHnMnS' format, for example, 'P1Y5M13D' represents the reported fact of one year, five months, and thirteen days. Examples include, but not limited to, land, buildings, machinery and equipment, office equipment, furniture and fixtures, and computer equipment.",
        "label": "Property, Plant and Equipment, Useful Life",
        "terseLabel": "Estimated useful life"
       }
      }
     },
     "localname": "PropertyPlantAndEquipmentUsefulLife",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesPropertyPlantandEquipmentDetails"
     ],
     "xbrltype": "durationItemType"
    },
    "us-gaap_ProvisionForDoubtfulAccounts": {
     "auth_ref": [
      "r211",
      "r317"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows": {
       "order": 5.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of expense (reversal of expense) for expected credit loss on accounts receivable.",
        "label": "Accounts Receivable, Credit Loss Expense (Reversal)",
        "terseLabel": "Provision for credit losses"
       }
      }
     },
     "localname": "ProvisionForDoubtfulAccounts",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ProvisionForLoanLossesExpensed": {
     "auth_ref": [
      "r317",
      "r610"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of credit loss expense (reversal of expense) for financing receivable.",
        "label": "Financing Receivable, Credit Loss, Expense (Reversal)",
        "verboseLabel": "Provision for credit losses"
       }
      }
     },
     "localname": "ProvisionForLoanLossesExpensed",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/AllowanceforCreditLossesAnalysisofAllowanceforCreditLossesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ReceivablesAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Receivables [Abstract]"
       }
      }
     },
     "localname": "ReceivablesAbstract",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "xbrltype": "stringItemType"
    },
    "us-gaap_ReceivablesTradeAndOtherAccountsReceivableAllowanceForDoubtfulAccountsPolicy": {
     "auth_ref": [
      "r75"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Disclosure of accounting policy for determining the allowance for doubtful accounts for trade and other accounts receivable balances, and when impairments, charge-offs or recoveries are recognized.",
        "label": "Receivables, Trade and Other Accounts Receivable, Allowance for Doubtful Accounts, Policy [Policy Text Block]",
        "terseLabel": "Financial Assets and Allowances"
       }
      }
     },
     "localname": "ReceivablesTradeAndOtherAccountsReceivableAllowanceForDoubtfulAccountsPolicy",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesPolicies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ReconciliationOfRevenueFromSegmentsToConsolidatedTextBlock": {
     "auth_ref": [
      "r67",
      "r69"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Tabular disclosure of all significant reconciling items in the reconciliation of total revenues from reportable segments to the entity's consolidated revenues.",
        "label": "Reconciliation of Revenue from Segments to Consolidated [Table Text Block]",
        "verboseLabel": "Schedule of Revenues by Geographical Area"
       }
      }
     },
     "localname": "ReconciliationOfRevenueFromSegmentsToConsolidatedTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ReconciliationOfUnrecognizedTaxBenefitsExcludingAmountsPertainingToExaminedTaxReturnsRollForward": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "A roll forward is a reconciliation of a concept from the beginning of a period to the end of a period.",
        "label": "Reconciliation of Unrecognized Tax Benefits, Excluding Amounts Pertaining to Examined Tax Returns [Roll Forward]",
        "terseLabel": "Reconciliation of Unrecognized Tax Benefits, Excluding Amounts Pertaining to Examined Tax Returns [Roll Forward]"
       }
      }
     },
     "localname": "ReconciliationOfUnrecognizedTaxBenefitsExcludingAmountsPertainingToExaminedTaxReturnsRollForward",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesReconciliationofUnrecognizedTaxBenefitsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_RelatedPartyDomain": {
     "auth_ref": [
      "r446",
      "r581",
      "r582"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Related parties include affiliates; other entities for which investments are accounted for by the equity method by the entity; trusts for benefit of employees; and principal owners, management, and members of immediate families. It also may include other parties with which the entity may control or can significantly influence the management or operating policies of the other to an extent that one of the transacting parties might be prevented from fully pursuing its own separate interests.",
        "label": "Related Party [Domain]",
        "terseLabel": "Related Party [Domain]"
       }
      }
     },
     "localname": "RelatedPartyDomain",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsMolecularAssociatesIncDetails",
      "http://www.codexis.com/role/ConsolidatedBalanceSheetsParenthetical",
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlowsParenthetical",
      "http://www.codexis.com/role/ConsolidatedStatementsofOperationsParenthetical",
      "http://www.codexis.com/role/RelatedPartyTransactionsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_RelatedPartyTransactionAxis": {
     "auth_ref": [
      "r180",
      "r581",
      "r582",
      "r810"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Information by type of related party transaction.",
        "label": "Related Party Transaction [Axis]",
        "terseLabel": "Related Party Transaction [Axis]"
       }
      }
     },
     "localname": "RelatedPartyTransactionAxis",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsMolecularAssociatesIncDetails",
      "http://www.codexis.com/role/RelatedPartyTransactionsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_RelatedPartyTransactionDomain": {
     "auth_ref": [
      "r180"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Transaction between related party.",
        "label": "Related Party Transaction [Domain]",
        "terseLabel": "Related Party Transaction [Domain]"
       }
      }
     },
     "localname": "RelatedPartyTransactionDomain",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsMolecularAssociatesIncDetails",
      "http://www.codexis.com/role/RelatedPartyTransactionsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_RelatedPartyTransactionLineItems": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table.",
        "label": "Related Party Transaction [Line Items]",
        "terseLabel": "Related Party Transaction [Line Items]"
       }
      }
     },
     "localname": "RelatedPartyTransactionLineItems",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/RelatedPartyTransactionsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_RelatedPartyTransactionsAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Related Party Transactions [Abstract]"
       }
      }
     },
     "localname": "RelatedPartyTransactionsAbstract",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "xbrltype": "stringItemType"
    },
    "us-gaap_RelatedPartyTransactionsByRelatedPartyAxis": {
     "auth_ref": [
      "r446",
      "r581",
      "r596",
      "r597",
      "r598",
      "r599",
      "r600",
      "r601",
      "r602",
      "r603",
      "r604",
      "r605",
      "r606",
      "r607",
      "r810"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Information by type of related party. Related parties include, but not limited to, affiliates; other entities for which investments are accounted for by the equity method by the entity; trusts for benefit of employees; and principal owners, management, and members of immediate families. It also may include other parties with which the entity may control or can significantly influence the management or operating policies of the other to an extent that one of the transacting parties might be prevented from fully pursuing its own separate interests.",
        "label": "Related Party [Axis]",
        "terseLabel": "Related Party [Axis]"
       }
      }
     },
     "localname": "RelatedPartyTransactionsByRelatedPartyAxis",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsMolecularAssociatesIncDetails",
      "http://www.codexis.com/role/ConsolidatedBalanceSheetsParenthetical",
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlowsParenthetical",
      "http://www.codexis.com/role/ConsolidatedStatementsofOperationsParenthetical",
      "http://www.codexis.com/role/RelatedPartyTransactionsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_RelatedPartyTransactionsDisclosureTextBlock": {
     "auth_ref": [
      "r579",
      "r580",
      "r582",
      "r583",
      "r584"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The entire disclosure for related party transactions. Examples of related party transactions include transactions between (a) a parent company and its subsidiary; (b) subsidiaries of a common parent; (c) and entity and its principal owners; and (d) affiliates.",
        "label": "Related Party Transactions Disclosure [Text Block]",
        "verboseLabel": "Related Party Transactions"
       }
      }
     },
     "localname": "RelatedPartyTransactionsDisclosureTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/RelatedPartyTransactions"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ResearchAndDevelopmentAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Research and Development [Abstract]",
        "terseLabel": "Research and Development [Abstract]"
       }
      }
     },
     "localname": "ResearchAndDevelopmentAbstract",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "xbrltype": "stringItemType"
    },
    "us-gaap_ResearchAndDevelopmentArrangementContractToPerformForOthersByTypeAxis": {
     "auth_ref": [
      "r122",
      "r123"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Information by form of arrangement related to research and development.",
        "label": "Research and Development Arrangement, Contract to Perform for Others, Type [Axis]",
        "terseLabel": "Research and Development Arrangement, Contract to Perform for Others, Type [Axis]"
       }
      }
     },
     "localname": "ResearchAndDevelopmentArrangementContractToPerformForOthersByTypeAxis",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsNovartisDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsPortonDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsRocheDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsTakedaDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ResearchAndDevelopmentArrangementContractToPerformForOthersCompensationEarned": {
     "auth_ref": [
      "r121",
      "r123"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows": {
       "order": 6.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The amount of compensation earned (contract income) under a research and development arrangement accounted for as a contract to perform research and development for others.",
        "label": "Research and Development Arrangement, Contract to Perform for Others, Compensation Earned",
        "negatedLabel": "Equity securities earned from research and development activities from a related party"
       }
      }
     },
     "localname": "ResearchAndDevelopmentArrangementContractToPerformForOthersCompensationEarned",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ResearchAndDevelopmentArrangementContractToPerformForOthersTypeDomain": {
     "auth_ref": [
      "r122",
      "r123"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Listing of significant agreements under research and development arrangements accounted for as a contract to perform research and development for others.",
        "label": "Research and Development Arrangement, Contract to Perform for Others, Type [Domain]",
        "terseLabel": "Research and Development Arrangement, Contract to Perform for Others, Type [Domain]"
       }
      }
     },
     "localname": "ResearchAndDevelopmentArrangementContractToPerformForOthersTypeDomain",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsNovartisDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsPortonDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsRocheDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsTakedaDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_ResearchAndDevelopmentExpense": {
     "auth_ref": [
      "r120",
      "r179",
      "r819"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedStatementsofOperations": {
       "order": 3.0,
       "parentTag": "us-gaap_CostsAndExpenses",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The aggregate costs incurred (1) in a planned search or critical investigation aimed at discovery of new knowledge with the hope that such knowledge will be useful in developing a new product or service, a new process or technique, or in bringing about a significant improvement to an existing product or process; or (2) to translate research findings or other knowledge into a plan or design for a new product or process or for a significant improvement to an existing product or process whether intended for sale or the entity's use, during the reporting period charged to research and development projects, including the costs of developing computer software up to the point in time of achieving technological feasibility, and costs allocated in accounting for a business combination to in-process projects deemed to have no alternative future use.",
        "label": "Research and Development Expense",
        "verboseLabel": "Research and development"
       }
      }
     },
     "localname": "ResearchAndDevelopmentExpense",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofOperations",
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationSegmentReportingDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ResearchAndDevelopmentExpenseMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Primary financial statement caption in which the reported facts about research and development expense have been included.",
        "label": "Research and Development Expense [Member]",
        "terseLabel": "Research and development"
       }
      }
     },
     "localname": "ResearchAndDevelopmentExpenseMember",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationStockBasedCompensationExpenseDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_ResearchAndDevelopmentExpensePolicy": {
     "auth_ref": [
      "r120"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Disclosure of accounting policy for costs it has incurred (1) in a planned search or critical investigation aimed at discovery of new knowledge with the hope that such knowledge will be useful in developing a new product or service, a new process or technique, or in bringing about a significant improvement to an existing product or process; or (2) to translate research findings or other knowledge into a plan or design for a new product or process or for a significant improvement to an existing product or process.",
        "label": "Research and Development Expense, Policy [Policy Text Block]",
        "terseLabel": "Research and Development Expenses"
       }
      }
     },
     "localname": "ResearchAndDevelopmentExpensePolicy",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesPolicies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_RestrictedCash": {
     "auth_ref": [
      "r712",
      "r723",
      "r820",
      "r821"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedBalanceSheetsParenthetical": {
       "order": 5.0,
       "parentTag": "us-gaap_AssetsCurrent",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of cash restricted as to withdrawal or usage. Cash includes, but is not limited to, currency on hand, demand deposits with banks or financial institutions, and other accounts with general characteristics of demand deposits.",
        "label": "Restricted Cash",
        "terseLabel": "Restricted cash, current"
       }
      }
     },
     "localname": "RestrictedCash",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_RestrictedCashAndCashEquivalents": {
     "auth_ref": [
      "r46",
      "r52",
      "r153",
      "r168",
      "r187"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows": {
       "order": 2.0,
       "parentTag": "us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of cash and cash equivalents restricted as to withdrawal or usage. Cash includes, but is not limited to, currency on hand, demand deposits with banks or financial institutions, and other accounts with general characteristics of demand deposits. Cash equivalents include, but are not limited to, short-term, highly liquid investments that are both readily convertible to known amounts of cash and so near their maturity that they present insignificant risk of changes in value because of changes in interest rates.",
        "label": "Restricted Cash and Cash Equivalents",
        "terseLabel": "Restricted cash, current and non-current"
       }
      }
     },
     "localname": "RestrictedCashAndCashEquivalents",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_RestrictedCashAndCashEquivalentsCashAndCashEquivalentsAxis": {
     "auth_ref": [
      "r15"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Information by category of cash or cash equivalent items which are restricted as to withdrawal or usage.",
        "label": "Restricted Cash and Cash Equivalents [Axis]",
        "terseLabel": "Restricted Cash and Cash Equivalents [Axis]"
       }
      }
     },
     "localname": "RestrictedCashAndCashEquivalentsCashAndCashEquivalentsAxis",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesNarrativeDetails",
      "http://www.codexis.com/role/CommitmentsandContingenciesNarrativeDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_RestrictedCashAndCashEquivalentsCashAndCashEquivalentsMember": {
     "auth_ref": [
      "r187"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Type of cash and cash equivalent. Cash is currency on hand as well as demand deposits with banks or financial institutions. Includes other kinds of accounts that have the general characteristics of demand deposits. Also includes short-term, highly liquid investments that are both readily convertible to known amounts of cash and so near their maturity that they present insignificant risk of changes in value because of changes in interest rates.",
        "label": "Cash and Cash Equivalents [Domain]",
        "terseLabel": "Cash and Cash Equivalents [Domain]"
       }
      }
     },
     "localname": "RestrictedCashAndCashEquivalentsCashAndCashEquivalentsMember",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetDetailsCashandCashEquivalentsDetails",
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesNarrativeDetails",
      "http://www.codexis.com/role/CommitmentsandContingenciesNarrativeDetails",
      "http://www.codexis.com/role/FairValueMeasurementsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_RestrictedCashCurrent": {
     "auth_ref": [
      "r712",
      "r723"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of cash restricted as to withdrawal or usage, classified as current. Cash includes, but is not limited to, currency on hand, demand deposits with banks or financial institutions, and other accounts with general characteristics of demand deposits.",
        "label": "Restricted Cash, Current",
        "terseLabel": "Current restricted cash"
       }
      }
     },
     "localname": "RestrictedCashCurrent",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesNarrativeDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_RestrictedCashNoncurrent": {
     "auth_ref": [
      "r631",
      "r713",
      "r723"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedBalanceSheets": {
       "order": 3.0,
       "parentTag": "us-gaap_Assets",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of cash restricted as to withdrawal or usage, classified as noncurrent. Cash includes, but is not limited to, currency on hand, demand deposits with banks or financial institutions, and other accounts with general characteristics of demand deposits.",
        "label": "Restricted Cash, Noncurrent",
        "terseLabel": "Restricted cash"
       }
      }
     },
     "localname": "RestrictedCashNoncurrent",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesNarrativeDetails",
      "http://www.codexis.com/role/ConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_RestrictedStockMember": {
     "auth_ref": [
      "r55"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Stock including a provision that prohibits sale or substantive sale of an equity instrument for a specified period of time or until specified performance conditions are met.",
        "label": "Restricted Stock [Member]",
        "verboseLabel": "RSAs"
       }
      }
     },
     "localname": "RestrictedStockMember",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationAwardActivityDetails",
      "http://www.codexis.com/role/StockbasedCompensationNarrativeDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_RestrictedStockUnitsRSUMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Share instrument which is convertible to stock or an equivalent amount of cash, after a specified period of time or when specified performance conditions are met.",
        "label": "Restricted Stock Units (RSUs) [Member]",
        "terseLabel": "RSUs"
       }
      }
     },
     "localname": "RestrictedStockUnitsRSUMember",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationAwardActivityDetails",
      "http://www.codexis.com/role/StockbasedCompensationNarrativeDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_RestructuringAndRelatedActivitiesAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Restructuring and Related Activities [Abstract]"
       }
      }
     },
     "localname": "RestructuringAndRelatedActivitiesAbstract",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "xbrltype": "stringItemType"
    },
    "us-gaap_RestructuringAndRelatedActivitiesDisclosureTextBlock": {
     "auth_ref": [
      "r348",
      "r350",
      "r353",
      "r358",
      "r359"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The entire disclosure for restructuring and related activities. Description of restructuring activities such as exit and disposal activities, include facts and circumstances leading to the plan, the expected plan completion date, the major types of costs associated with the plan activities, total expected costs, the accrual balance at the end of the period, and the periods over which the remaining accrual will be settled.",
        "label": "Restructuring and Related Activities Disclosure [Text Block]",
        "terseLabel": "Restructuring Charges"
       }
      }
     },
     "localname": "RestructuringAndRelatedActivitiesDisclosureTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/RestructuringCharges"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_RestructuringAndRelatedCostNumberOfPositionsEliminatedPeriodPercent": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The number of positions eliminated during the period as a percentage of total positions eliminated during the period in connection with the restructuring plan(s).",
        "label": "Restructuring and Related Cost, Number of Positions Eliminated, Period Percent",
        "terseLabel": "Restructuring and related cost, number of positions eliminated, period percent"
       }
      }
     },
     "localname": "RestructuringAndRelatedCostNumberOfPositionsEliminatedPeriodPercent",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/RestructuringChargesDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "us-gaap_RestructuringCharges": {
     "auth_ref": [
      "r44",
      "r354",
      "r355",
      "r748"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedStatementsofOperations": {
       "order": 2.0,
       "parentTag": "us-gaap_CostsAndExpenses",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of expenses associated with exit or disposal activities pursuant to an authorized plan. Excludes expenses related to a discontinued operation or an asset retirement obligation.",
        "label": "Restructuring Charges",
        "terseLabel": "Restructuring charges"
       }
      }
     },
     "localname": "RestructuringCharges",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofOperations",
      "http://www.codexis.com/role/RestructuringChargesDetails",
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationSegmentReportingDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_RestructuringCostAndReserveAxis": {
     "auth_ref": [
      "r349",
      "r350",
      "r355",
      "r356"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Information by type of restructuring cost.",
        "label": "Restructuring Type [Axis]",
        "terseLabel": "Restructuring Type [Axis]"
       }
      }
     },
     "localname": "RestructuringCostAndReserveAxis",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/RestructuringChargesDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_RestructuringCostAndReserveLineItems": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table.",
        "label": "Restructuring Cost and Reserve [Line Items]",
        "terseLabel": "Restructuring Cost and Reserve [Line Items]"
       }
      }
     },
     "localname": "RestructuringCostAndReserveLineItems",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/RestructuringChargesDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_RetainedEarningsAccumulatedDeficit": {
     "auth_ref": [
      "r8",
      "r105",
      "r169",
      "r621",
      "r622",
      "r695"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedBalanceSheets": {
       "order": 4.0,
       "parentTag": "us-gaap_StockholdersEquity",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The cumulative amount of the reporting entity's undistributed earnings or deficit.",
        "label": "Retained Earnings (Accumulated Deficit)",
        "verboseLabel": "Accumulated deficit"
       }
      }
     },
     "localname": "RetainedEarningsAccumulatedDeficit",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedBalanceSheets"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_RetainedEarningsMember": {
     "auth_ref": [
      "r181",
      "r225",
      "r226",
      "r227",
      "r229",
      "r235",
      "r237",
      "r314",
      "r496",
      "r497",
      "r498",
      "r525",
      "r526",
      "r546",
      "r618",
      "r620"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The cumulative amount of the reporting entity's undistributed earnings or deficit.",
        "label": "Retained Earnings [Member]",
        "terseLabel": "Accumulated Deficit"
       }
      }
     },
     "localname": "RetainedEarningsMember",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofStockholdersEquity"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_RevenueFromCollaborativeArrangementExcludingRevenueFromContractWithCustomer": {
     "auth_ref": [
      "r537",
      "r800"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of revenue from collaborative arrangement. Excludes revenue from contract with customer under Topic 606.",
        "label": "Revenue from Collaborative Arrangement, Excluding Revenue from Contract with Customer",
        "terseLabel": "Revenue from collaborative arrangement, excluding revenue from contract with customer"
       }
      }
     },
     "localname": "RevenueFromCollaborativeArrangementExcludingRevenueFromContractWithCustomer",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsMerckSitagliptinCatalystSupplyAgreementDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_RevenueFromContractWithCustomerAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Revenue from Contract with Customer [Abstract]",
        "terseLabel": "Revenue from Contract with Customer [Abstract]"
       }
      }
     },
     "localname": "RevenueFromContractWithCustomerAbstract",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "xbrltype": "stringItemType"
    },
    "us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax": {
     "auth_ref": [
      "r266",
      "r267",
      "r285",
      "r290",
      "r291",
      "r297",
      "r298",
      "r301",
      "r429",
      "r431",
      "r595"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedStatementsofOperations": {
       "order": 1.0,
       "parentTag": "us-gaap_OperatingIncomeLoss",
       "weight": 1.0
      },
      "http://www.codexis.com/role/RevenueRecognitionRevenueRecognizedDetails": {
       "order": null,
       "parentTag": null,
       "root": true,
       "weight": null
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount, excluding tax collected from customer, of revenue from satisfaction of performance obligation by transferring promised good or service to customer. Tax collected from customer is tax assessed by governmental authority that is both imposed on and concurrent with specific revenue-producing transaction, including, but not limited to, sales, use, value added and excise.",
        "label": "Revenue from Contract with Customer, Excluding Assessed Tax",
        "terseLabel": "Sales revenue, goods",
        "totalLabel": "Total revenues",
        "verboseLabel": "Total revenues"
       }
      }
     },
     "localname": "RevenueFromContractWithCustomerExcludingAssessedTax",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsNestleGlobalDevelopmentAgreementDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsPfizerEnzymeSupplyAgreementDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsPortonDetails",
      "http://www.codexis.com/role/ConsolidatedStatementsofOperations",
      "http://www.codexis.com/role/RevenueRecognitionDisaggregationofRevenueDetails",
      "http://www.codexis.com/role/RevenueRecognitionRevenueRecognizedDetails",
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationSegmentReportingDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_RevenueFromContractWithCustomerMember": {
     "auth_ref": [
      "r301",
      "r735"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Revenue from satisfaction of performance obligation by transferring promised product and service to customer, when it serves as benchmark in concentration of risk calculation.",
        "label": "Revenue from Contract with Customer Benchmark [Member]",
        "terseLabel": "Revenue from Contract with Customer Benchmark"
       }
      }
     },
     "localname": "RevenueFromContractWithCustomerMember",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsPfizerEnzymeSupplyAgreementDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_RevenueFromContractWithCustomerPolicyTextBlock": {
     "auth_ref": [
      "r421",
      "r422",
      "r423",
      "r424",
      "r425",
      "r426",
      "r427",
      "r428",
      "r435",
      "r659"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Disclosure of accounting policy for revenue from contract with customer.",
        "label": "Revenue from Contract with Customer [Policy Text Block]",
        "verboseLabel": "Revenue Recognition"
       }
      }
     },
     "localname": "RevenueFromContractWithCustomerPolicyTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesPolicies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_RevenueFromContractWithCustomerTextBlock": {
     "auth_ref": [
      "r410",
      "r411",
      "r412",
      "r413",
      "r414",
      "r415",
      "r419",
      "r420",
      "r434",
      "r435"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The entire disclosure of revenue from contract with customer to transfer good or service and to transfer nonfinancial asset. Includes, but is not limited to, disaggregation of revenue, credit loss recognized from contract with customer, judgment and change in judgment related to contract with customer, and asset recognized from cost incurred to obtain or fulfill contract with customer. Excludes insurance and lease contracts.",
        "label": "Revenue from Contract with Customer [Text Block]",
        "terseLabel": "Revenue Recognition"
       }
      }
     },
     "localname": "RevenueFromContractWithCustomerTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognition"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_RevenueFromRelatedParties": {
     "auth_ref": [
      "r29",
      "r178",
      "r369",
      "r370",
      "r371",
      "r377",
      "r378",
      "r379"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of revenue, fees and commissions earned from transactions between (a) a parent company and its subsidiaries; (b) subsidiaries of a common parent; (c) an entity and trusts for the benefit of employees, for example, but not limited to, pension and profit-sharing trusts that are managed by or under the trusteeship of the entity's management; (d) an entity and its principal, owners, management, or members of their immediate families; and (e) affiliates.",
        "label": "Revenue from Related Parties",
        "terseLabel": "Revenue from related parties"
       }
      }
     },
     "localname": "RevenueFromRelatedParties",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofOperationsParenthetical"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_RevenueRemainingPerformanceObligation": {
     "auth_ref": [
      "r417"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of transaction price allocated to performance obligation that has not been recognized as revenue.",
        "label": "Revenue, Remaining Performance Obligation, Amount",
        "terseLabel": "Performance obligation"
       }
      }
     },
     "localname": "RevenueRemainingPerformanceObligation",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionPerformanceObligationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_RevenueRemainingPerformanceObligationExpectedTimingOfSatisfactionPeriod1": {
     "auth_ref": [
      "r418"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Period in which remaining performance obligation is expected to be recognized as revenue, in 'PnYnMnDTnHnMnS' format, for example, 'P1Y5M13D' represents reported fact of one year, five months, and thirteen days.",
        "label": "Revenue, Remaining Performance Obligation, Expected Timing of Satisfaction, Period",
        "terseLabel": "Expected timing of satisfaction, period"
       }
      }
     },
     "localname": "RevenueRemainingPerformanceObligationExpectedTimingOfSatisfactionPeriod1",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsMolecularAssociatesIncDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsNovartisDetails",
      "http://www.codexis.com/role/RevenueRecognitionPerformanceObligationDetails"
     ],
     "xbrltype": "durationItemType"
    },
    "us-gaap_RevenueRemainingPerformanceObligationExpectedTimingOfSatisfactionStartDateAxis": {
     "auth_ref": [
      "r418"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Start date of time band for expected timing of satisfaction of remaining performance obligation, in YYYY-MM-DD format.",
        "label": "Revenue, Remaining Performance Obligation, Expected Timing of Satisfaction, Start Date [Axis]",
        "terseLabel": "Revenue, Remaining Performance Obligation, Expected Timing of Satisfaction, Start Date [Axis]"
       }
      }
     },
     "localname": "RevenueRemainingPerformanceObligationExpectedTimingOfSatisfactionStartDateAxis",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsMolecularAssociatesIncDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsNovartisDetails",
      "http://www.codexis.com/role/RevenueRecognitionPerformanceObligationDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_RevenueRemainingPerformanceObligationExpectedTimingOfSatisfactionTableTextBlock": {
     "auth_ref": [
      "r761"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Tabular disclosure of expected timing for satisfying remaining performance obligation.",
        "label": "Revenue, Remaining Performance Obligation, Expected Timing of Satisfaction [Table Text Block]",
        "terseLabel": "Performance Obligation, Expected Timing of Satisfaction"
       }
      }
     },
     "localname": "RevenueRemainingPerformanceObligationExpectedTimingOfSatisfactionTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/RevenueRecognitionTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_Revenues": {
     "auth_ref": [
      "r209",
      "r218",
      "r266",
      "r267",
      "r285",
      "r290",
      "r291",
      "r297",
      "r298",
      "r301",
      "r313",
      "r367",
      "r368",
      "r370",
      "r371",
      "r372",
      "r374",
      "r376",
      "r378",
      "r379",
      "r552",
      "r612",
      "r754"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of revenue recognized from goods sold, services rendered, insurance premiums, or other activities that constitute an earning process. Includes, but is not limited to, investment and interest income before deduction of interest expense when recognized as a component of revenue, and sales and trading gain (loss).",
        "label": "Revenues",
        "terseLabel": "Revenues"
       }
      }
     },
     "localname": "Revenues",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationRevenuesDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_RevenuesAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Revenues [Abstract]",
        "terseLabel": "Schedule of revenues by geographical area",
        "verboseLabel": "Revenues:"
       }
      }
     },
     "localname": "RevenuesAbstract",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofOperations",
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationRevenuesDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_RevolvingCreditFacilityMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Arrangement in which loan proceeds can continuously be obtained following repayments, but the total amount borrowed cannot exceed a specified maximum amount.",
        "label": "Revolving Credit Facility [Member]",
        "terseLabel": "Revolving Credit Facility"
       }
      }
     },
     "localname": "RevolvingCreditFacilityMember",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesNarrativeDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_RightOfUseAssetObtainedInExchangeForFinanceLeaseLiability": {
     "auth_ref": [
      "r573",
      "r694"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of increase in right-of-use asset obtained in exchange for finance lease liability.",
        "label": "Right-of-Use Asset Obtained in Exchange for Finance Lease Liability",
        "terseLabel": "Finance Lease - Right-of-use assets obtained in exchange for lease liabilities"
       }
      }
     },
     "localname": "RightOfUseAssetObtainedInExchangeForFinanceLeaseLiability",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesOtherLeaseInformationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_RightOfUseAssetObtainedInExchangeForOperatingLeaseLiability": {
     "auth_ref": [
      "r573",
      "r694"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of increase in right-of-use asset obtained in exchange for operating lease liability.",
        "label": "Right-of-Use Asset Obtained in Exchange for Operating Lease Liability",
        "terseLabel": "Operating Lease - Right-of-use assets obtained in exchange for lease liabilities"
       }
      }
     },
     "localname": "RightOfUseAssetObtainedInExchangeForOperatingLeaseLiability",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesOtherLeaseInformationDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_RoyaltyMember": {
     "auth_ref": [
      "r763"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Money for usage-based right to asset.",
        "label": "Royalty [Member]",
        "terseLabel": "Revenue sharing arrangement"
       }
      }
     },
     "localname": "RoyaltyMember",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsMolecularAssociatesIncDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_SaleOfStockConsiderationReceivedOnTransaction": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Cash received on stock transaction after deduction of issuance costs.",
        "label": "Sale of Stock, Consideration Received on Transaction",
        "terseLabel": "Proceeds from public offering"
       }
      }
     },
     "localname": "SaleOfStockConsiderationReceivedOnTransaction",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CapitalStockDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_SaleOfStockNameOfTransactionDomain": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Sale of the entity's stock, including, but not limited to, initial public offering (IPO) and private placement.",
        "label": "Sale of Stock [Domain]",
        "terseLabel": "Sale of Stock [Domain]"
       }
      }
     },
     "localname": "SaleOfStockNameOfTransactionDomain",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CapitalStockDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_SaleOfStockNumberOfSharesIssuedInTransaction": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The number of shares issued or sold by the subsidiary or equity method investee per stock transaction.",
        "label": "Sale of Stock, Number of Shares Issued in Transaction",
        "terseLabel": "Issuance of common stock, net of issuance costs (in shares)"
       }
      }
     },
     "localname": "SaleOfStockNumberOfSharesIssuedInTransaction",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CapitalStockDetails"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_SaleOfStockPricePerShare": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Per share amount received by subsidiary or equity investee for each share of common stock issued or sold in the stock transaction.",
        "label": "Sale of Stock, Price Per Share",
        "terseLabel": "Price per share issued (in dollars per share)"
       }
      }
     },
     "localname": "SaleOfStockPricePerShare",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CapitalStockDetails"
     ],
     "xbrltype": "perShareItemType"
    },
    "us-gaap_SalesRevenueNetMember": {
     "auth_ref": [
      "r301",
      "r735"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Revenue from sale of product and rendering of service and other sources of income, when it serves as benchmark in concentration of risk calculation.",
        "label": "Revenue Benchmark [Member]",
        "terseLabel": "Revenue Benchmark"
       }
      }
     },
     "localname": "SalesRevenueNetMember",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsMerckSitagliptinCatalystSupplyAgreementDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_SalesRevenueProductLineMember": {
     "auth_ref": [
      "r734"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Revenue from specified product or service, when it serves as benchmark in concentration of risk calculation. Includes, but is not limited to, revenue from contract with customer and other sources.",
        "label": "Revenue, Product and Service Benchmark [Member]",
        "terseLabel": "Revenue, Product and Service Benchmark"
       }
      }
     },
     "localname": "SalesRevenueProductLineMember",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationConcentrationRiskDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_ScheduleOfAccruedLiabilitiesTableTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Tabular disclosure of the components of accrued liabilities.",
        "label": "Schedule of Accrued Liabilities [Table Text Block]",
        "terseLabel": "Schedule of Accrued Liabilities"
       }
      }
     },
     "localname": "ScheduleOfAccruedLiabilitiesTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetDetailsTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTable": {
     "auth_ref": [
      "r55"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Schedule for securities (including those issuable pursuant to contingent stock agreements) that could potentially dilute basic earnings per share (EPS) in the future that were not included in the computation of diluted EPS because to do so would increase EPS amounts or decrease loss per share amounts for the period presented, by Antidilutive Securities.",
        "label": "Schedule of Antidilutive Securities Excluded from Computation of Earnings Per Share [Table]",
        "terseLabel": "Schedule of Antidilutive Securities Excluded from Computation of Earnings Per Share [Table]"
       }
      }
     },
     "localname": "ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTable",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/NetLossperShareDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTextBlock": {
     "auth_ref": [
      "r55"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Tabular disclosure of securities (including those issuable pursuant to contingent stock agreements) that could potentially dilute basic earnings per share (EPS) in the future that were not included in the computation of diluted EPS because to do so would increase EPS amounts or decrease loss per share amounts for the period presented, by antidilutive securities.",
        "label": "Schedule of Antidilutive Securities Excluded from Computation of Earnings Per Share [Table Text Block]",
        "terseLabel": "Shares Not Included in Computation of Diluted Net Loss Per Share"
       }
      }
     },
     "localname": "ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/NetLossperShareTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ScheduleOfAssumptionsUsedTableTextBlock": {
     "auth_ref": [
      "r444"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Tabular disclosure of assumption used to determine benefit obligation and net periodic benefit cost of defined benefit plan. Includes, but is not limited to, discount rate, rate of compensation increase, expected long-term rate of return on plan assets and interest crediting rate.",
        "label": "Defined Benefit Plan, Assumptions [Table Text Block]",
        "terseLabel": "Schedule of Assumptions Used"
       }
      }
     },
     "localname": "ScheduleOfAssumptionsUsedTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ScheduleOfCashAndCashEquivalentsTable": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Schedule of cash and cash equivalent balances. This table excludes restricted cash balances.",
        "label": "Schedule of Cash and Cash Equivalents [Table]",
        "terseLabel": "Schedule of Cash and Cash Equivalents [Table]"
       }
      }
     },
     "localname": "ScheduleOfCashAndCashEquivalentsTable",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetDetailsCashandCashEquivalentsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ScheduleOfCashAndCashEquivalentsTableTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Tabular disclosure of the components of cash and cash equivalents.",
        "label": "Schedule of Cash and Cash Equivalents [Table Text Block]",
        "terseLabel": "Schedule of Cash and Cash Equivalents"
       }
      }
     },
     "localname": "ScheduleOfCashAndCashEquivalentsTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetDetailsTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ScheduleOfCollaborativeArrangementsAndNoncollaborativeArrangementTransactionsTable": {
     "auth_ref": [
      "r801"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Disclosure of information about collaborative arrangement and arrangement other than collaborative applicable to revenue-generating activity or operations.",
        "label": "Collaborative Arrangement and Arrangement Other than Collaborative [Table]",
        "terseLabel": "Schedule of Collaborative Arrangements and Non-collaborative Arrangement Transactions [Table]"
       }
      }
     },
     "localname": "ScheduleOfCollaborativeArrangementsAndNoncollaborativeArrangementTransactionsTable",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsEnzymeSupplyAgreementDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsGSKPlatformTechnologyTransferCollaborationandLicenseAgreementDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsMerckPlatformTechnologyTransferandLicenseAgreementDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsMerckSitagliptinCatalystSupplyAgreementDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsMolecularAssociatesIncDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsNestleGlobalDevelopmentAgreementDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsNovartisDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsPfizerEnzymeSupplyAgreementDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsPortonDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsRocheDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsTakedaDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsTateLyleDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ScheduleOfComponentsOfIncomeTaxExpenseBenefitTableTextBlock": {
     "auth_ref": [
      "r132"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Tabular disclosure of the components of income tax expense attributable to continuing operations for each year presented including, but not limited to: current tax expense (benefit), deferred tax expense (benefit), investment tax credits, government grants, the benefits of operating loss carryforwards, tax expense that results from allocating certain tax benefits either directly to contributed capital or to reduce goodwill or other noncurrent intangible assets of an acquired entity, adjustments of a deferred tax liability or asset for enacted changes in tax laws or rates or a change in the tax status of the entity, and adjustments of the beginning-of-the-year balances of a valuation allowance because of a change in circumstances that causes a change in judgment about the realizability of the related deferred tax asset in future years.",
        "label": "Schedule of Components of Income Tax Expense (Benefit) [Table Text Block]",
        "terseLabel": "Components of Provision for Income Taxes"
       }
      }
     },
     "localname": "ScheduleOfComponentsOfIncomeTaxExpenseBenefitTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ScheduleOfDeferredTaxAssetsAndLiabilitiesTableTextBlock": {
     "auth_ref": [
      "r128"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Tabular disclosure of the components of net deferred tax asset or liability recognized in an entity's statement of financial position, including the following: the total of all deferred tax liabilities, the total of all deferred tax assets, the total valuation allowance recognized for deferred tax assets.",
        "label": "Schedule of Deferred Tax Assets and Liabilities [Table Text Block]",
        "terseLabel": "Significant Components of Deferred Tax Assets and Liabilities"
       }
      }
     },
     "localname": "ScheduleOfDeferredTaxAssetsAndLiabilitiesTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ScheduleOfEffectiveIncomeTaxRateReconciliationTableTextBlock": {
     "auth_ref": [
      "r125"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Tabular disclosure of the reconciliation using percentage or dollar amounts of the reported amount of income tax expense attributable to continuing operations for the year to the amount of income tax expense that would result from applying domestic federal statutory tax rates to pretax income from continuing operations.",
        "label": "Schedule of Effective Income Tax Rate Reconciliation [Table Text Block]",
        "terseLabel": "Reconciliation of Provision for Income Taxes Calculated at the Statutory Rate to Provision for Income Taxes"
       }
      }
     },
     "localname": "ScheduleOfEffectiveIncomeTaxRateReconciliationTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ScheduleOfEmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsTable": {
     "auth_ref": [
      "r114",
      "r117"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Disclosure of information about amount recognized for award under share-based payment arrangement. Includes, but is not limited to, amount expensed in statement of income or comprehensive income, amount capitalized in statement of financial position, and corresponding reporting line item in financial statements.",
        "label": "Share-Based Payment Arrangement, Expensed and Capitalized, Amount [Table]",
        "terseLabel": "Schedule of Employee Service Share-based Compensation, Allocation of Recognized Period Costs [Table]"
       }
      }
     },
     "localname": "ScheduleOfEmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsTable",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationStockBasedCompensationExpenseDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ScheduleOfEmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsTextBlock": {
     "auth_ref": [
      "r114"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Tabular disclosure of allocation of amount expensed and capitalized for award under share-based payment arrangement to statement of income or comprehensive income and statement of financial position. Includes, but is not limited to, corresponding line item in financial statement.",
        "label": "Share-Based Payment Arrangement, Expensed and Capitalized, Amount [Table Text Block]",
        "verboseLabel": "Schedule of Stock-based Compensation Expense"
       }
      }
     },
     "localname": "ScheduleOfEmployeeServiceShareBasedCompensationAllocationOfRecognizedPeriodCostsTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ScheduleOfEntityWideDisclosureOnGeographicAreasLongLivedAssetsInIndividualForeignCountriesByCountryTextBlock": {
     "auth_ref": [
      "r71"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Tabular disclosure of the names of foreign countries in which material long-lived assets other than financial instruments, long-term customer relationships of a financial institution, mortgage and other servicing rights, deferred policy acquisition costs, and deferred tax assets are located, and amount of such long-lived assets located in that country or foreign geographic area.",
        "label": "Schedule of Disclosure on Geographic Areas, Long-Lived Assets in Individual Foreign Countries by Country [Table Text Block]",
        "verboseLabel": "Schedule of Long-lived Assets by Geographical Area"
       }
      }
     },
     "localname": "ScheduleOfEntityWideDisclosureOnGeographicAreasLongLivedAssetsInIndividualForeignCountriesByCountryTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ScheduleOfFinancingReceivableAllowanceForCreditLossesTable": {
     "auth_ref": [
      "r652",
      "r743"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Disclosure of information about allowance for credit loss on financing receivable.",
        "label": "Financing Receivable, Allowance for Credit Loss [Table]",
        "terseLabel": "Financing Receivable, Allowance for Credit Loss [Table]"
       }
      }
     },
     "localname": "ScheduleOfFinancingReceivableAllowanceForCreditLossesTable",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/AllowanceforCreditLossesSummaryofAccountsReceivablebyAgingCategoryDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ScheduleOfIncomeBeforeIncomeTaxDomesticAndForeignTableTextBlock": {
     "auth_ref": [
      "r726"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Tabular disclosure of income before income tax between domestic and foreign jurisdictions.",
        "label": "Schedule of Income before Income Tax, Domestic and Foreign [Table Text Block]",
        "terseLabel": "Schedule of Loss Before Income Taxes, Domestic and Foreign"
       }
      }
     },
     "localname": "ScheduleOfIncomeBeforeIncomeTaxDomesticAndForeignTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ScheduleOfIntangibleAssetsAndGoodwillTableTextBlock": {
     "auth_ref": [
      "r80"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Tabular disclosure of goodwill and intangible assets, which may be broken down by segment or major class.",
        "label": "Schedule of Intangible Assets and Goodwill [Table Text Block]",
        "terseLabel": "Schedule of Intangible Assets and Goodwill"
       }
      }
     },
     "localname": "ScheduleOfIntangibleAssetsAndGoodwillTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ScheduleOfInventoryCurrentTableTextBlock": {
     "auth_ref": [
      "r0",
      "r12",
      "r13",
      "r14"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Tabular disclosure of the carrying amount as of the balance sheet date of merchandise, goods, commodities, or supplies held for future sale or to be used in manufacturing, servicing or production process.",
        "label": "Schedule of Inventory, Current [Table Text Block]",
        "verboseLabel": "Schedule of Inventory Components"
       }
      }
     },
     "localname": "ScheduleOfInventoryCurrentTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetDetailsTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ScheduleOfPropertyPlantAndEquipmentTable": {
     "auth_ref": [
      "r86"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Disclosure of information about physical assets used in the normal conduct of business and not intended for resale. Includes, but is not limited to, balances by class of assets, depreciation and depletion expense and method used, including composite depreciation, and accumulated deprecation.",
        "label": "Property, Plant and Equipment [Table]",
        "terseLabel": "Schedule of Property, Plant and Equipment [Table]"
       }
      }
     },
     "localname": "ScheduleOfPropertyPlantAndEquipmentTable",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetDetailsPropertyandEquipmentnetDetails",
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesPropertyPlantandEquipmentDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ScheduleOfRelatedPartyTransactionsByRelatedPartyTable": {
     "auth_ref": [
      "r145",
      "r146"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Schedule of quantitative and qualitative information pertaining to related party transactions. Examples of related party transactions include transactions between (a) a parent company and its subsidiary; (b) subsidiaries of a common parent; (c) and entity and its principal owners; and (d) affiliates.",
        "label": "Schedule of Related Party Transactions, by Related Party [Table]",
        "terseLabel": "Schedule of Related Party Transactions, by Related Party [Table]"
       }
      }
     },
     "localname": "ScheduleOfRelatedPartyTransactionsByRelatedPartyTable",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/RelatedPartyTransactionsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ScheduleOfRestructuringAndRelatedCostsTable": {
     "auth_ref": [
      "r349",
      "r350",
      "r351",
      "r352",
      "r355",
      "r356",
      "r357"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Table presenting the description of the restructuring costs, such as the expected cost; the costs incurred during the period; the cumulative costs incurred as of the balance sheet date; the income statement caption within which the restructuring charges recognized for the period are included; and the amount of and periodic changes to an entity's restructuring reserve that occurred during the period associated with the exit from or disposal of business activities or restructurings for each major type of cost by type of restructuring.",
        "label": "Schedule of Restructuring and Related Costs [Table]",
        "terseLabel": "Schedule of Restructuring and Related Costs [Table]"
       }
      }
     },
     "localname": "ScheduleOfRestructuringAndRelatedCostsTable",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/RestructuringChargesDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable": {
     "auth_ref": [
      "r65",
      "r66",
      "r68",
      "r80"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "A table disclosing the profit or loss and total assets for each reportable segment of the entity. An entity discloses certain information on each reportable segment if the amounts (a) are included in the measure of segment profit or loss reviewed by the chief operating decision maker or (b) are otherwise regularly provided to the chief operating decision maker, even if not included in that measure of segment profit or loss.",
        "label": "Schedule of Segment Reporting Information, by Segment [Table]",
        "terseLabel": "Schedule of Segment Reporting Information, by Segment [Table]"
       }
      }
     },
     "localname": "ScheduleOfSegmentReportingInformationBySegmentTable",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationGoodwillDetails",
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationRevenuesDetails",
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationSegmentReportingDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ScheduleOfSegmentReportingInformationBySegmentTextBlock": {
     "auth_ref": [
      "r65",
      "r66",
      "r68",
      "r80"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Tabular disclosure of the profit or loss and total assets for each reportable segment. An entity discloses certain information on each reportable segment if the amounts (a) are included in the measure of segment profit or loss reviewed by the chief operating decision maker or (b) are otherwise regularly provided to the chief operating decision maker, even if not included in that measure of segment profit or loss.",
        "label": "Schedule of Segment Reporting Information, by Segment [Table Text Block]",
        "terseLabel": "Schedule of Segment Reporting"
       }
      }
     },
     "localname": "ScheduleOfSegmentReportingInformationBySegmentTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable": {
     "auth_ref": [
      "r458",
      "r460",
      "r462",
      "r463",
      "r464",
      "r466",
      "r467",
      "r468",
      "r469",
      "r470",
      "r471",
      "r472",
      "r473",
      "r474",
      "r475",
      "r476",
      "r477",
      "r478",
      "r479",
      "r480",
      "r481",
      "r482",
      "r483",
      "r486",
      "r487",
      "r488",
      "r489",
      "r490"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Disclosure of information about share-based payment arrangement.",
        "label": "Schedule of Share-Based Compensation Arrangements by Share-Based Payment Award [Table]",
        "terseLabel": "Schedule of Share-based Compensation Arrangements by Share-based Payment Award [Table]"
       }
      }
     },
     "localname": "ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationAssumptionsUsedDetails",
      "http://www.codexis.com/role/StockbasedCompensationAwardActivityDetails",
      "http://www.codexis.com/role/StockbasedCompensationNarrativeDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ScheduleOfShareBasedCompensationRestrictedStockUnitsAwardActivityTableTextBlock": {
     "auth_ref": [
      "r108"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Tabular disclosure of the number and weighted-average grant date fair value for restricted stock units that were outstanding at the beginning and end of the year, and the number of restricted stock units that were granted, vested, or forfeited during the year.",
        "label": "Share-Based Payment Arrangement, Restricted Stock Unit, Activity [Table Text Block]",
        "terseLabel": "Schedule of Share-based Compensation, RSA Activity"
       }
      }
     },
     "localname": "ScheduleOfShareBasedCompensationRestrictedStockUnitsAwardActivityTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ScheduleOfShareBasedCompensationStockOptionsActivityTableTextBlock": {
     "auth_ref": [
      "r108",
      "r110",
      "r111"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Tabular disclosure for stock option plans. Includes, but is not limited to, outstanding awards at beginning and end of year, grants, exercises, forfeitures, and weighted-average grant date fair value.",
        "label": "Share-Based Payment Arrangement, Option, Activity [Table Text Block]",
        "terseLabel": "Schedule of Share-based Compensation, Stock Options, Activity"
       }
      }
     },
     "localname": "ScheduleOfShareBasedCompensationStockOptionsActivityTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ScheduleOfShareBasedPaymentAwardStockOptionsValuationAssumptionsTableTextBlock": {
     "auth_ref": [
      "r113"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Tabular disclosure of the significant assumptions used during the year to estimate the fair value of stock options, including, but not limited to: (a) expected term of share options and similar instruments, (b) expected volatility of the entity's shares, (c) expected dividends, (d) risk-free rate(s), and (e) discount for post-vesting restrictions.",
        "label": "Schedule of Share-Based Payment Award, Stock Options, Valuation Assumptions [Table Text Block]",
        "terseLabel": "Assumptions Used to Estimate the Fair Value of Option Grants"
       }
      }
     },
     "localname": "ScheduleOfShareBasedPaymentAwardStockOptionsValuationAssumptionsTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ScheduleOfSharebasedCompensationRestrictedStockAndRestrictedStockUnitsActivityTableTextBlock": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Disclosure of the number and weighted-average grant date fair value for restricted stock and restricted stock units that were outstanding at the beginning and end of the year, and the number of restricted stock and restricted stock units that were granted, vested, or forfeited during the year.",
        "label": "Share-Based Payment Arrangement, Restricted Stock and Restricted Stock Unit, Activity [Table Text Block]",
        "terseLabel": "Schedule of Share-based Compensation, RSU Activity"
       }
      }
     },
     "localname": "ScheduleOfSharebasedCompensationRestrictedStockAndRestrictedStockUnitsActivityTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ScheduleOfStockByClassTable": {
     "auth_ref": [
      "r95",
      "r96",
      "r97",
      "r99",
      "r100",
      "r101",
      "r102",
      "r103",
      "r104",
      "r105",
      "r193",
      "r194",
      "r195",
      "r254",
      "r391",
      "r392",
      "r393",
      "r395",
      "r399",
      "r404",
      "r406",
      "r676",
      "r709",
      "r724"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Schedule detailing information related to equity by class of stock. Class of stock includes common, convertible, and preferred stocks which are not redeemable or redeemable solely at the option of the issuer. It also includes preferred stock with redemption features that are solely within the control of the issuer and mandatorily redeemable stock if redemption is required to occur only upon liquidation or termination of the reporting entity.",
        "label": "Schedule of Stock by Class [Table]",
        "terseLabel": "Schedule of Stock by Class [Table]"
       }
      }
     },
     "localname": "ScheduleOfStockByClassTable",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CapitalStockDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ScheduleOfUnrecognizedTaxBenefitsRollForwardTableTextBlock": {
     "auth_ref": [
      "r693",
      "r794"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Tabular disclosure of the change in unrecognized tax benefits.",
        "label": "Schedule of Unrecognized Tax Benefits Roll Forward [Table Text Block]",
        "terseLabel": "Reconciliation of the Beginning and Ending Amount of Unrecognized Tax Benefits"
       }
      }
     },
     "localname": "ScheduleOfUnrecognizedTaxBenefitsRollForwardTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_SchedulesOfConcentrationOfRiskByRiskFactorTextBlock": {
     "auth_ref": [
      "r56",
      "r58",
      "r59",
      "r60",
      "r140",
      "r142"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Tabular disclosure of the nature of a concentration, a benchmark to which it is compared, and the percentage that the risk is to the benchmark.",
        "label": "Schedules of Concentration of Risk, by Risk Factor [Table Text Block]",
        "terseLabel": "Schedule of Customers That Contributed 10% or More of Total Accounts Receivable"
       }
      }
     },
     "localname": "SchedulesOfConcentrationOfRiskByRiskFactorTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_SecurityDeposit": {
     "auth_ref": [
      "r713"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The amount of an asset, typically cash, provided to a counterparty to provide certain assurance of performance by the entity pursuant to the terms of a written or oral agreement, such as a lease.",
        "label": "Security Deposit",
        "terseLabel": "Security deposit"
       }
      }
     },
     "localname": "SecurityDeposit",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesNarrativeDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_SecurityOwnedNotReadilyMarketableAxis": {
     "auth_ref": [
      "r152"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Information by name of not readily marketable security.",
        "label": "Security Owned Not Readily Marketable [Axis]",
        "terseLabel": "Security Owned Not Readily Marketable [Axis]"
       }
      }
     },
     "localname": "SecurityOwnedNotReadilyMarketableAxis",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/FairValueMeasurementsDetails",
      "http://www.codexis.com/role/InvestmentsinNonMarketableSecuritiesCarryingValueandFairValueofSecuritiesDetails",
      "http://www.codexis.com/role/InvestmentsinNonMarketableSecuritiesNarrativeDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_SecurityOwnedNotReadilyMarketableNameDomain": {
     "auth_ref": [
      "r152"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Name of the security category or actual security title.",
        "label": "Security Owned Not Readily Marketable, Name [Domain]",
        "terseLabel": "Security Owned Not Readily Marketable, Name [Domain]"
       }
      }
     },
     "localname": "SecurityOwnedNotReadilyMarketableNameDomain",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/FairValueMeasurementsDetails",
      "http://www.codexis.com/role/InvestmentsinNonMarketableSecuritiesCarryingValueandFairValueofSecuritiesDetails",
      "http://www.codexis.com/role/InvestmentsinNonMarketableSecuritiesNarrativeDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_SegmentDomain": {
     "auth_ref": [
      "r263",
      "r266",
      "r267",
      "r268",
      "r269",
      "r270",
      "r271",
      "r272",
      "r273",
      "r274",
      "r275",
      "r276",
      "r277",
      "r285",
      "r286",
      "r287",
      "r288",
      "r289",
      "r290",
      "r291",
      "r292",
      "r293",
      "r295",
      "r301",
      "r333",
      "r334",
      "r335",
      "r336",
      "r337",
      "r338",
      "r339",
      "r340",
      "r341",
      "r352",
      "r357",
      "r666",
      "r823"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Components of an entity that engage in business activities from which they may earn revenue and incur expenses, including transactions with other components of the same entity.",
        "label": "Segments [Domain]",
        "terseLabel": "Segments [Domain]"
       }
      }
     },
     "localname": "SegmentDomain",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesNarrativeDetails",
      "http://www.codexis.com/role/RevenueRecognitionDisaggregationofRevenueDetails",
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationGoodwillDetails",
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationSegmentReportingDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_SegmentReportingAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Segment Reporting [Abstract]",
        "terseLabel": "Segment Reporting [Abstract]"
       }
      }
     },
     "localname": "SegmentReportingAbstract",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "xbrltype": "stringItemType"
    },
    "us-gaap_SegmentReportingDisclosureTextBlock": {
     "auth_ref": [
      "r263",
      "r264",
      "r265",
      "r275",
      "r278",
      "r289",
      "r293",
      "r294",
      "r295",
      "r296",
      "r297",
      "r300",
      "r301",
      "r302"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The entire disclosure for reporting segments including data and tables. Reportable segments include those that meet any of the following quantitative thresholds a) it's reported revenue, including sales to external customers and intersegment sales or transfers is 10 percent or more of the combined revenue, internal and external, of all operating segments b) the absolute amount of its reported profit or loss is 10 percent or more of the greater, in absolute amount of 1) the combined reported profit of all operating segments that did not report a loss or 2) the combined reported loss of all operating segments that did report a loss c) its assets are 10 percent or more of the combined assets of all operating segments.",
        "label": "Segment Reporting Disclosure [Text Block]",
        "verboseLabel": "Segment, Geographical and Other Revenue Information"
       }
      }
     },
     "localname": "SegmentReportingDisclosureTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformation"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_SegmentReportingInformationLineItems": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table.",
        "label": "Segment Reporting Information [Line Items]",
        "terseLabel": "Segment Reporting Information [Line Items]"
       }
      }
     },
     "localname": "SegmentReportingInformationLineItems",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationGoodwillDetails",
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationRevenuesDetails",
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationSegmentReportingDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_SegmentReportingPolicyPolicyTextBlock": {
     "auth_ref": [
      "r279",
      "r280",
      "r281",
      "r282",
      "r283",
      "r284",
      "r298"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Disclosure of accounting policy for segment reporting.",
        "label": "Segment Reporting, Policy [Policy Text Block]",
        "terseLabel": "Segment Reporting"
       }
      }
     },
     "localname": "SegmentReportingPolicyPolicyTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesPolicies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_SellingGeneralAndAdministrativeExpense": {
     "auth_ref": [
      "r31"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedStatementsofOperations": {
       "order": 4.0,
       "parentTag": "us-gaap_CostsAndExpenses",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The aggregate total costs related to selling a firm's product and services, as well as all other general and administrative expenses. Direct selling expenses (for example, credit, warranty, and advertising) are expenses that can be directly linked to the sale of specific products. Indirect selling expenses are expenses that cannot be directly linked to the sale of specific products, for example telephone expenses, Internet, and postal charges. General and administrative expenses include salaries of non-sales personnel, rent, utilities, communication, etc.",
        "label": "Selling, General and Administrative Expense",
        "terseLabel": "Selling, general and administrative"
       }
      }
     },
     "localname": "SellingGeneralAndAdministrativeExpense",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofOperations",
      "http://www.codexis.com/role/ConsolidatedStatementsofOperationsParenthetical",
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationSegmentReportingDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_SellingGeneralAndAdministrativeExpensesMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Primary financial statement caption encompassing selling, general and administrative expense.",
        "label": "Selling, General and Administrative Expenses [Member]",
        "terseLabel": "Selling, general and administrative"
       }
      }
     },
     "localname": "SellingGeneralAndAdministrativeExpensesMember",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationStockBasedCompensationExpenseDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_SeriesAPreferredStockMember": {
     "auth_ref": [
      "r714",
      "r715",
      "r757"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Series A preferred stock.",
        "label": "Series A Preferred Stock [Member]",
        "terseLabel": "Series A Preferred Stock"
       }
      }
     },
     "localname": "SeriesAPreferredStockMember",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsMolecularAssociatesIncDetails",
      "http://www.codexis.com/role/RelatedPartyTransactionsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_SeriesBPreferredStockMember": {
     "auth_ref": [
      "r714",
      "r715",
      "r757"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Series B preferred stock.",
        "label": "Series B Preferred Stock [Member]",
        "terseLabel": "Series B Preferred Stock"
       }
      }
     },
     "localname": "SeriesBPreferredStockMember",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsMolecularAssociatesIncDetails",
      "http://www.codexis.com/role/InvestmentsinNonMarketableSecuritiesNarrativeDetails",
      "http://www.codexis.com/role/RelatedPartyTransactionsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_ShareBasedCompensation": {
     "auth_ref": [
      "r43"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows": {
       "order": 4.0,
       "parentTag": "us-gaap_NetCashProvidedByUsedInOperatingActivities",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of noncash expense for share-based payment arrangement.",
        "label": "Share-Based Payment Arrangement, Noncash Expense",
        "terseLabel": "Stock-based compensation",
        "verboseLabel": "Stock-based compensation"
       }
      }
     },
     "localname": "ShareBasedCompensation",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows",
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationSegmentReportingDetails",
      "http://www.codexis.com/role/StockbasedCompensationStockBasedCompensationExpenseDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardVestingPeriod1": {
     "auth_ref": [
      "r690"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Period over which grantee's right to exercise award under share-based payment arrangement is no longer contingent on satisfaction of service or performance condition, in 'PnYnMnDTnHnMnS' format, for example, 'P1Y5M13D' represents reported fact of one year, five months, and thirteen days. Includes, but is not limited to, combination of market, performance or service condition.",
        "label": "Share-Based Compensation Arrangement by Share-Based Payment Award, Award Vesting Period",
        "terseLabel": "Vesting period of units granted"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardVestingPeriod1",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationNarrativeDetails"
     ],
     "xbrltype": "durationItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeitedInPeriod": {
     "auth_ref": [
      "r479"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The number of equity-based payment instruments, excluding stock (or unit) options, that were forfeited during the reporting period.",
        "label": "Share-Based Compensation Arrangement by Share-Based Payment Award, Equity Instruments Other than Options, Forfeited in Period",
        "negatedTerseLabel": "Forfeited/Expired (in shares)"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeitedInPeriod",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationAwardActivityDetails"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeituresWeightedAverageGrantDateFairValue": {
     "auth_ref": [
      "r479"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Weighted average fair value as of the grant date of equity-based award plans other than stock (unit) option plans that were not exercised or put into effect as a result of the occurrence of a terminating event.",
        "label": "Share-Based Compensation Arrangement by Share-Based Payment Award, Equity Instruments Other than Options, Forfeitures, Weighted Average Grant Date Fair Value",
        "terseLabel": "Forfeited/Expired (in dollars per share)"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeituresWeightedAverageGrantDateFairValue",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationAwardActivityDetails"
     ],
     "xbrltype": "perShareItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod": {
     "auth_ref": [
      "r477"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The number of grants made during the period on other than stock (or unit) option plans (for example, phantom stock or unit plan, stock or unit appreciation rights plan, performance target plan).",
        "label": "Share-Based Compensation Arrangement by Share-Based Payment Award, Equity Instruments Other than Options, Grants in Period",
        "verboseLabel": "Granted (in shares)"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationAwardActivityDetails"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriodWeightedAverageGrantDateFairValue": {
     "auth_ref": [
      "r477"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The weighted average fair value at grant date for nonvested equity-based awards issued during the period on other than stock (or unit) option plans (for example, phantom stock or unit plan, stock or unit appreciation rights plan, performance target plan).",
        "label": "Share-Based Compensation Arrangement by Share-Based Payment Award, Equity Instruments Other than Options, Grants in Period, Weighted Average Grant Date Fair Value",
        "terseLabel": "Granted (in dollars per share)"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriodWeightedAverageGrantDateFairValue",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationAwardActivityDetails"
     ],
     "xbrltype": "perShareItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber": {
     "auth_ref": [
      "r474",
      "r475"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The number of non-vested equity-based payment instruments, excluding stock (or unit) options, that validly exist and are outstanding as of the balance sheet date.",
        "label": "Share-Based Compensation Arrangement by Share-Based Payment Award, Equity Instruments Other than Options, Nonvested, Number",
        "periodEndLabel": "Non-vested, end of period (in shares)",
        "periodStartLabel": "Non-vested, beginning of period (in shares)"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationAwardActivityDetails"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedRollForward": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "A roll forward is a reconciliation of a concept from the beginning of a period to the end of a period.",
        "label": "Share-Based Compensation Arrangement by Share-Based Payment Award, Equity Instruments Other than Options, Nonvested, Number of Shares [Roll Forward]",
        "terseLabel": "Number of Shares"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedRollForward",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationAwardActivityDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValue": {
     "auth_ref": [
      "r474",
      "r475"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Per share or unit weighted-average fair value of nonvested award under share-based payment arrangement. Excludes share and unit options.",
        "label": "Share-Based Compensation Arrangement by Share-Based Payment Award, Equity Instruments Other than Options, Nonvested, Weighted Average Grant Date Fair Value",
        "periodEndLabel": "Non-vested, end of period (in dollars per share)",
        "periodStartLabel": "Non-vested, beginning of period (in dollars per share)"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValue",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationAwardActivityDetails"
     ],
     "xbrltype": "perShareItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Share-Based Compensation Arrangement by Share-Based Payment Award, Equity Instruments Other than Options, Nonvested, Weighted Average Grant Date Fair Value [Abstract]",
        "terseLabel": "Weighted Average Grant Date Fair Value Per Share"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationAwardActivityDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriod": {
     "auth_ref": [
      "r478"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The number of equity-based payment instruments, excluding stock (or unit) options, that vested during the reporting period.",
        "label": "Share-Based Compensation Arrangement by Share-Based Payment Award, Equity Instruments Other than Options, Vested in Period",
        "negatedTerseLabel": "Vested (in shares)"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriod",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationAwardActivityDetails"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriodWeightedAverageGrantDateFairValue": {
     "auth_ref": [
      "r478"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The weighted average fair value as of grant date pertaining to an equity-based award plan other than a stock (or unit) option plan for which the grantee gained the right during the reporting period, by satisfying service and performance requirements, to receive or retain shares or units, other instruments, or cash in accordance with the terms of the arrangement.",
        "label": "Share-Based Compensation Arrangement by Share-Based Payment Award, Equity Instruments Other than Options, Vested in Period, Weighted Average Grant Date Fair Value",
        "terseLabel": "Vested (in dollars per share)"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriodWeightedAverageGrantDateFairValue",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationAwardActivityDetails"
     ],
     "xbrltype": "perShareItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsExpectedDividendRate": {
     "auth_ref": [
      "r488"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The estimated dividend rate (a percentage of the share price) to be paid (expected dividends) to holders of the underlying shares over the option's term.",
        "label": "Share-Based Compensation Arrangement by Share-Based Payment Award, Fair Value Assumptions, Expected Dividend Rate",
        "terseLabel": "Expected dividend yield"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsExpectedDividendRate",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationAssumptionsUsedDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsRiskFreeInterestRate": {
     "auth_ref": [
      "r489"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The risk-free interest rate assumption that is used in valuing an option on its own shares.",
        "label": "Share-Based Compensation Arrangement by Share-Based Payment Award, Fair Value Assumptions, Risk Free Interest Rate",
        "terseLabel": "Risk-free interest rate"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsRiskFreeInterestRate",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationAssumptionsUsedDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsWeightedAverageVolatilityRate": {
     "auth_ref": [
      "r487"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Rate of weighted-average expected volatility for award under share-based payment arrangement.",
        "label": "Share-Based Compensation Arrangement by Share-Based Payment Award, Fair Value Assumptions, Weighted Average Volatility Rate",
        "verboseLabel": "Volatility"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsWeightedAverageVolatilityRate",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationAssumptionsUsedDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table.",
        "label": "Share-Based Compensation Arrangement by Share-Based Payment Award [Line Items]",
        "terseLabel": "Share-based Compensation Arrangement by Share-based Payment Award [Line Items]"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationAssumptionsUsedDetails",
      "http://www.codexis.com/role/StockbasedCompensationAwardActivityDetails",
      "http://www.codexis.com/role/StockbasedCompensationNarrativeDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNonOptionEquityInstrumentsExercised": {
     "auth_ref": [
      "r109"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Number of non-option equity instruments exercised by participants.",
        "label": "Share-Based Compensation Arrangement by Share-Based Payment Award, Non-Option Equity Instruments, Exercised",
        "negatedTerseLabel": "Exercised (in shares)"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardNonOptionEquityInstrumentsExercised",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationAwardActivityDetails"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAuthorized": {
     "auth_ref": [
      "r692"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Number of shares authorized for issuance under share-based payment arrangement.",
        "label": "Share-Based Compensation Arrangement by Share-Based Payment Award, Number of Shares Authorized",
        "terseLabel": "Number of shares authorized (in shares)"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAuthorized",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationNarrativeDetails"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAvailableForGrant": {
     "auth_ref": [
      "r115"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The difference between the maximum number of shares (or other type of equity) authorized for issuance under the plan (including the effects of amendments and adjustments), and the sum of: 1) the number of shares (or other type of equity) already issued upon exercise of options or other equity-based awards under the plan; and 2) shares (or other type of equity) reserved for issuance on granting of outstanding awards, net of cancellations and forfeitures, if applicable.",
        "label": "Share-Based Compensation Arrangement by Share-Based Payment Award, Number of Shares Available for Grant",
        "terseLabel": "Total shares remaining available for issuance (in shares)"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardNumberOfSharesAvailableForGrant",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationNarrativeDetails"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsAdditionalDisclosuresAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Share-Based Compensation Arrangement by Share-Based Payment Award, Options, Additional Disclosures [Abstract]",
        "terseLabel": "Additional Disclosures"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsAdditionalDisclosuresAbstract",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationOptionActivityDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisableNumber": {
     "auth_ref": [
      "r468"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The number of shares into which fully or partially vested stock options outstanding as of the balance sheet date can be currently converted under the option plan.",
        "label": "Share-Based Compensation Arrangement by Share-Based Payment Award, Options, Exercisable, Number",
        "terseLabel": "Options exercisable (in shares)"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisableNumber",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationAwardActivityDetails",
      "http://www.codexis.com/role/StockbasedCompensationOptionActivityDetails"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisableWeightedAverageExercisePrice": {
     "auth_ref": [
      "r468"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The weighted-average price as of the balance sheet date at which grantees can acquire the shares reserved for issuance on vested portions of options outstanding and currently exercisable under the stock option plan.",
        "label": "Share-Based Compensation Arrangement by Share-Based Payment Award, Options, Exercisable, Weighted Average Exercise Price",
        "terseLabel": "Options exercisable (in dollars per share)"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisableWeightedAverageExercisePrice",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationAwardActivityDetails",
      "http://www.codexis.com/role/StockbasedCompensationOptionActivityDetails"
     ],
     "xbrltype": "perShareItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisesInPeriodTotalIntrinsicValue": {
     "auth_ref": [
      "r481"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of accumulated difference between fair value of underlying shares on dates of exercise and exercise price on options exercised (or share units converted) into shares.",
        "label": "Share-Based Compensation Arrangement by Share-Based Payment Award, Options, Exercises in Period, Intrinsic Value",
        "terseLabel": "Aggregate intrinsic value of options exercised"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisesInPeriodTotalIntrinsicValue",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationNarrativeDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsForfeituresAndExpirationsInPeriod": {
     "auth_ref": [
      "r772"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "For presentations that combine terminations, the number of shares under options that were cancelled during the reporting period as a result of occurrence of a terminating event specified in contractual agreements pertaining to the stock option plan or that expired.",
        "label": "Share-Based Compensation Arrangement by Share-Based Payment Award, Options, Forfeitures and Expirations in Period",
        "negatedTerseLabel": "Forfeited/Expired (in shares)"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsForfeituresAndExpirationsInPeriod",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationOptionActivityDetails"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsForfeituresAndExpirationsInPeriodWeightedAverageExercisePrice": {
     "auth_ref": [
      "r772"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Weighted average price of options that were either forfeited or expired.",
        "label": "Share-Based Compensation Arrangement by Share-Based Payment Award, Options, Forfeitures and Expirations in Period, Weighted Average Exercise Price",
        "terseLabel": "Forfeited/Expired (in dollars per share)"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsForfeituresAndExpirationsInPeriodWeightedAverageExercisePrice",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationOptionActivityDetails"
     ],
     "xbrltype": "perShareItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodGross": {
     "auth_ref": [
      "r470"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Gross number of share options (or share units) granted during the period.",
        "label": "Share-Based Compensation Arrangement by Share-Based Payment Award, Options, Grants in Period, Gross",
        "terseLabel": "Granted (in shares)"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodGross",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationNarrativeDetails",
      "http://www.codexis.com/role/StockbasedCompensationOptionActivityDetails"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodWeightedAverageGrantDateFairValue": {
     "auth_ref": [
      "r480"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The weighted average grant-date fair value of options granted during the reporting period as calculated by applying the disclosed option pricing methodology.",
        "label": "Share-Based Compensation Arrangement by Share-Based Payment Award, Options, Grants in Period, Weighted Average Grant Date Fair Value",
        "terseLabel": "Weighted average grant date fair value (in dollars per share)"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodWeightedAverageGrantDateFairValue",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationNarrativeDetails"
     ],
     "xbrltype": "perShareItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingIntrinsicValue": {
     "auth_ref": [
      "r115"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount by which the current fair value of the underlying stock exceeds the exercise price of options outstanding.",
        "label": "Share-Based Compensation Arrangement by Share-Based Payment Award, Options, Outstanding, Intrinsic Value",
        "terseLabel": "Aggregate intrinsic value, outstanding"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingIntrinsicValue",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationOptionActivityDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingNumber": {
     "auth_ref": [
      "r466",
      "r467"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Number of options outstanding, including both vested and non-vested options.",
        "label": "Share-Based Compensation Arrangement by Share-Based Payment Award, Options, Outstanding, Number",
        "periodEndLabel": "Outstanding, end of period (in shares)",
        "periodStartLabel": "Outstanding, beginning of period (in shares)"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingNumber",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationOptionActivityDetails"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingRollForward": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "A roll forward is a reconciliation of a concept from the beginning of a period to the end of a period.",
        "label": "Share-Based Compensation Arrangement by Share-Based Payment Award, Options, Outstanding [Roll Forward]",
        "terseLabel": "Number of Shares"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingRollForward",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationOptionActivityDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingWeightedAverageExercisePrice": {
     "auth_ref": [
      "r466",
      "r467"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Weighted average price at which grantees can acquire the shares reserved for issuance under the stock option plan.",
        "label": "Share-Based Compensation Arrangement by Share-Based Payment Award, Options, Outstanding, Weighted Average Exercise Price",
        "periodEndLabel": "Outstanding, end of period (in dollars per share)",
        "periodStartLabel": "Outstanding, beginning of period (in dollars per share)"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingWeightedAverageExercisePrice",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationOptionActivityDetails"
     ],
     "xbrltype": "perShareItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingWeightedAverageExercisePriceRollforward": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Share-Based Compensation Arrangement by Share-Based Payment Award, Options, Outstanding, Weighted Average Exercise Price [Abstract]",
        "terseLabel": "Weighted Average Exercise Price Per Share"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsOutstandingWeightedAverageExercisePriceRollforward",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationOptionActivityDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsVestedAndExpectedToVestAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Share-Based Compensation Arrangement by Share-Based Payment Award, Options, Vested and Expected to Vest [Abstract]",
        "terseLabel": "Exercisable and Expected to Vest"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsVestedAndExpectedToVestAbstract",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationAwardActivityDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsVestedAndExpectedToVestOutstandingAggregateIntrinsicValue": {
     "auth_ref": [
      "r482"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount by which current fair value of underlying stock exceeds exercise price of fully vested and expected to vest options outstanding. Includes, but is not limited to, unvested options for which requisite service period has not been rendered but that are expected to vest based on achievement of performance condition, if forfeitures are recognized when they occur.",
        "label": "Share-Based Compensation Arrangement by Share-Based Payment Award, Options, Vested and Expected to Vest, Outstanding, Aggregate Intrinsic Value",
        "terseLabel": "Aggregate intrinsic value, options vested and expected to vest"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsVestedAndExpectedToVestOutstandingAggregateIntrinsicValue",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationAwardActivityDetails",
      "http://www.codexis.com/role/StockbasedCompensationOptionActivityDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsVestedAndExpectedToVestOutstandingNumber": {
     "auth_ref": [
      "r482"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Number of fully vested and expected to vest options outstanding that can be converted into shares under option plan. Includes, but is not limited to, unvested options for which requisite service period has not been rendered but that are expected to vest based on achievement of performance condition, if forfeitures are recognized when they occur.",
        "label": "Share-Based Compensation Arrangement by Share-Based Payment Award, Options, Vested and Expected to Vest, Outstanding, Number",
        "terseLabel": "Options vested and expected to vest (in shares)"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsVestedAndExpectedToVestOutstandingNumber",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationAwardActivityDetails",
      "http://www.codexis.com/role/StockbasedCompensationOptionActivityDetails"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsVestedAndExpectedToVestOutstandingWeightedAverageExercisePrice": {
     "auth_ref": [
      "r482"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Weighted-average exercise price, at which grantee can acquire shares reserved for issuance, for fully vested and expected to vest options outstanding. Includes, but is not limited to, unvested options for which requisite service period has not been rendered but that are expected to vest based on achievement of performance condition, if forfeitures are recognized when they occur.",
        "label": "Share-Based Compensation Arrangement by Share-Based Payment Award, Options, Vested and Expected to Vest, Outstanding, Weighted Average Exercise Price",
        "verboseLabel": "Options vested and expected to vest (in dollars per share)"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsVestedAndExpectedToVestOutstandingWeightedAverageExercisePrice",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationAwardActivityDetails",
      "http://www.codexis.com/role/StockbasedCompensationOptionActivityDetails"
     ],
     "xbrltype": "perShareItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain": {
     "auth_ref": [
      "r462",
      "r463",
      "r464",
      "r466",
      "r467",
      "r468",
      "r469",
      "r470",
      "r471",
      "r472",
      "r473",
      "r474",
      "r475",
      "r476",
      "r477",
      "r478",
      "r479",
      "r480",
      "r481",
      "r482",
      "r483",
      "r486",
      "r487",
      "r488",
      "r489",
      "r490"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Award under share-based payment arrangement.",
        "label": "Award Type [Domain]",
        "terseLabel": "Equity Award [Domain]"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationAssumptionsUsedDetails",
      "http://www.codexis.com/role/StockbasedCompensationAwardActivityDetails",
      "http://www.codexis.com/role/StockbasedCompensationNarrativeDetails",
      "http://www.codexis.com/role/StockbasedCompensationStockBasedCompensationExpenseDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardOptionsExercisesInPeriodWeightedAverageExercisePrice": {
     "auth_ref": [
      "r471"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Weighted average price at which option holders acquired shares when converting their stock options into shares.",
        "label": "Share-Based Compensation Arrangements by Share-Based Payment Award, Options, Exercises in Period, Weighted Average Exercise Price",
        "terseLabel": "Exercised (in dollars per share)"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementsByShareBasedPaymentAwardOptionsExercisesInPeriodWeightedAverageExercisePrice",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationOptionActivityDetails"
     ],
     "xbrltype": "perShareItemType"
    },
    "us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardOptionsGrantsInPeriodWeightedAverageExercisePrice": {
     "auth_ref": [
      "r470"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Weighted average per share amount at which grantees can acquire shares of common stock by exercise of options.",
        "label": "Share-Based Compensation Arrangements by Share-Based Payment Award, Options, Grants in Period, Weighted Average Exercise Price",
        "terseLabel": "Granted (in dollars per share)"
       }
      }
     },
     "localname": "ShareBasedCompensationArrangementsByShareBasedPaymentAwardOptionsGrantsInPeriodWeightedAverageExercisePrice",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationOptionActivityDetails"
     ],
     "xbrltype": "perShareItemType"
    },
    "us-gaap_ShareBasedCompensationAwardTrancheOneMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "First portion of award under share-based payment arrangement differentiated by vesting feature, including, but not limited to, performance measure or service period.",
        "label": "Share-Based Payment Arrangement, Tranche One [Member]",
        "terseLabel": "Tranche One"
       }
      }
     },
     "localname": "ShareBasedCompensationAwardTrancheOneMember",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationNarrativeDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_ShareBasedCompensationAwardTrancheTwoMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Second portion of award under share-based payment arrangement differentiated by vesting feature, including, but not limited to, performance measure or service period.",
        "label": "Share-Based Payment Arrangement, Tranche Two [Member]",
        "terseLabel": "Tranche Two"
       }
      }
     },
     "localname": "ShareBasedCompensationAwardTrancheTwoMember",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationNarrativeDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_ShareBasedCompensationOptionAndIncentivePlansPolicy": {
     "auth_ref": [
      "r465",
      "r484",
      "r485",
      "r486",
      "r487",
      "r490",
      "r499",
      "r500"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Disclosure of accounting policy for award under share-based payment arrangement. Includes, but is not limited to, methodology and assumption used in measuring cost.",
        "label": "Share-Based Payment Arrangement [Policy Text Block]",
        "verboseLabel": "Stock-Based Compensation"
       }
      }
     },
     "localname": "ShareBasedCompensationOptionAndIncentivePlansPolicy",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesPolicies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ShareBasedCompensationPerformanceSharesAwardOutstandingActivityTableTextBlock": {
     "auth_ref": [
      "r107"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Tabular disclosure of the number and weighted-average grant date fair value for outstanding performance shares.",
        "label": "Share-Based Payment Arrangement, Performance Shares, Outstanding Activity [Table Text Block]",
        "terseLabel": "Share-based Compensation, Performance Shares Award Outstanding Activity"
       }
      }
     },
     "localname": "ShareBasedCompensationPerformanceSharesAwardOutstandingActivityTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ShareBasedPaymentArrangementEmployeeMember": {
     "auth_ref": [
      "r460",
      "r462",
      "r463",
      "r464",
      "r466",
      "r467",
      "r468",
      "r469",
      "r470",
      "r471",
      "r472",
      "r473",
      "r474",
      "r475",
      "r476",
      "r477",
      "r478",
      "r479",
      "r480",
      "r481",
      "r482",
      "r483",
      "r486",
      "r487",
      "r488",
      "r489",
      "r490"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Recipient, of award granted under share-based payment arrangement, over whom grantor exercises or has right to exercise sufficient control to establish employer-employee relationship based on law of pertinent jurisdiction. Includes, but is not limited to, nonemployee director treated as employee when acting as member of board of directors, if elected by grantor's shareholders or appointed to board position to be filled by shareholder election when existing term expires.",
        "label": "Share-Based Payment Arrangement, Employee [Member]",
        "terseLabel": "Employee"
       }
      }
     },
     "localname": "ShareBasedPaymentArrangementEmployeeMember",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofStockholdersEquity"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_ShareBasedPaymentArrangementNonemployeeMember": {
     "auth_ref": [
      "r458",
      "r462",
      "r463",
      "r464",
      "r466",
      "r467",
      "r468",
      "r469",
      "r470",
      "r471",
      "r472",
      "r473",
      "r474",
      "r475",
      "r476",
      "r477",
      "r478",
      "r479",
      "r480",
      "r481",
      "r482",
      "r483",
      "r486",
      "r487",
      "r488",
      "r489",
      "r490"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Recipient, of award granted under share-based payment arrangement, over whom grantor does not exercise nor has right to exercise sufficient control to establish employer-employee relationship based on law of pertinent jurisdiction. Excludes nonemployee director treated as employee when acting as member of board of directors, if elected by grantor's shareholders or appointed to board position to be filled by shareholder election when existing term expires.",
        "label": "Share-Based Payment Arrangement, Nonemployee [Member]",
        "terseLabel": "Nonemployee Awards",
        "verboseLabel": "Nonemployee"
       }
      }
     },
     "localname": "ShareBasedPaymentArrangementNonemployeeMember",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofStockholdersEquity",
      "http://www.codexis.com/role/StockbasedCompensationAssumptionsUsedDetails",
      "http://www.codexis.com/role/StockbasedCompensationNarrativeDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardAwardVestingRightsPercentage": {
     "auth_ref": [
      "r766"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Percentage of vesting of award under share-based payment arrangement.",
        "label": "Share-Based Compensation Arrangement by Share-Based Payment Award, Award Vesting Rights, Percentage",
        "terseLabel": "Award vesting rights percentage"
       }
      }
     },
     "localname": "SharebasedCompensationArrangementBySharebasedPaymentAwardAwardVestingRightsPercentage",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationNarrativeDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardEquityInstrumentsOtherThanOptionsAggregateIntrinsicValueVested": {
     "auth_ref": [],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Intrinsic value of vested award under share-based payment arrangement. Excludes share and unit options.",
        "label": "Share-Based Compensation Arrangement by Share-Based Payment Award, Equity Instruments Other than Options, Aggregate Intrinsic Value, Vested",
        "terseLabel": "Equity instruments other than options, aggregate intrinsic value, vested"
       }
      }
     },
     "localname": "SharebasedCompensationArrangementBySharebasedPaymentAwardEquityInstrumentsOtherThanOptionsAggregateIntrinsicValueVested",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationNarrativeDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardExpirationPeriod": {
     "auth_ref": [
      "r691"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Period from grant date that an equity-based award expires, in 'PnYnMnDTnHnMnS' format, for example, 'P1Y5M13D' represents the reported fact of one year, five months, and thirteen days.",
        "label": "Share-Based Compensation Arrangement by Share-Based Payment Award, Expiration Period",
        "terseLabel": "Expiration period"
       }
      }
     },
     "localname": "SharebasedCompensationArrangementBySharebasedPaymentAwardExpirationPeriod",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationNarrativeDetails"
     ],
     "xbrltype": "durationItemType"
    },
    "us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardFairValueAssumptionsExpectedTerm1": {
     "auth_ref": [
      "r486"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Expected term of award under share-based payment arrangement, in 'PnYnMnDTnHnMnS' format, for example, 'P1Y5M13D' represents reported fact of one year, five months, and thirteen days.",
        "label": "Share-Based Compensation Arrangement by Share-Based Payment Award, Fair Value Assumptions, Expected Term",
        "terseLabel": "Expected life (years)"
       }
      }
     },
     "localname": "SharebasedCompensationArrangementBySharebasedPaymentAwardFairValueAssumptionsExpectedTerm1",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationAssumptionsUsedDetails"
     ],
     "xbrltype": "durationItemType"
    },
    "us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsExercisableIntrinsicValue1": {
     "auth_ref": [
      "r115"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of difference between fair value of the underlying shares reserved for issuance and exercise price of vested portions of options outstanding and currently exercisable.",
        "label": "Share-Based Compensation Arrangement by Share-Based Payment Award, Options, Exercisable, Intrinsic Value",
        "terseLabel": "Aggregate intrinsic value, exercisable options"
       }
      }
     },
     "localname": "SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsExercisableIntrinsicValue1",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationAwardActivityDetails",
      "http://www.codexis.com/role/StockbasedCompensationOptionActivityDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsExercisableWeightedAverageRemainingContractualTerm1": {
     "auth_ref": [
      "r115"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Weighted average remaining contractual term for vested portions of options outstanding and currently exercisable or convertible, in 'PnYnMnDTnHnMnS' format, for example, 'P1Y5M13D' represents the reported fact of one year, five months, and thirteen days.",
        "label": "Share-Based Compensation Arrangement by Share-Based Payment Award, Options, Exercisable, Weighted Average Remaining Contractual Term",
        "terseLabel": "Weighted average remaining contractual terms, exercisable options"
       }
      }
     },
     "localname": "SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsExercisableWeightedAverageRemainingContractualTerm1",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationAwardActivityDetails",
      "http://www.codexis.com/role/StockbasedCompensationOptionActivityDetails"
     ],
     "xbrltype": "durationItemType"
    },
    "us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsOutstandingWeightedAverageRemainingContractualTerm2": {
     "auth_ref": [
      "r112"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Weighted average remaining contractual term for option awards outstanding, in 'PnYnMnDTnHnMnS' format, for example, 'P1Y5M13D' represents the reported fact of one year, five months, and thirteen days.",
        "label": "Share-Based Compensation Arrangement by Share-Based Payment Award, Options, Outstanding, Weighted Average Remaining Contractual Term",
        "terseLabel": "Weighted average remaining contractual terms"
       }
      }
     },
     "localname": "SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsOutstandingWeightedAverageRemainingContractualTerm2",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationOptionActivityDetails"
     ],
     "xbrltype": "durationItemType"
    },
    "us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsVestedAndExpectedToVestOutstandingWeightedAverageRemainingContractualTerm1": {
     "auth_ref": [
      "r482"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Weighted average remaining contractual term for fully vested and expected to vest options outstanding, in 'PnYnMnDTnHnMnS' format, for example, 'P1Y5M13D' represents reported fact of one year, five months, and thirteen days. Includes, but is not limited to, unvested options for which requisite service period has not been rendered but that are expected to vest based on achievement of performance condition, if forfeitures are recognized when they occur.",
        "label": "Share-Based Compensation Arrangement by Share-Based Payment Award, Options, Vested and Expected to Vest, Outstanding, Weighted Average Remaining Contractual Term",
        "terseLabel": "Weighted average remaining contractual terms, vested and expected to vest options"
       }
      }
     },
     "localname": "SharebasedCompensationArrangementBySharebasedPaymentAwardOptionsVestedAndExpectedToVestOutstandingWeightedAverageRemainingContractualTerm1",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationAwardActivityDetails",
      "http://www.codexis.com/role/StockbasedCompensationOptionActivityDetails"
     ],
     "xbrltype": "durationItemType"
    },
    "us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardPurchasePriceOfCommonStockPercent": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Purchase price of common stock expressed as a percentage of its fair value.",
        "label": "Share-Based Compensation Arrangement by Share-Based Payment Award, Purchase Price of Common Stock, Percent",
        "terseLabel": "Option price as a percent of common stock"
       }
      }
     },
     "localname": "SharebasedCompensationArrangementBySharebasedPaymentAwardPurchasePriceOfCommonStockPercent",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationNarrativeDetails"
     ],
     "xbrltype": "percentItemType"
    },
    "us-gaap_SharesOutstanding": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Number of shares issued which are neither cancelled nor held in the treasury.",
        "label": "Shares, Outstanding",
        "periodEndLabel": "Balance at end of period (in shares)",
        "periodStartLabel": "Balance at beginning of period (in shares)"
       }
      }
     },
     "localname": "SharesOutstanding",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofStockholdersEquity"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_SharesPaidForTaxWithholdingForShareBasedCompensation": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Number of shares used to settle grantee's tax withholding obligation for award under share-based payment arrangement.",
        "label": "Share-Based Payment Arrangement, Shares Withheld for Tax Withholding Obligation",
        "negatedLabel": "Taxes paid related to net share settlement of equity awards (in shares)"
       }
      }
     },
     "localname": "SharesPaidForTaxWithholdingForShareBasedCompensation",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofStockholdersEquity"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_ShortTermLeaseCost": {
     "auth_ref": [
      "r570",
      "r694"
     ],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsandContingenciesLeaseCostsDetails": {
       "order": 4.0,
       "parentTag": "us-gaap_LeaseCost",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of short-term lease cost, excluding expense for lease with term of one month or less.",
        "label": "Short-Term Lease, Cost",
        "terseLabel": "Short-term lease costs"
       }
      }
     },
     "localname": "ShortTermLeaseCost",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesLeaseCostsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_StateAndLocalJurisdictionMember": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Designated tax department of a state or local government entitled to levy and collect income taxes from the entity.",
        "label": "State and Local Jurisdiction [Member]",
        "terseLabel": "State"
       }
      }
     },
     "localname": "StateAndLocalJurisdictionMember",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesNOLCarryforwardsandFederalResearchandDevelopmentTaxCreditsDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_StatementBusinessSegmentsAxis": {
     "auth_ref": [
      "r182",
      "r263",
      "r266",
      "r267",
      "r268",
      "r269",
      "r270",
      "r271",
      "r272",
      "r273",
      "r274",
      "r275",
      "r276",
      "r277",
      "r285",
      "r286",
      "r287",
      "r288",
      "r289",
      "r290",
      "r291",
      "r292",
      "r293",
      "r295",
      "r301",
      "r333",
      "r334",
      "r335",
      "r336",
      "r337",
      "r338",
      "r339",
      "r340",
      "r341",
      "r345",
      "r352",
      "r357",
      "r666",
      "r823"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Information by business segments.",
        "label": "Segments [Axis]",
        "terseLabel": "Segments [Axis]"
       }
      }
     },
     "localname": "StatementBusinessSegmentsAxis",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesNarrativeDetails",
      "http://www.codexis.com/role/RevenueRecognitionDisaggregationofRevenueDetails",
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationGoodwillDetails",
      "http://www.codexis.com/role/SegmentGeographicalandOtherRevenueInformationSegmentReportingDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_StatementClassOfStockAxis": {
     "auth_ref": [
      "r193",
      "r194",
      "r195",
      "r218",
      "r241",
      "r242",
      "r244",
      "r246",
      "r254",
      "r255",
      "r313",
      "r367",
      "r370",
      "r371",
      "r372",
      "r378",
      "r379",
      "r391",
      "r392",
      "r395",
      "r399",
      "r406",
      "r552",
      "r649",
      "r709",
      "r724",
      "r732"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Information by the different classes of stock of the entity.",
        "label": "Class of Stock [Axis]",
        "terseLabel": "Class of Stock [Axis]"
       }
      }
     },
     "localname": "StatementClassOfStockAxis",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsMolecularAssociatesIncDetails",
      "http://www.codexis.com/role/InvestmentsinNonMarketableSecuritiesNarrativeDetails",
      "http://www.codexis.com/role/RelatedPartyTransactionsDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_StatementEquityComponentsAxis": {
     "auth_ref": [
      "r25",
      "r98",
      "r181",
      "r206",
      "r207",
      "r208",
      "r225",
      "r226",
      "r227",
      "r229",
      "r235",
      "r237",
      "r253",
      "r314",
      "r407",
      "r496",
      "r497",
      "r498",
      "r525",
      "r526",
      "r546",
      "r553",
      "r554",
      "r555",
      "r556",
      "r557",
      "r558",
      "r578",
      "r618",
      "r619",
      "r620"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Information by component of equity.",
        "label": "Equity Components [Axis]",
        "terseLabel": "Equity Components [Axis]"
       }
      }
     },
     "localname": "StatementEquityComponentsAxis",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofStockholdersEquity"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_StatementLineItems": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table.",
        "label": "Statement [Line Items]",
        "terseLabel": "Statement [Line Items]"
       }
      }
     },
     "localname": "StatementLineItems",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedBalanceSheetsParenthetical",
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlowsParenthetical",
      "http://www.codexis.com/role/ConsolidatedStatementsofOperations",
      "http://www.codexis.com/role/ConsolidatedStatementsofOperationsParenthetical",
      "http://www.codexis.com/role/ConsolidatedStatementsofStockholdersEquity"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_StatementOfCashFlowsAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Statement of Cash Flows [Abstract]",
        "terseLabel": "Statement of Cash Flows [Abstract]"
       }
      }
     },
     "localname": "StatementOfCashFlowsAbstract",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "xbrltype": "stringItemType"
    },
    "us-gaap_StatementOfFinancialPositionAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Statement of Financial Position [Abstract]",
        "terseLabel": "Statement of Financial Position [Abstract]"
       }
      }
     },
     "localname": "StatementOfFinancialPositionAbstract",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "xbrltype": "stringItemType"
    },
    "us-gaap_StatementOfStockholdersEquityAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Statement of Stockholders' Equity [Abstract]",
        "terseLabel": "Statement of Stockholders' Equity [Abstract]"
       }
      }
     },
     "localname": "StatementOfStockholdersEquityAbstract",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "xbrltype": "stringItemType"
    },
    "us-gaap_StatementTable": {
     "auth_ref": [
      "r225",
      "r226",
      "r227",
      "r253",
      "r595"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Schedule reflecting a Statement of Income, Statement of Cash Flows, Statement of Financial Position, Statement of Shareholders' Equity and Other Comprehensive Income, or other statement as needed.",
        "label": "Statement [Table]",
        "terseLabel": "Statement [Table]"
       }
      }
     },
     "localname": "StatementTable",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedBalanceSheetsParenthetical",
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlowsParenthetical",
      "http://www.codexis.com/role/ConsolidatedStatementsofOperations",
      "http://www.codexis.com/role/ConsolidatedStatementsofOperationsParenthetical",
      "http://www.codexis.com/role/ConsolidatedStatementsofStockholdersEquity"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_StockCompensationPlanMember": {
     "auth_ref": [
      "r733"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Share-based payment arrangement in which award of equity shares are granted. Arrangement includes, but is not limited to, grantor incurring liability for product and service based on price of its shares.",
        "label": "Share-Based Payment Arrangement [Member]",
        "terseLabel": "Shares issuable under the Equity Incentive Plan"
       }
      }
     },
     "localname": "StockCompensationPlanMember",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/NetLossperShareDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_StockIssuedDuringPeriodSharesNewIssues": {
     "auth_ref": [
      "r5",
      "r6",
      "r98",
      "r105"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Number of new stock issued during the period.",
        "label": "Stock Issued During Period, Shares, New Issues",
        "terseLabel": "Issuance of common stock, net of issuance costs (in shares)"
       }
      }
     },
     "localname": "StockIssuedDuringPeriodSharesNewIssues",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CapitalStockDetails",
      "http://www.codexis.com/role/ConsolidatedStatementsofStockholdersEquity"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_StockIssuedDuringPeriodSharesOther": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Number of shares of stock issued attributable to transactions classified as other.",
        "label": "Stock Issued During Period, Shares, Other",
        "terseLabel": "Release of stock awards (in shares)"
       }
      }
     },
     "localname": "StockIssuedDuringPeriodSharesOther",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofStockholdersEquity"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_StockIssuedDuringPeriodSharesStockOptionsExercised": {
     "auth_ref": [
      "r5",
      "r6",
      "r98",
      "r105",
      "r471"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Number of share options (or share units) exercised during the current period.",
        "label": "Share-Based Compensation Arrangement by Share-Based Payment Award, Options, Exercises in Period",
        "negatedLabel": "Exercised (in shares)",
        "terseLabel": "Exercise of stock options (in shares)"
       }
      }
     },
     "localname": "StockIssuedDuringPeriodSharesStockOptionsExercised",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofStockholdersEquity",
      "http://www.codexis.com/role/StockbasedCompensationOptionActivityDetails"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_StockIssuedDuringPeriodValueNewIssues": {
     "auth_ref": [
      "r5",
      "r6",
      "r98",
      "r105"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Equity impact of the value of new stock issued during the period. Includes shares issued in an initial public offering or a secondary public offering.",
        "label": "Stock Issued During Period, Value, New Issues",
        "terseLabel": "Issuance of common stock, net of issuance costs"
       }
      }
     },
     "localname": "StockIssuedDuringPeriodValueNewIssues",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofStockholdersEquity"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_StockIssuedDuringPeriodValueStockOptionsExercised": {
     "auth_ref": [
      "r25",
      "r98",
      "r105"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Value of stock issued as a result of the exercise of stock options.",
        "label": "Stock Issued During Period, Value, Stock Options Exercised",
        "terseLabel": "Exercise of stock options"
       }
      }
     },
     "localname": "StockIssuedDuringPeriodValueStockOptionsExercised",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofStockholdersEquity"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_StockholdersEquity": {
     "auth_ref": [
      "r6",
      "r9",
      "r10",
      "r76",
      "r695",
      "r725",
      "r741",
      "r803"
     ],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedBalanceSheets": {
       "order": 3.0,
       "parentTag": "us-gaap_LiabilitiesAndStockholdersEquity",
       "weight": 1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Total of all stockholders' equity (deficit) items, net of receivables from officers, directors, owners, and affiliates of the entity which are attributable to the parent. The amount of the economic entity's stockholders' equity attributable to the parent excludes the amount of stockholders' equity which is allocable to that ownership interest in subsidiary equity which is not attributable to the parent (noncontrolling interest, minority interest). This excludes temporary equity and is sometimes called permanent equity.",
        "label": "Stockholders' Equity Attributable to Parent",
        "periodEndLabel": "Balance at end of period",
        "periodStartLabel": "Balance at beginning of period",
        "totalLabel": "Total stockholders\u2019 equity"
       }
      }
     },
     "localname": "StockholdersEquity",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedBalanceSheets",
      "http://www.codexis.com/role/ConsolidatedStatementsofStockholdersEquity"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_StockholdersEquityAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Stockholders' Equity Attributable to Parent [Abstract]",
        "verboseLabel": "Stockholders\u2019 equity:"
       }
      }
     },
     "localname": "StockholdersEquityAbstract",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedBalanceSheets"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_StockholdersEquityNoteDisclosureTextBlock": {
     "auth_ref": [
      "r106",
      "r217",
      "r392",
      "r394",
      "r395",
      "r396",
      "r397",
      "r398",
      "r399",
      "r400",
      "r401",
      "r402",
      "r403",
      "r405",
      "r407",
      "r545"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The entire disclosure for shareholders' equity comprised of portions attributable to the parent entity and noncontrolling interest, including other comprehensive income. Includes, but is not limited to, balances of common stock, preferred stock, additional paid-in capital, other capital and retained earnings, accumulated balance for each classification of other comprehensive income and amount of comprehensive income.",
        "label": "Stockholders' Equity Note Disclosure [Text Block]",
        "terseLabel": "Capital Stock"
       }
      }
     },
     "localname": "StockholdersEquityNoteDisclosureTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CapitalStock"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_SubleaseIncome": {
     "auth_ref": [
      "r571",
      "r694"
     ],
     "calculation": {
      "http://www.codexis.com/role/CommitmentsandContingenciesLeaseCostsDetails": {
       "order": 5.0,
       "parentTag": "us-gaap_LeaseCost",
       "weight": -1.0
      }
     },
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of sublease income excluding finance and operating lease expense.",
        "label": "Sublease Income",
        "negatedLabel": "Sublease income"
       }
      }
     },
     "localname": "SubleaseIncome",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesLeaseCostsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_SubsequentEventMember": {
     "auth_ref": [
      "r559",
      "r586"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Identifies event that occurred after the balance sheet date but before financial statements are issued or available to be issued.",
        "label": "Subsequent Event [Member]",
        "terseLabel": "Subsequent Event"
       }
      }
     },
     "localname": "SubsequentEventMember",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsPfizerEnzymeSupplyAgreementDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_SubsequentEventTypeAxis": {
     "auth_ref": [
      "r559",
      "r586"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Information by event that occurred after the balance sheet date but before financial statements are issued or available to be issued.",
        "label": "Subsequent Event Type [Axis]",
        "terseLabel": "Subsequent Event Type [Axis]"
       }
      }
     },
     "localname": "SubsequentEventTypeAxis",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsPfizerEnzymeSupplyAgreementDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_SubsequentEventTypeDomain": {
     "auth_ref": [
      "r559",
      "r586"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Event that occurred after the balance sheet date but before financial statements are issued or available to be issued.",
        "label": "Subsequent Event Type [Domain]",
        "terseLabel": "Subsequent Event Type [Domain]"
       }
      }
     },
     "localname": "SubsequentEventTypeDomain",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsPfizerEnzymeSupplyAgreementDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_SubsequentEventsAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Subsequent Events [Abstract]",
        "terseLabel": "Subsequent Events [Abstract]"
       }
      }
     },
     "localname": "SubsequentEventsAbstract",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "xbrltype": "stringItemType"
    },
    "us-gaap_SubsequentEventsTextBlock": {
     "auth_ref": [
      "r585",
      "r587"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The entire disclosure for significant events or transactions that occurred after the balance sheet date through the date the financial statements were issued or the date the financial statements were available to be issued. Examples include: the sale of a capital stock issue, purchase of a business, settlement of litigation, catastrophic loss, significant foreign exchange rate changes, loans to insiders or affiliates, and transactions not in the ordinary course of business.",
        "label": "Subsequent Events [Text Block]",
        "terseLabel": "Subsequent Events"
       }
      }
     },
     "localname": "SubsequentEventsTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/SubsequentEvents"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_SubsidiarySaleOfStockAxis": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Information by type of sale of the entity's stock.",
        "label": "Sale of Stock [Axis]",
        "terseLabel": "Sale of Stock [Axis]"
       }
      }
     },
     "localname": "SubsidiarySaleOfStockAxis",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CapitalStockDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_SummaryOfOperatingLossCarryforwardsTextBlock": {
     "auth_ref": [
      "r130"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Tabular disclosure of pertinent information, such as tax authority, amounts, and expiration dates, of net operating loss carryforwards, including an assessment of the likelihood of utilization.",
        "label": "Summary of Operating Loss Carryforwards [Table Text Block]",
        "terseLabel": "Summary of Federal, State and Foreign NOL Carryforwards and Federal Research and Development Tax Credits"
       }
      }
     },
     "localname": "SummaryOfOperatingLossCarryforwardsTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_SupplementalBalanceSheetDisclosuresTextBlock": {
     "auth_ref": [
      "r721"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The entire disclosure for supplemental balance sheet disclosures, including descriptions and amounts for assets, liabilities, and equity.",
        "label": "Supplemental Balance Sheet Disclosures [Text Block]",
        "terseLabel": "Balance Sheet Details"
       }
      }
     },
     "localname": "SupplementalBalanceSheetDisclosuresTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BalanceSheetDetails"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_SupplementalCashFlowInformationAbstract": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "label": "Supplemental Cash Flow Information [Abstract]",
        "terseLabel": "Supplemental disclosure of cash flow information:"
       }
      }
     },
     "localname": "SupplementalCashFlowInformationAbstract",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofCashFlows"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_SupplyCommitmentTableTextBlock": {
     "auth_ref": [
      "r2"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Tabular disclosure of arrangements in which the entity has committed resources to supply goods or services to a customer. May include identification of the goods or services to be furnished, identity of the purchasing party, pricing, effects on pricing for failing to deliver the [minimum] quantities required to be furnished, cancellation rights, and termination provisions.",
        "label": "Supply Commitment [Table Text Block]",
        "terseLabel": "Schedule of Supply Commitment"
       }
      }
     },
     "localname": "SupplyCommitmentTableTextBlock",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesTables"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_TaxCreditCarryforwardAmount": {
     "auth_ref": [
      "r129"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The amount of the tax credit carryforward, before tax effects, available to reduce future taxable income under enacted tax laws.",
        "label": "Tax Credit Carryforward, Amount",
        "terseLabel": "Tax credits, amount"
       }
      }
     },
     "localname": "TaxCreditCarryforwardAmount",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesNOLCarryforwardsandFederalResearchandDevelopmentTaxCreditsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_TradeAndOtherAccountsReceivableUnbilledReceivablesPolicy": {
     "auth_ref": [
      "r307"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Disclosure of accounting policy for treatment of receivables that are billable but have not been billed as of the balance sheet date.",
        "label": "Trade and Other Accounts Receivable, Unbilled Receivables, Policy [Policy Text Block]",
        "terseLabel": "Unbilled Receivable"
       }
      }
     },
     "localname": "TradeAndOtherAccountsReceivableUnbilledReceivablesPolicy",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesPolicies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_TypeOfArrangementAxis": {
     "auth_ref": [
      "r801"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Information by collaborative arrangement and arrangement other than collaborative applicable to revenue-generating activity or operations.",
        "label": "Collaborative Arrangement and Arrangement Other than Collaborative [Axis]",
        "terseLabel": "Type of Arrangement and Non-arrangement Transactions [Axis]"
       }
      }
     },
     "localname": "TypeOfArrangementAxis",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CollaborativeArrangementsEnzymeSupplyAgreementDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsMerckPlatformTechnologyTransferandLicenseAgreementDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsMerckSitagliptinCatalystSupplyAgreementDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsNestleGlobalDevelopmentAgreementDetails",
      "http://www.codexis.com/role/CollaborativeArrangementsTateLyleDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_TypeOfRestructuringDomain": {
     "auth_ref": [
      "r349",
      "r350",
      "r355",
      "r356"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Identification of the types of restructuring costs.",
        "label": "Type of Restructuring [Domain]",
        "terseLabel": "Type of Restructuring [Domain]"
       }
      }
     },
     "localname": "TypeOfRestructuringDomain",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/RestructuringChargesDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_UnbilledReceivablesCurrent": {
     "auth_ref": [],
     "calculation": {
      "http://www.codexis.com/role/ConsolidatedBalanceSheets": {
       "order": 3.0,
       "parentTag": "us-gaap_NotesReceivableGross",
       "weight": 1.0
      }
     },
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount received for services rendered and products shipped, but not yet billed, for non-contractual agreements due within one year or the normal operating cycle, if longer.",
        "label": "Unbilled Receivables, Current",
        "terseLabel": "Unbilled receivables"
       }
      }
     },
     "localname": "UnbilledReceivablesCurrent",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedBalanceSheets",
      "http://www.codexis.com/role/RevenueRecognitionContractswithCustomerDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_UnrecognizedTaxBenefits": {
     "auth_ref": [
      "r503",
      "r510"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of unrecognized tax benefits.",
        "label": "Unrecognized Tax Benefits",
        "periodEndLabel": "Balance at end of year",
        "periodStartLabel": "Balance at beginning of year"
       }
      }
     },
     "localname": "UnrecognizedTaxBenefits",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesReconciliationofUnrecognizedTaxBenefitsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_UnrecognizedTaxBenefitsDecreasesResultingFromPriorPeriodTaxPositions": {
     "auth_ref": [
      "r511"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of decrease in unrecognized tax benefits resulting from tax positions taken in prior period tax returns.",
        "label": "Unrecognized Tax Benefits, Decrease Resulting from Prior Period Tax Positions",
        "negatedTerseLabel": "Reductions to tax position of prior years"
       }
      }
     },
     "localname": "UnrecognizedTaxBenefitsDecreasesResultingFromPriorPeriodTaxPositions",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesReconciliationofUnrecognizedTaxBenefitsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_UnrecognizedTaxBenefitsIncomeTaxPenaltiesAndInterestAccrued": {
     "auth_ref": [
      "r509"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount accrued for interest on an underpayment of income taxes and penalties related to a tax position claimed or expected to be claimed in the tax return.",
        "label": "Unrecognized Tax Benefits, Income Tax Penalties and Interest Accrued",
        "terseLabel": "Interest and penalties recognized on the balance sheet"
       }
      }
     },
     "localname": "UnrecognizedTaxBenefitsIncomeTaxPenaltiesAndInterestAccrued",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesNarrativeDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_UnrecognizedTaxBenefitsIncomeTaxPenaltiesAndInterestExpense": {
     "auth_ref": [
      "r509"
     ],
     "crdr": "debit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of expense for interest on an underpayment of income taxes and penalties related to a tax position claimed or expected to be claimed in the tax return.",
        "label": "Unrecognized Tax Benefits, Income Tax Penalties and Interest Expense",
        "terseLabel": "Interest and penalties recognize in income tax expense"
       }
      }
     },
     "localname": "UnrecognizedTaxBenefitsIncomeTaxPenaltiesAndInterestExpense",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesNarrativeDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_UnrecognizedTaxBenefitsIncreasesResultingFromCurrentPeriodTaxPositions": {
     "auth_ref": [
      "r512"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of increase in unrecognized tax benefits resulting from tax positions that have been or will be taken in current period tax return.",
        "label": "Unrecognized Tax Benefits, Increase Resulting from Current Period Tax Positions",
        "terseLabel": "Additions based on tax positions related to current year"
       }
      }
     },
     "localname": "UnrecognizedTaxBenefitsIncreasesResultingFromCurrentPeriodTaxPositions",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesReconciliationofUnrecognizedTaxBenefitsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_UnrecognizedTaxBenefitsIncreasesResultingFromPriorPeriodTaxPositions": {
     "auth_ref": [
      "r511"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of increase in unrecognized tax benefits resulting from tax positions taken in prior period tax returns.",
        "label": "Unrecognized Tax Benefits, Increase Resulting from Prior Period Tax Positions",
        "terseLabel": "Additions to tax position of prior years"
       }
      }
     },
     "localname": "UnrecognizedTaxBenefitsIncreasesResultingFromPriorPeriodTaxPositions",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesReconciliationofUnrecognizedTaxBenefitsDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_UnrecognizedTaxBenefitsThatWouldImpactEffectiveTaxRate": {
     "auth_ref": [
      "r513"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The total amount of unrecognized tax benefits that, if recognized, would affect the effective tax rate.",
        "label": "Unrecognized Tax Benefits that Would Impact Effective Tax Rate",
        "terseLabel": "Unrecognized tax benefits that would impact effective tax rate"
       }
      }
     },
     "localname": "UnrecognizedTaxBenefitsThatWouldImpactEffectiveTaxRate",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesNarrativeDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_UseOfEstimates": {
     "auth_ref": [
      "r61",
      "r62",
      "r63",
      "r257",
      "r258",
      "r260",
      "r261"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Disclosure of accounting policy for the use of estimates in the preparation of financial statements in conformity with generally accepted accounting principles.",
        "label": "Use of Estimates, Policy [Policy Text Block]",
        "verboseLabel": "Use of Estimates"
       }
      }
     },
     "localname": "UseOfEstimates",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/BasisofPresentationandSummaryofSignificantAccountingPoliciesPolicies"
     ],
     "xbrltype": "textBlockItemType"
    },
    "us-gaap_ValuationAllowanceDeferredTaxAssetChangeInAmount": {
     "auth_ref": [
      "r519"
     ],
     "crdr": "credit",
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Amount of increase (decrease) in the valuation allowance for a specified deferred tax asset.",
        "label": "Valuation Allowance, Deferred Tax Asset, Increase (Decrease), Amount",
        "terseLabel": "Increase in deferred tax asset valuation allowance"
       }
      }
     },
     "localname": "ValuationAllowanceDeferredTaxAssetChangeInAmount",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesNarrativeDetails"
     ],
     "xbrltype": "monetaryItemType"
    },
    "us-gaap_ValuationAllowanceLineItems": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table.",
        "label": "Valuation Allowance [Line Items]",
        "terseLabel": "Income Taxes [Line Items]"
       }
      }
     },
     "localname": "ValuationAllowanceLineItems",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesNarrativeDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_ValuationAllowanceTable": {
     "auth_ref": [
      "r127"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "A listing of an entity's valuation allowances to reduce deferred tax assets to amounts which it is more likely than not will not be realized, including a description of the deferred tax assets for which the valuation allowance has been recorded and the amount of the valuation allowance.",
        "label": "Valuation Allowance [Table]",
        "terseLabel": "Income Taxes [Table]"
       }
      }
     },
     "localname": "ValuationAllowanceTable",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/IncomeTaxesNarrativeDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_VariableRateAxis": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Information by type of variable rate.",
        "label": "Variable Rate [Axis]",
        "terseLabel": "Variable Rate [Axis]"
       }
      }
     },
     "localname": "VariableRateAxis",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesNarrativeDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_VariableRateDomain": {
     "auth_ref": [],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Interest rate that fluctuates over time as a result of an underlying benchmark interest rate or index.",
        "label": "Variable Rate [Domain]",
        "terseLabel": "Variable Rate [Domain]"
       }
      }
     },
     "localname": "VariableRateDomain",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/CommitmentsandContingenciesNarrativeDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_VestingAxis": {
     "auth_ref": [
      "r766",
      "r767",
      "r768",
      "r769",
      "r770",
      "r771",
      "r772",
      "r773",
      "r774",
      "r775",
      "r776",
      "r777",
      "r778",
      "r779",
      "r780",
      "r781",
      "r782",
      "r783",
      "r784",
      "r785",
      "r786",
      "r787",
      "r788",
      "r789",
      "r790",
      "r791"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Information by vesting schedule of award under share-based payment arrangement.",
        "label": "Vesting [Axis]",
        "terseLabel": "Vesting [Axis]"
       }
      }
     },
     "localname": "VestingAxis",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationNarrativeDetails"
     ],
     "xbrltype": "stringItemType"
    },
    "us-gaap_VestingDomain": {
     "auth_ref": [
      "r766",
      "r767",
      "r768",
      "r769",
      "r770",
      "r771",
      "r772",
      "r773",
      "r774",
      "r775",
      "r776",
      "r777",
      "r778",
      "r779",
      "r780",
      "r781",
      "r782",
      "r783",
      "r784",
      "r785",
      "r786",
      "r787",
      "r788",
      "r789",
      "r790",
      "r791"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Vesting schedule of award under share-based payment arrangement.",
        "label": "Vesting [Domain]",
        "terseLabel": "Vesting [Domain]"
       }
      }
     },
     "localname": "VestingDomain",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/StockbasedCompensationNarrativeDetails"
     ],
     "xbrltype": "domainItemType"
    },
    "us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding": {
     "auth_ref": [
      "r240",
      "r246"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "The average number of shares or units issued and outstanding that are used in calculating diluted EPS or earnings per unit (EPU), determined based on the timing of issuance of shares or units in the period.",
        "label": "Weighted Average Number of Shares Outstanding, Diluted",
        "terseLabel": "Weighted average common stock shares used in computing net loss per share, diluted (in shares)"
       }
      }
     },
     "localname": "WeightedAverageNumberOfDilutedSharesOutstanding",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofOperations"
     ],
     "xbrltype": "sharesItemType"
    },
    "us-gaap_WeightedAverageNumberOfSharesOutstandingBasic": {
     "auth_ref": [
      "r239",
      "r246"
     ],
     "lang": {
      "en-us": {
       "role": {
        "documentation": "Number of [basic] shares or units, after adjustment for contingently issuable shares or units and other shares or units not deemed outstanding, determined by relating the portion of time within a reporting period that common shares or units have been outstanding to the total time in that period.",
        "label": "Weighted Average Number of Shares Outstanding, Basic",
        "verboseLabel": "Weighted average common stock shares used in computing net loss per share, basic (in shares)"
       }
      }
     },
     "localname": "WeightedAverageNumberOfSharesOutstandingBasic",
     "nsuri": "http://fasb.org/us-gaap/2022",
     "presentation": [
      "http://www.codexis.com/role/ConsolidatedStatementsofOperations"
     ],
     "xbrltype": "sharesItemType"
    }
   },
   "unitCount": 11
  }
 },
 "std_ref": {
  "r0": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "210",
   "URI": "https://asc.fasb.org/extlink&oid=6361739&loc=d3e7789-107766",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r1": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(22))",
   "Topic": "210",
   "URI": "https://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r10": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(31))",
   "Topic": "210",
   "URI": "https://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r100": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "505",
   "URI": "https://asc.fasb.org/extlink&oid=126973232&loc=d3e21484-112644",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r101": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "505",
   "URI": "https://asc.fasb.org/extlink&oid=126973232&loc=d3e21488-112644",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r102": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "6",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "505",
   "URI": "https://asc.fasb.org/extlink&oid=126973232&loc=d3e21506-112644",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r103": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "7",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "505",
   "URI": "https://asc.fasb.org/extlink&oid=126973232&loc=d3e21521-112644",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r104": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "505",
   "URI": "https://asc.fasb.org/extlink&oid=126973232&loc=d3e21538-112644",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r105": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.3-04)",
   "Topic": "505",
   "URI": "https://asc.fasb.org/extlink&oid=120397183&loc=d3e187085-122770",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r106": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "505",
   "URI": "https://asc.fasb.org/topic&trid=2208762",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r107": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r108": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)(1)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r109": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)(1)(iv)(2)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r11": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(32))",
   "Topic": "210",
   "URI": "https://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r110": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r111": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(e)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r112": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(e)(1)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r113": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(f)(2)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r114": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(h)(1)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r115": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r116": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2A",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=SL79508275-113901",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r117": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SAB Topic 14.F)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=122041274&loc=d3e301413-122809",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r118": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "12",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "20",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=126964447&loc=d3e11149-113907",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r119": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "20",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=126964447&loc=d3e11178-113907",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r12": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(6)(a))",
   "Topic": "210",
   "URI": "https://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r120": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "730",
   "URI": "https://asc.fasb.org/extlink&oid=6420194&loc=d3e21568-108373",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r121": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(b)",
   "Topic": "730",
   "URI": "https://asc.fasb.org/extlink&oid=6420387&loc=d3e23199-108380",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r122": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "730",
   "URI": "https://asc.fasb.org/extlink&oid=6420387&loc=d3e23199-108380",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r123": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "730",
   "URI": "https://asc.fasb.org/extlink&oid=6420387&loc=d3e23221-108380",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r124": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "6",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "740",
   "URI": "https://asc.fasb.org/extlink&oid=123427490&loc=d3e31931-109318",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r125": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "12",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "740",
   "URI": "https://asc.fasb.org/extlink&oid=121826272&loc=d3e32687-109319",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r126": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "15",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(e)",
   "Topic": "740",
   "URI": "https://asc.fasb.org/extlink&oid=121826272&loc=d3e32718-109319",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r127": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "740",
   "URI": "https://asc.fasb.org/extlink&oid=121826272&loc=d3e32537-109319",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r128": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "740",
   "URI": "https://asc.fasb.org/extlink&oid=121826272&loc=d3e32537-109319",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r129": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "740",
   "URI": "https://asc.fasb.org/extlink&oid=121826272&loc=d3e32559-109319",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r13": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(6)(b))",
   "Topic": "210",
   "URI": "https://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r130": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "740",
   "URI": "https://asc.fasb.org/extlink&oid=121826272&loc=d3e32559-109319",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r131": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "740",
   "URI": "https://asc.fasb.org/extlink&oid=121826272&loc=d3e32632-109319",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r132": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "9",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "740",
   "URI": "https://asc.fasb.org/extlink&oid=121826272&loc=d3e32639-109319",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r133": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SAB Topic 6.I.7)",
   "Topic": "740",
   "URI": "https://asc.fasb.org/extlink&oid=122134291&loc=d3e330036-122817",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r134": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "810",
   "URI": "https://asc.fasb.org/topic&trid=2197479",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r135": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "820",
   "URI": "https://asc.fasb.org/extlink&oid=126976982&loc=d3e19207-110258",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r136": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "820",
   "URI": "https://asc.fasb.org/extlink&oid=126976982&loc=d3e19207-110258",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r137": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "60",
   "SubTopic": "10",
   "Topic": "820",
   "URI": "https://asc.fasb.org/extlink&oid=7493716&loc=d3e21868-110260",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r138": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "820",
   "URI": "https://asc.fasb.org/topic&trid=2155941",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r139": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "825",
   "URI": "https://asc.fasb.org/extlink&oid=123594938&loc=d3e13279-108611",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r14": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(6)(c))",
   "Topic": "210",
   "URI": "https://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r140": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "20",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "825",
   "URI": "https://asc.fasb.org/extlink&oid=123594938&loc=d3e13531-108611",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r141": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "21",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "825",
   "URI": "https://asc.fasb.org/extlink&oid=123594938&loc=d3e13537-108611",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r142": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "21",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "825",
   "URI": "https://asc.fasb.org/extlink&oid=123594938&loc=d3e13537-108611",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r143": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "230",
   "Topic": "830",
   "URI": "https://asc.fasb.org/extlink&oid=123444420&loc=d3e33268-110906",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r144": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "845",
   "URI": "https://asc.fasb.org/extlink&oid=126934811&loc=d3e32049-108421",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r145": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "850",
   "URI": "https://asc.fasb.org/extlink&oid=6457730&loc=d3e39549-107864",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r146": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "850",
   "URI": "https://asc.fasb.org/extlink&oid=6457730&loc=d3e39603-107864",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r147": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.4-10(a)(32))",
   "Topic": "932",
   "URI": "https://asc.fasb.org/extlink&oid=126954596&loc=d3e511914-122862",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r148": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.4-10(c)(3)(ii)(A))",
   "Topic": "932",
   "URI": "https://asc.fasb.org/extlink&oid=126954596&loc=d3e511914-122862",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r149": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.4-10(c)(7)(ii))",
   "Topic": "932",
   "URI": "https://asc.fasb.org/extlink&oid=126954596&loc=d3e511914-122862",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r15": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.1)",
   "Topic": "210",
   "URI": "https://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r150": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1B",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "235",
   "Subparagraph": "(b)",
   "Topic": "932",
   "URI": "https://asc.fasb.org/extlink&oid=126939881&loc=SL6806780-109447",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r151": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "25",
   "SubTopic": "20",
   "Topic": "940",
   "URI": "https://asc.fasb.org/extlink&oid=126941158&loc=d3e41242-110953",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r152": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "820",
   "Topic": "940",
   "URI": "https://asc.fasb.org/extlink&oid=35710923&loc=d3e45360-110995",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r153": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.9-03(1)(a))",
   "Topic": "942",
   "URI": "https://asc.fasb.org/extlink&oid=126897435&loc=d3e534808-122878",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r154": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.9-03(11))",
   "Topic": "942",
   "URI": "https://asc.fasb.org/extlink&oid=126897435&loc=d3e534808-122878",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r155": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.9-03(15)(2))",
   "Topic": "942",
   "URI": "https://asc.fasb.org/extlink&oid=126897435&loc=d3e534808-122878",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r156": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.9-03(16))",
   "Topic": "942",
   "URI": "https://asc.fasb.org/extlink&oid=126897435&loc=d3e534808-122878",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r157": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.9-03(23))",
   "Topic": "942",
   "URI": "https://asc.fasb.org/extlink&oid=126897435&loc=d3e534808-122878",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r158": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.9-03.10(3))",
   "Topic": "942",
   "URI": "https://asc.fasb.org/extlink&oid=126897435&loc=d3e534808-122878",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r159": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.9-03.15(5))",
   "Topic": "942",
   "URI": "https://asc.fasb.org/extlink&oid=126897435&loc=d3e534808-122878",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r16": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.19(a))",
   "Topic": "210",
   "URI": "https://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r160": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.9-03.17)",
   "Topic": "942",
   "URI": "https://asc.fasb.org/extlink&oid=126897435&loc=d3e534808-122878",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r161": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "220",
   "Subparagraph": "(SX 210.9-04(15))",
   "Topic": "942",
   "URI": "https://asc.fasb.org/extlink&oid=120399700&loc=SL114874048-224260",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r162": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "220",
   "Subparagraph": "(SX 210.9-04(22))",
   "Topic": "942",
   "URI": "https://asc.fasb.org/extlink&oid=120399700&loc=SL114874048-224260",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r163": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "470",
   "Subparagraph": "(d)",
   "Topic": "942",
   "URI": "https://asc.fasb.org/extlink&oid=123599511&loc=d3e64711-112823",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r164": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "825",
   "Topic": "942",
   "URI": "https://asc.fasb.org/extlink&oid=126941378&loc=d3e61044-112788",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r165": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.7-03(15)(b)(2))",
   "Topic": "944",
   "URI": "https://asc.fasb.org/extlink&oid=126734703&loc=d3e572229-122910",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r166": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.7-03(a)(12))",
   "Topic": "944",
   "URI": "https://asc.fasb.org/extlink&oid=126734703&loc=d3e572229-122910",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r167": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.7-03(a)(16))",
   "Topic": "944",
   "URI": "https://asc.fasb.org/extlink&oid=126734703&loc=d3e572229-122910",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r168": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.7-03(a)(2))",
   "Topic": "944",
   "URI": "https://asc.fasb.org/extlink&oid=126734703&loc=d3e572229-122910",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r169": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.7-03(a)(23)(a)(4))",
   "Topic": "944",
   "URI": "https://asc.fasb.org/extlink&oid=126734703&loc=d3e572229-122910",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r17": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.19(b),22(b))",
   "Topic": "210",
   "URI": "https://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r170": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.7-03(a)(25))",
   "Topic": "944",
   "URI": "https://asc.fasb.org/extlink&oid=126734703&loc=d3e572229-122910",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r171": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.7-03(a)(8))",
   "Topic": "944",
   "URI": "https://asc.fasb.org/extlink&oid=126734703&loc=d3e572229-122910",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r172": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.7-03.(a),19)",
   "Topic": "944",
   "URI": "https://asc.fasb.org/extlink&oid=126734703&loc=d3e572229-122910",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r173": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.7-03.15(a))",
   "Topic": "944",
   "URI": "https://asc.fasb.org/extlink&oid=126734703&loc=d3e572229-122910",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r174": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.7-03.3)",
   "Topic": "944",
   "URI": "https://asc.fasb.org/extlink&oid=126734703&loc=d3e572229-122910",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r175": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "220",
   "Subparagraph": "(SX 210.7-04(18))",
   "Topic": "944",
   "URI": "https://asc.fasb.org/extlink&oid=120400993&loc=SL114874131-224263",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r176": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "220",
   "Subparagraph": "(SX 210.7-04(8))",
   "Topic": "944",
   "URI": "https://asc.fasb.org/extlink&oid=120400993&loc=SL114874131-224263",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r177": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "6",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "210",
   "Subparagraph": "(c)",
   "Topic": "946",
   "URI": "https://asc.fasb.org/extlink&oid=99383244&loc=d3e12121-115841",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r178": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "220",
   "Subparagraph": "(SX 210.6-07.1(c))",
   "Topic": "946",
   "URI": "https://asc.fasb.org/extlink&oid=120401555&loc=SL114874292-224272",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r179": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "985",
   "URI": "https://asc.fasb.org/extlink&oid=6501960&loc=d3e128462-111756",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r18": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.19-26)",
   "Topic": "210",
   "URI": "https://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r180": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(n)",
   "Topic": "715",
   "URI": "https://asc.fasb.org/extlink&oid=123447040&loc=d3e1928-114920",
   "role": "http://fasb.org/us-gaap/role/ref/otherTransitionRef"
  },
  "r181": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "6",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "105",
   "URI": "https://asc.fasb.org/extlink&oid=126987489&loc=SL124442142-165695",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r182": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(d)",
   "Topic": "205",
   "URI": "https://asc.fasb.org/extlink&oid=109222650&loc=d3e1361-107760",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r183": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "7",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "205",
   "URI": "https://asc.fasb.org/extlink&oid=109222650&loc=SL51721683-107760",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r184": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "210",
   "URI": "https://asc.fasb.org/extlink&oid=124098289&loc=d3e6676-107765",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r185": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "210",
   "URI": "https://asc.fasb.org/extlink&oid=124098289&loc=d3e6904-107765",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r186": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "210",
   "URI": "https://asc.fasb.org/extlink&oid=6361739&loc=d3e7789-107766",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r187": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(1))",
   "Topic": "210",
   "URI": "https://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r188": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(13))",
   "Topic": "210",
   "URI": "https://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r189": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(14))",
   "Topic": "210",
   "URI": "https://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r19": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.20)",
   "Topic": "210",
   "URI": "https://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r190": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(15))",
   "Topic": "210",
   "URI": "https://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r191": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(17))",
   "Topic": "210",
   "URI": "https://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r192": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(18))",
   "Topic": "210",
   "URI": "https://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r193": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(27)(b))",
   "Topic": "210",
   "URI": "https://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r194": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(28))",
   "Topic": "210",
   "URI": "https://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r195": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(29))",
   "Topic": "210",
   "URI": "https://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r196": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(3)(a)(1))",
   "Topic": "210",
   "URI": "https://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r197": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(3)(a)(2))",
   "Topic": "210",
   "URI": "https://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r198": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(3)(b))",
   "Topic": "210",
   "URI": "https://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r199": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(4))",
   "Topic": "210",
   "URI": "https://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r2": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(25))",
   "Topic": "210",
   "URI": "https://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r20": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.21)",
   "Topic": "210",
   "URI": "https://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r200": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(6)(b))",
   "Topic": "210",
   "URI": "https://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r201": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(6))",
   "Topic": "210",
   "URI": "https://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r202": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(9))",
   "Topic": "210",
   "URI": "https://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r203": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1A",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "220",
   "URI": "https://asc.fasb.org/extlink&oid=126968391&loc=SL7669619-108580",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r204": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1B",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "220",
   "URI": "https://asc.fasb.org/extlink&oid=126968391&loc=SL7669625-108580",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r205": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "220",
   "URI": "https://asc.fasb.org/extlink&oid=124431353&loc=SL116659661-227067",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r206": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "220",
   "URI": "https://asc.fasb.org/extlink&oid=124431353&loc=SL124442407-227067",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r207": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "220",
   "URI": "https://asc.fasb.org/extlink&oid=124431353&loc=SL124442411-227067",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r208": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "6",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "220",
   "URI": "https://asc.fasb.org/extlink&oid=124431353&loc=SL124452729-227067",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r209": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-03(1))",
   "Topic": "220",
   "URI": "https://asc.fasb.org/extlink&oid=126953954&loc=SL114868664-224227",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r21": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.22(a)(1))",
   "Topic": "210",
   "URI": "https://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r210": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-03(25))",
   "Topic": "220",
   "URI": "https://asc.fasb.org/extlink&oid=126953954&loc=SL114868664-224227",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r211": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-03(5))",
   "Topic": "220",
   "URI": "https://asc.fasb.org/extlink&oid=126953954&loc=SL114868664-224227",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r212": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "15",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "230",
   "URI": "https://asc.fasb.org/extlink&oid=126954810&loc=d3e3291-108585",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r213": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "17",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "230",
   "URI": "https://asc.fasb.org/extlink&oid=126954810&loc=d3e3367-108585",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r214": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "24",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "https://asc.fasb.org/extlink&oid=126954810&loc=d3e3521-108585",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r215": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "25",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(e)",
   "Topic": "230",
   "URI": "https://asc.fasb.org/extlink&oid=126954810&loc=d3e3536-108585",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r216": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "https://asc.fasb.org/extlink&oid=126999549&loc=d3e4297-108586",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r217": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.4-08(e)(1))",
   "Topic": "235",
   "URI": "https://asc.fasb.org/extlink&oid=120395691&loc=d3e23780-122690",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r218": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.4-08(g)(1)(ii))",
   "Topic": "235",
   "URI": "https://asc.fasb.org/extlink&oid=120395691&loc=d3e23780-122690",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r219": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.4-08(h)(1))",
   "Topic": "235",
   "URI": "https://asc.fasb.org/extlink&oid=120395691&loc=d3e23780-122690",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r22": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.24)",
   "Topic": "210",
   "URI": "https://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r220": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.4-08(h)(2))",
   "Topic": "235",
   "URI": "https://asc.fasb.org/extlink&oid=120395691&loc=d3e23780-122690",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r221": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.4-08(h))",
   "Topic": "235",
   "URI": "https://asc.fasb.org/extlink&oid=120395691&loc=d3e23780-122690",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r222": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.4-08(m)(1)(iii))",
   "Topic": "235",
   "URI": "https://asc.fasb.org/extlink&oid=120395691&loc=d3e23780-122690",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r223": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.4-08(m)(2)(ii))",
   "Topic": "235",
   "URI": "https://asc.fasb.org/extlink&oid=120395691&loc=d3e23780-122690",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r224": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.12-04(a))",
   "Topic": "235",
   "URI": "https://asc.fasb.org/extlink&oid=120395691&loc=d3e24072-122690",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r225": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "23",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "250",
   "URI": "https://asc.fasb.org/extlink&oid=124436220&loc=d3e21914-107793",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r226": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "24",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "250",
   "URI": "https://asc.fasb.org/extlink&oid=124436220&loc=d3e21930-107793",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r227": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "250",
   "URI": "https://asc.fasb.org/extlink&oid=124436220&loc=d3e21711-107793",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r228": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)(2)",
   "Topic": "250",
   "URI": "https://asc.fasb.org/extlink&oid=124431687&loc=d3e22499-107794",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r229": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)(3)",
   "Topic": "250",
   "URI": "https://asc.fasb.org/extlink&oid=124431687&loc=d3e22499-107794",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r23": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.25)",
   "Topic": "210",
   "URI": "https://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r230": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "11",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "250",
   "URI": "https://asc.fasb.org/extlink&oid=124431687&loc=d3e22694-107794",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r231": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "11",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "250",
   "URI": "https://asc.fasb.org/extlink&oid=124431687&loc=d3e22694-107794",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r232": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "250",
   "URI": "https://asc.fasb.org/extlink&oid=124431687&loc=d3e22583-107794",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r233": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "250",
   "URI": "https://asc.fasb.org/extlink&oid=124431687&loc=d3e22595-107794",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r234": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "7",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "250",
   "URI": "https://asc.fasb.org/extlink&oid=124431687&loc=d3e22644-107794",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r235": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "7",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "250",
   "URI": "https://asc.fasb.org/extlink&oid=124431687&loc=d3e22644-107794",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r236": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "250",
   "URI": "https://asc.fasb.org/extlink&oid=124431687&loc=d3e22658-107794",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r237": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "9",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "250",
   "URI": "https://asc.fasb.org/extlink&oid=124431687&loc=d3e22663-107794",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r238": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SAB Topic 11.M.Q2)",
   "Topic": "250",
   "URI": "https://asc.fasb.org/extlink&oid=122038215&loc=d3e31137-122693",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r239": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "10",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "260",
   "URI": "https://asc.fasb.org/extlink&oid=126958026&loc=d3e1448-109256",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r24": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.29)",
   "Topic": "210",
   "URI": "https://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r240": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "16",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "260",
   "URI": "https://asc.fasb.org/extlink&oid=126958026&loc=d3e1505-109256",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r241": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "260",
   "URI": "https://asc.fasb.org/extlink&oid=126958026&loc=d3e1252-109256",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r242": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "260",
   "URI": "https://asc.fasb.org/extlink&oid=126958026&loc=d3e1278-109256",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r243": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "60B",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "260",
   "URI": "https://asc.fasb.org/extlink&oid=126958026&loc=SL5780133-109256",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r244": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "60B",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "260",
   "URI": "https://asc.fasb.org/extlink&oid=126958026&loc=SL5780133-109256",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r245": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "7",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "260",
   "URI": "https://asc.fasb.org/extlink&oid=126958026&loc=d3e1337-109256",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r246": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "260",
   "URI": "https://asc.fasb.org/extlink&oid=124432515&loc=d3e3550-109257",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r247": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "260",
   "URI": "https://asc.fasb.org/extlink&oid=124432515&loc=d3e3550-109257",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r248": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "260",
   "URI": "https://asc.fasb.org/extlink&oid=124432515&loc=d3e3630-109257",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r249": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "260",
   "URI": "https://asc.fasb.org/extlink&oid=109243012&loc=SL65017193-207537",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r25": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02.29-31)",
   "Topic": "210",
   "URI": "https://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r250": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "15",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "10",
   "Topic": "260",
   "URI": "https://asc.fasb.org/extlink&oid=128363288&loc=d3e3842-109258",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r251": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "260",
   "URI": "https://asc.fasb.org/topic&trid=2144383",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r252": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "6",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "270",
   "URI": "https://asc.fasb.org/extlink&oid=126900757&loc=d3e543-108305",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r253": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "272",
   "URI": "https://asc.fasb.org/extlink&oid=125520817&loc=d3e70191-108054",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r254": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "272",
   "URI": "https://asc.fasb.org/extlink&oid=6373374&loc=d3e70434-108055",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r255": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "272",
   "URI": "https://asc.fasb.org/extlink&oid=6373374&loc=d3e70478-108055",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r256": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "275",
   "URI": "https://asc.fasb.org/extlink&oid=99393423&loc=d3e5967-108592",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r257": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "275",
   "URI": "https://asc.fasb.org/extlink&oid=99393423&loc=d3e5967-108592",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r258": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "275",
   "URI": "https://asc.fasb.org/extlink&oid=99393423&loc=d3e5967-108592",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r259": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "275",
   "URI": "https://asc.fasb.org/extlink&oid=99393423&loc=d3e5967-108592",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r26": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-03(10))",
   "Topic": "220",
   "URI": "https://asc.fasb.org/extlink&oid=126953954&loc=SL114868664-224227",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r260": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "11",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "275",
   "URI": "https://asc.fasb.org/extlink&oid=99393423&loc=d3e6161-108592",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r261": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "12",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "275",
   "URI": "https://asc.fasb.org/extlink&oid=99393423&loc=d3e6191-108592",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r262": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "275",
   "URI": "https://asc.fasb.org/topic&trid=2134479",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r263": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "15",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "280",
   "URI": "https://asc.fasb.org/extlink&oid=126901519&loc=d3e8657-108599",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r264": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "21",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "280",
   "URI": "https://asc.fasb.org/extlink&oid=126901519&loc=d3e8721-108599",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r265": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "21",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "280",
   "URI": "https://asc.fasb.org/extlink&oid=126901519&loc=d3e8721-108599",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r266": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "22",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "280",
   "URI": "https://asc.fasb.org/extlink&oid=126901519&loc=d3e8736-108599",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r267": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "22",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "280",
   "URI": "https://asc.fasb.org/extlink&oid=126901519&loc=d3e8736-108599",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r268": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "22",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "280",
   "URI": "https://asc.fasb.org/extlink&oid=126901519&loc=d3e8736-108599",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r269": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "22",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "280",
   "URI": "https://asc.fasb.org/extlink&oid=126901519&loc=d3e8736-108599",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r27": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-03(20))",
   "Topic": "220",
   "URI": "https://asc.fasb.org/extlink&oid=126953954&loc=SL114868664-224227",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r270": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "22",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(e)",
   "Topic": "280",
   "URI": "https://asc.fasb.org/extlink&oid=126901519&loc=d3e8736-108599",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r271": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "22",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(f)",
   "Topic": "280",
   "URI": "https://asc.fasb.org/extlink&oid=126901519&loc=d3e8736-108599",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r272": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "22",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(g)",
   "Topic": "280",
   "URI": "https://asc.fasb.org/extlink&oid=126901519&loc=d3e8736-108599",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r273": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "22",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(h)",
   "Topic": "280",
   "URI": "https://asc.fasb.org/extlink&oid=126901519&loc=d3e8736-108599",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r274": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "22",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(j)",
   "Topic": "280",
   "URI": "https://asc.fasb.org/extlink&oid=126901519&loc=d3e8736-108599",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r275": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "22",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "280",
   "URI": "https://asc.fasb.org/extlink&oid=126901519&loc=d3e8736-108599",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r276": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "25",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "280",
   "URI": "https://asc.fasb.org/extlink&oid=126901519&loc=d3e8813-108599",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r277": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "25",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "280",
   "URI": "https://asc.fasb.org/extlink&oid=126901519&loc=d3e8813-108599",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r278": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "26",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "280",
   "URI": "https://asc.fasb.org/extlink&oid=126901519&loc=d3e8844-108599",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r279": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "29",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "280",
   "URI": "https://asc.fasb.org/extlink&oid=126901519&loc=d3e8864-108599",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r28": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-03)",
   "Topic": "220",
   "URI": "https://asc.fasb.org/extlink&oid=126953954&loc=SL114868664-224227",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r280": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "29",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "280",
   "URI": "https://asc.fasb.org/extlink&oid=126901519&loc=d3e8864-108599",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r281": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "29",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "280",
   "URI": "https://asc.fasb.org/extlink&oid=126901519&loc=d3e8864-108599",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r282": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "29",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "280",
   "URI": "https://asc.fasb.org/extlink&oid=126901519&loc=d3e8864-108599",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r283": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "29",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(e)",
   "Topic": "280",
   "URI": "https://asc.fasb.org/extlink&oid=126901519&loc=d3e8864-108599",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r284": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "29",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "280",
   "URI": "https://asc.fasb.org/extlink&oid=126901519&loc=d3e8864-108599",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r285": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "30",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "280",
   "URI": "https://asc.fasb.org/extlink&oid=126901519&loc=d3e8906-108599",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r286": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "30",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "280",
   "URI": "https://asc.fasb.org/extlink&oid=126901519&loc=d3e8906-108599",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r287": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "30",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "280",
   "URI": "https://asc.fasb.org/extlink&oid=126901519&loc=d3e8906-108599",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r288": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "30",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "280",
   "URI": "https://asc.fasb.org/extlink&oid=126901519&loc=d3e8906-108599",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r289": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "31",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "280",
   "URI": "https://asc.fasb.org/extlink&oid=126901519&loc=d3e8924-108599",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r29": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-03.1(e))",
   "Topic": "220",
   "URI": "https://asc.fasb.org/extlink&oid=126953954&loc=SL114868664-224227",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r290": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "32",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "280",
   "URI": "https://asc.fasb.org/extlink&oid=126901519&loc=d3e8933-108599",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r291": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "32",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "280",
   "URI": "https://asc.fasb.org/extlink&oid=126901519&loc=d3e8933-108599",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r292": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "32",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "280",
   "URI": "https://asc.fasb.org/extlink&oid=126901519&loc=d3e8933-108599",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r293": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "32",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "280",
   "URI": "https://asc.fasb.org/extlink&oid=126901519&loc=d3e8933-108599",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r294": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "32",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(e)",
   "Topic": "280",
   "URI": "https://asc.fasb.org/extlink&oid=126901519&loc=d3e8933-108599",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r295": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "32",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(f)",
   "Topic": "280",
   "URI": "https://asc.fasb.org/extlink&oid=126901519&loc=d3e8933-108599",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r296": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "34",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "280",
   "URI": "https://asc.fasb.org/extlink&oid=126901519&loc=d3e8981-108599",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r297": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "40",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "280",
   "URI": "https://asc.fasb.org/extlink&oid=126901519&loc=d3e9031-108599",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r298": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "41",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "280",
   "URI": "https://asc.fasb.org/extlink&oid=126901519&loc=d3e9038-108599",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r299": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "41",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "280",
   "URI": "https://asc.fasb.org/extlink&oid=126901519&loc=d3e9038-108599",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r3": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(26)(a))",
   "Topic": "210",
   "URI": "https://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r30": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-03.2(a),(d))",
   "Topic": "220",
   "URI": "https://asc.fasb.org/extlink&oid=126953954&loc=SL114868664-224227",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r300": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "41",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "280",
   "URI": "https://asc.fasb.org/extlink&oid=126901519&loc=d3e9038-108599",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r301": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "42",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "280",
   "URI": "https://asc.fasb.org/extlink&oid=126901519&loc=d3e9054-108599",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r302": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "280",
   "URI": "https://asc.fasb.org/topic&trid=2134510",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r303": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "310",
   "URI": "https://asc.fasb.org/extlink&oid=124259787&loc=d3e4428-111522",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r304": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "9",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "310",
   "URI": "https://asc.fasb.org/extlink&oid=124259787&loc=d3e4531-111522",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r305": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "310",
   "URI": "https://asc.fasb.org/extlink&oid=123577603&loc=d3e5074-111524",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r306": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "7A",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "310",
   "URI": "https://asc.fasb.org/extlink&oid=123577603&loc=SL6953401-111524",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r307": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "310",
   "URI": "https://asc.fasb.org/topic&trid=2196771",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r308": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "320",
   "URI": "https://asc.fasb.org/extlink&oid=124260329&loc=d3e26610-111562",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r309": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "321",
   "URI": "https://asc.fasb.org/extlink&oid=126980263&loc=SL75117539-209714",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r31": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-03.4)",
   "Topic": "220",
   "URI": "https://asc.fasb.org/extlink&oid=126953954&loc=SL114868664-224227",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r310": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "321",
   "URI": "https://asc.fasb.org/extlink&oid=126980263&loc=SL75117539-209714",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r311": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)(1)",
   "Topic": "323",
   "URI": "https://asc.fasb.org/extlink&oid=114001798&loc=d3e33918-111571",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r312": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)(2)",
   "Topic": "323",
   "URI": "https://asc.fasb.org/extlink&oid=114001798&loc=d3e33918-111571",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r313": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "323",
   "URI": "https://asc.fasb.org/extlink&oid=114001798&loc=d3e33918-111571",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r314": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "326",
   "URI": "https://asc.fasb.org/extlink&oid=122640432&loc=SL121648383-210437",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r315": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "20",
   "Topic": "326",
   "URI": "https://asc.fasb.org/extlink&oid=124255206&loc=SL82895884-210446",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r316": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "11",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "326",
   "URI": "https://asc.fasb.org/extlink&oid=124255953&loc=SL82919244-210447",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r317": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(b)",
   "Topic": "326",
   "URI": "https://asc.fasb.org/extlink&oid=124255953&loc=SL82919249-210447",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r318": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "14",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "326",
   "URI": "https://asc.fasb.org/extlink&oid=124255953&loc=SL82919253-210447",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r319": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "20",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "326",
   "URI": "https://asc.fasb.org/extlink&oid=124255953&loc=SL82919269-210447",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r32": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-03.7(b))",
   "Topic": "220",
   "URI": "https://asc.fasb.org/extlink&oid=126953954&loc=SL114868664-224227",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r320": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "21",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "326",
   "URI": "https://asc.fasb.org/extlink&oid=124255953&loc=SL82919272-210447",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r321": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(b)",
   "Topic": "326",
   "URI": "https://asc.fasb.org/extlink&oid=124255953&loc=SL82919230-210447",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r322": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "326",
   "URI": "https://asc.fasb.org/extlink&oid=124255953&loc=SL82919230-210447",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r323": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "326",
   "URI": "https://asc.fasb.org/extlink&oid=124255953&loc=SL82919236-210447",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r324": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "30",
   "Topic": "326",
   "URI": "https://asc.fasb.org/extlink&oid=124258926&loc=SL82898722-210454",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r325": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "30",
   "Topic": "326",
   "URI": "https://asc.fasb.org/extlink&oid=124269663&loc=SL82922888-210455",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r326": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "7",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "30",
   "Topic": "326",
   "URI": "https://asc.fasb.org/extlink&oid=124269663&loc=SL82922895-210455",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r327": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "9",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "30",
   "Subparagraph": "(g)",
   "Topic": "326",
   "URI": "https://asc.fasb.org/extlink&oid=124269663&loc=SL82922900-210455",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r328": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "330",
   "URI": "https://asc.fasb.org/extlink&oid=116847112&loc=d3e4492-108314",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r329": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "330",
   "URI": "https://asc.fasb.org/extlink&oid=116847112&loc=d3e4556-108314",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r33": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-03.8)",
   "Topic": "220",
   "URI": "https://asc.fasb.org/extlink&oid=126953954&loc=SL114868664-224227",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r330": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "330",
   "URI": "https://asc.fasb.org/topic&trid=2126998",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r331": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "40",
   "Subparagraph": "(a)",
   "Topic": "340",
   "URI": "https://asc.fasb.org/extlink&oid=126905575&loc=SL49131252-203054",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r332": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "20",
   "Topic": "350",
   "URI": "https://asc.fasb.org/extlink&oid=99380562&loc=d3e13770-109266",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r333": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(a)",
   "Topic": "350",
   "URI": "https://asc.fasb.org/extlink&oid=121556970&loc=d3e13816-109267",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r334": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(b)",
   "Topic": "350",
   "URI": "https://asc.fasb.org/extlink&oid=121556970&loc=d3e13816-109267",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r335": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(c)",
   "Topic": "350",
   "URI": "https://asc.fasb.org/extlink&oid=121556970&loc=d3e13816-109267",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r336": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(d)",
   "Topic": "350",
   "URI": "https://asc.fasb.org/extlink&oid=121556970&loc=d3e13816-109267",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r337": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(e)",
   "Topic": "350",
   "URI": "https://asc.fasb.org/extlink&oid=121556970&loc=d3e13816-109267",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r338": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(f)",
   "Topic": "350",
   "URI": "https://asc.fasb.org/extlink&oid=121556970&loc=d3e13816-109267",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r339": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(g)",
   "Topic": "350",
   "URI": "https://asc.fasb.org/extlink&oid=121556970&loc=d3e13816-109267",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r34": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-03.9)",
   "Topic": "220",
   "URI": "https://asc.fasb.org/extlink&oid=126953954&loc=SL114868664-224227",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r340": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(h)",
   "Topic": "350",
   "URI": "https://asc.fasb.org/extlink&oid=121556970&loc=d3e13816-109267",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r341": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "350",
   "URI": "https://asc.fasb.org/extlink&oid=121556970&loc=d3e13816-109267",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r342": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(b)",
   "Topic": "350",
   "URI": "https://asc.fasb.org/extlink&oid=121556970&loc=d3e13854-109267",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r343": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "SubTopic": "20",
   "Topic": "350",
   "URI": "https://asc.fasb.org/subtopic&trid=2144439",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r344": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "360",
   "URI": "https://asc.fasb.org/extlink&oid=109226691&loc=d3e2941-110230",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r345": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(f)",
   "Topic": "360",
   "URI": "https://asc.fasb.org/extlink&oid=109226691&loc=d3e2941-110230",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r346": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "25",
   "SubTopic": "20",
   "Topic": "410",
   "URI": "https://asc.fasb.org/extlink&oid=116646717&loc=d3e6290-110844",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r347": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(c)",
   "Topic": "410",
   "URI": "https://asc.fasb.org/extlink&oid=6392692&loc=d3e7535-110849",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r348": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "420",
   "URI": "https://asc.fasb.org/extlink&oid=6394359&loc=d3e17939-110869",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r349": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)(1)",
   "Topic": "420",
   "URI": "https://asc.fasb.org/extlink&oid=6394359&loc=d3e17939-110869",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r35": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "12",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "230",
   "URI": "https://asc.fasb.org/extlink&oid=126954810&loc=d3e3179-108585",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r350": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)(2)",
   "Topic": "420",
   "URI": "https://asc.fasb.org/extlink&oid=6394359&loc=d3e17939-110869",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r351": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "420",
   "URI": "https://asc.fasb.org/extlink&oid=6394359&loc=d3e17939-110869",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r352": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "420",
   "URI": "https://asc.fasb.org/extlink&oid=6394359&loc=d3e17939-110869",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r353": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(e)",
   "Topic": "420",
   "URI": "https://asc.fasb.org/extlink&oid=6394359&loc=d3e17939-110869",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r354": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SAB Topic 5.P.3)",
   "Topic": "420",
   "URI": "https://asc.fasb.org/extlink&oid=115931487&loc=d3e140864-122747",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r355": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SAB Topic 5.P.4(b)(1))",
   "Topic": "420",
   "URI": "https://asc.fasb.org/extlink&oid=115931487&loc=d3e140904-122747",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r356": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SAB Topic 5.P.4(b)(2))",
   "Topic": "420",
   "URI": "https://asc.fasb.org/extlink&oid=115931487&loc=d3e140904-122747",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r357": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SAB Topic 5.P.4(d))",
   "Topic": "420",
   "URI": "https://asc.fasb.org/extlink&oid=115931487&loc=d3e140904-122747",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r358": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SAB Topic 5.P.4(e))",
   "Topic": "420",
   "URI": "https://asc.fasb.org/extlink&oid=115931487&loc=d3e140904-122747",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r359": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "420",
   "URI": "https://asc.fasb.org/topic&trid=2175745",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r36": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "230",
   "URI": "https://asc.fasb.org/extlink&oid=126954810&loc=d3e3213-108585",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r360": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "440",
   "URI": "https://asc.fasb.org/extlink&oid=123406679&loc=d3e25336-109308",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r361": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "440",
   "URI": "https://asc.fasb.org/extlink&oid=123406679&loc=d3e25336-109308",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r362": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "450",
   "URI": "https://asc.fasb.org/extlink&oid=121557415&loc=d3e14326-108349",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r363": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(b)",
   "Topic": "450",
   "URI": "https://asc.fasb.org/extlink&oid=121557415&loc=d3e14435-108349",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r364": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "9",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(b)",
   "Topic": "450",
   "URI": "https://asc.fasb.org/extlink&oid=121557415&loc=d3e14557-108349",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r365": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "20",
   "Subparagraph": "(SAB Topic 5.Y.Q2)",
   "Topic": "450",
   "URI": "https://asc.fasb.org/extlink&oid=27011672&loc=d3e149879-122751",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r366": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "20",
   "Subparagraph": "(SAB Topic 5.Y.Q4)",
   "Topic": "450",
   "URI": "https://asc.fasb.org/extlink&oid=27011672&loc=d3e149879-122751",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r367": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1A",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.13-01(a)(4)(i))",
   "Topic": "470",
   "URI": "https://asc.fasb.org/extlink&oid=126975872&loc=SL124442526-122756",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r368": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1A",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.13-01(a)(4)(iii)(A))",
   "Topic": "470",
   "URI": "https://asc.fasb.org/extlink&oid=126975872&loc=SL124442526-122756",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r369": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1A",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.13-01(a)(4)(iii)(B))",
   "Topic": "470",
   "URI": "https://asc.fasb.org/extlink&oid=126975872&loc=SL124442526-122756",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r37": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "https://asc.fasb.org/extlink&oid=126954810&loc=d3e3213-108585",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r370": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1A",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.13-01(a)(4)(iv))",
   "Topic": "470",
   "URI": "https://asc.fasb.org/extlink&oid=126975872&loc=SL124442526-122756",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r371": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1A",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.13-01(a)(5))",
   "Topic": "470",
   "URI": "https://asc.fasb.org/extlink&oid=126975872&loc=SL124442526-122756",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r372": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1B",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.13-02(a)(4)(i))",
   "Topic": "470",
   "URI": "https://asc.fasb.org/extlink&oid=126975872&loc=SL124442552-122756",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r373": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1B",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.13-02(a)(4)(iii)(A)",
   "Topic": "470",
   "URI": "https://asc.fasb.org/extlink&oid=126975872&loc=SL124442552-122756",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r374": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1B",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.13-02(a)(4)(iii)(A))",
   "Topic": "470",
   "URI": "https://asc.fasb.org/extlink&oid=126975872&loc=SL124442552-122756",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r375": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1B",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.13-02(a)(4)(iii)(B)",
   "Topic": "470",
   "URI": "https://asc.fasb.org/extlink&oid=126975872&loc=SL124442552-122756",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r376": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1B",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.13-02(a)(4)(iii)(B))",
   "Topic": "470",
   "URI": "https://asc.fasb.org/extlink&oid=126975872&loc=SL124442552-122756",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r377": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1B",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.13-02(a)(4)(iii)(C))",
   "Topic": "470",
   "URI": "https://asc.fasb.org/extlink&oid=126975872&loc=SL124442552-122756",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r378": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1B",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.13-02(a)(4)(iv))",
   "Topic": "470",
   "URI": "https://asc.fasb.org/extlink&oid=126975872&loc=SL124442552-122756",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r379": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1B",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.13-02(a)(5))",
   "Topic": "470",
   "URI": "https://asc.fasb.org/extlink&oid=126975872&loc=SL124442552-122756",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r38": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "14",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "230",
   "URI": "https://asc.fasb.org/extlink&oid=126954810&loc=d3e3255-108585",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r380": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1B",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(a)",
   "Topic": "470",
   "URI": "https://asc.fasb.org/extlink&oid=123466505&loc=SL123495323-112611",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r381": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1B",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(b)",
   "Topic": "470",
   "URI": "https://asc.fasb.org/extlink&oid=123466505&loc=SL123495323-112611",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r382": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1B",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(e)",
   "Topic": "470",
   "URI": "https://asc.fasb.org/extlink&oid=123466505&loc=SL123495323-112611",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r383": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1D",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(a)",
   "Topic": "470",
   "URI": "https://asc.fasb.org/extlink&oid=123466505&loc=SL123495340-112611",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r384": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1D",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(b)",
   "Topic": "470",
   "URI": "https://asc.fasb.org/extlink&oid=123466505&loc=SL123495340-112611",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r385": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1D",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(c)",
   "Topic": "470",
   "URI": "https://asc.fasb.org/extlink&oid=123466505&loc=SL123495340-112611",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r386": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1E",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(d)",
   "Topic": "470",
   "URI": "https://asc.fasb.org/extlink&oid=123466505&loc=SL123495348-112611",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r387": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1F",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(a)",
   "Topic": "470",
   "URI": "https://asc.fasb.org/extlink&oid=123466505&loc=SL123495355-112611",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r388": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1F",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(b)",
   "Topic": "470",
   "URI": "https://asc.fasb.org/extlink&oid=123466505&loc=SL123495355-112611",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r389": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1F",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(b)(1)",
   "Topic": "470",
   "URI": "https://asc.fasb.org/extlink&oid=123466505&loc=SL123495355-112611",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r39": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "15",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "https://asc.fasb.org/extlink&oid=126954810&loc=d3e3291-108585",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r390": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1F",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(b)(2)",
   "Topic": "470",
   "URI": "https://asc.fasb.org/extlink&oid=123466505&loc=SL123495355-112611",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r391": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "505",
   "URI": "https://asc.fasb.org/extlink&oid=126973232&loc=SL123496158-112644",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r392": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "505",
   "URI": "https://asc.fasb.org/extlink&oid=126973232&loc=SL123496158-112644",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r393": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(e)",
   "Topic": "505",
   "URI": "https://asc.fasb.org/extlink&oid=126973232&loc=SL123496158-112644",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r394": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(g)",
   "Topic": "505",
   "URI": "https://asc.fasb.org/extlink&oid=126973232&loc=SL123496158-112644",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r395": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(h)",
   "Topic": "505",
   "URI": "https://asc.fasb.org/extlink&oid=126973232&loc=SL123496158-112644",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r396": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(i)",
   "Topic": "505",
   "URI": "https://asc.fasb.org/extlink&oid=126973232&loc=SL123496158-112644",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r397": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "505",
   "URI": "https://asc.fasb.org/extlink&oid=126973232&loc=SL123496158-112644",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r398": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "14",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "505",
   "URI": "https://asc.fasb.org/extlink&oid=126973232&loc=SL123496171-112644",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r399": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "14",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "505",
   "URI": "https://asc.fasb.org/extlink&oid=126973232&loc=SL123496171-112644",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r4": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(26)(b))",
   "Topic": "210",
   "URI": "https://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r40": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "24",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "https://asc.fasb.org/extlink&oid=126954810&loc=d3e3521-108585",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r400": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "14",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "505",
   "URI": "https://asc.fasb.org/extlink&oid=126973232&loc=SL123496171-112644",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r401": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "16",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "505",
   "URI": "https://asc.fasb.org/extlink&oid=126973232&loc=SL123496180-112644",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r402": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "18",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "505",
   "URI": "https://asc.fasb.org/extlink&oid=126973232&loc=SL123496189-112644",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r403": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "18",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "505",
   "URI": "https://asc.fasb.org/extlink&oid=126973232&loc=SL123496189-112644",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r404": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "18",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "505",
   "URI": "https://asc.fasb.org/extlink&oid=126973232&loc=SL123496189-112644",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r405": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "18",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "505",
   "URI": "https://asc.fasb.org/extlink&oid=126973232&loc=SL123496189-112644",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r406": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "505",
   "URI": "https://asc.fasb.org/extlink&oid=126973232&loc=d3e21463-112644",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r407": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.3-04)",
   "Topic": "505",
   "URI": "https://asc.fasb.org/extlink&oid=120397183&loc=d3e187085-122770",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r408": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "606",
   "URI": "https://asc.fasb.org/extlink&oid=126919976&loc=SL49130531-203044",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r409": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "606",
   "URI": "https://asc.fasb.org/extlink&oid=126919976&loc=SL49130532-203044",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r41": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "25",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "230",
   "URI": "https://asc.fasb.org/extlink&oid=126954810&loc=d3e3536-108585",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r410": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "10",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "606",
   "URI": "https://asc.fasb.org/extlink&oid=126920106&loc=SL49130551-203045",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r411": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "12",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "606",
   "URI": "https://asc.fasb.org/extlink&oid=126920106&loc=SL49130554-203045",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r412": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "12",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "606",
   "URI": "https://asc.fasb.org/extlink&oid=126920106&loc=SL49130554-203045",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r413": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "12",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "606",
   "URI": "https://asc.fasb.org/extlink&oid=126920106&loc=SL49130554-203045",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r414": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "12",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "606",
   "URI": "https://asc.fasb.org/extlink&oid=126920106&loc=SL49130554-203045",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r415": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "12",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(e)",
   "Topic": "606",
   "URI": "https://asc.fasb.org/extlink&oid=126920106&loc=SL49130554-203045",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r416": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "12A",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "606",
   "URI": "https://asc.fasb.org/extlink&oid=126920106&loc=SL108322424-203045",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r417": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "606",
   "URI": "https://asc.fasb.org/extlink&oid=126920106&loc=SL49130556-203045",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r418": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)(1)",
   "Topic": "606",
   "URI": "https://asc.fasb.org/extlink&oid=126920106&loc=SL49130556-203045",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r419": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)(2)",
   "Topic": "606",
   "URI": "https://asc.fasb.org/extlink&oid=126920106&loc=SL49130556-203045",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r42": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "25",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "https://asc.fasb.org/extlink&oid=126954810&loc=d3e3536-108585",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r420": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "15",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "606",
   "URI": "https://asc.fasb.org/extlink&oid=126920106&loc=SL49130558-203045",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r421": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "17",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "606",
   "URI": "https://asc.fasb.org/extlink&oid=126920106&loc=SL49130561-203045",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r422": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "18",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "606",
   "URI": "https://asc.fasb.org/extlink&oid=126920106&loc=SL49130563-203045",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r423": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "18",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "606",
   "URI": "https://asc.fasb.org/extlink&oid=126920106&loc=SL49130563-203045",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r424": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "19",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "606",
   "URI": "https://asc.fasb.org/extlink&oid=126920106&loc=SL49130564-203045",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r425": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "20",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "606",
   "URI": "https://asc.fasb.org/extlink&oid=126920106&loc=SL49130566-203045",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r426": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "20",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "606",
   "URI": "https://asc.fasb.org/extlink&oid=126920106&loc=SL49130566-203045",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r427": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "20",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "606",
   "URI": "https://asc.fasb.org/extlink&oid=126920106&loc=SL49130566-203045",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r428": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "20",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "606",
   "URI": "https://asc.fasb.org/extlink&oid=126920106&loc=SL49130566-203045",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r429": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "606",
   "URI": "https://asc.fasb.org/extlink&oid=126920106&loc=SL49130543-203045",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r43": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "28",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "230",
   "URI": "https://asc.fasb.org/extlink&oid=126954810&loc=d3e3602-108585",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r430": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "606",
   "URI": "https://asc.fasb.org/extlink&oid=126920106&loc=SL49130543-203045",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r431": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "606",
   "URI": "https://asc.fasb.org/extlink&oid=126920106&loc=SL49130545-203045",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r432": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "606",
   "URI": "https://asc.fasb.org/extlink&oid=126920106&loc=SL49130549-203045",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r433": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "606",
   "URI": "https://asc.fasb.org/extlink&oid=126920106&loc=SL49130549-203045",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r434": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "9",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "606",
   "URI": "https://asc.fasb.org/extlink&oid=126920106&loc=SL49130550-203045",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r435": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "606",
   "URI": "https://asc.fasb.org/topic&trid=49130388",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r436": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(d)(i)",
   "Topic": "715",
   "URI": "https://asc.fasb.org/extlink&oid=123447040&loc=d3e1928-114920",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r437": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(d)(iii)",
   "Topic": "715",
   "URI": "https://asc.fasb.org/extlink&oid=123447040&loc=d3e1928-114920",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r438": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(d)(iv)(01)",
   "Topic": "715",
   "URI": "https://asc.fasb.org/extlink&oid=123447040&loc=d3e1928-114920",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r439": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(d)(iv)(02)",
   "Topic": "715",
   "URI": "https://asc.fasb.org/extlink&oid=123447040&loc=d3e1928-114920",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r44": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "28",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "230",
   "URI": "https://asc.fasb.org/extlink&oid=126954810&loc=d3e3602-108585",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r440": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(d)(iv)(02)(A)",
   "Topic": "715",
   "URI": "https://asc.fasb.org/extlink&oid=123447040&loc=d3e1928-114920",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r441": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(d)(iv)(02)(B)",
   "Topic": "715",
   "URI": "https://asc.fasb.org/extlink&oid=123447040&loc=d3e1928-114920",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r442": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(d)(iv)(02)(C)",
   "Topic": "715",
   "URI": "https://asc.fasb.org/extlink&oid=123447040&loc=d3e1928-114920",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r443": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(d)(iv)(03)",
   "Topic": "715",
   "URI": "https://asc.fasb.org/extlink&oid=123447040&loc=d3e1928-114920",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r444": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(k)",
   "Topic": "715",
   "URI": "https://asc.fasb.org/extlink&oid=123447040&loc=d3e1928-114920",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r445": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(l)",
   "Topic": "715",
   "URI": "https://asc.fasb.org/extlink&oid=123447040&loc=d3e1928-114920",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r446": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(n)",
   "Topic": "715",
   "URI": "https://asc.fasb.org/extlink&oid=123447040&loc=d3e1928-114920",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r447": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(o)",
   "Topic": "715",
   "URI": "https://asc.fasb.org/extlink&oid=123447040&loc=d3e1928-114920",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r448": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(p)",
   "Topic": "715",
   "URI": "https://asc.fasb.org/extlink&oid=123447040&loc=d3e1928-114920",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r449": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(q)",
   "Topic": "715",
   "URI": "https://asc.fasb.org/extlink&oid=123447040&loc=d3e1928-114920",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r45": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "28",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "https://asc.fasb.org/extlink&oid=126954810&loc=d3e3602-108585",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r450": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(r)(1)",
   "Topic": "715",
   "URI": "https://asc.fasb.org/extlink&oid=123447040&loc=d3e1928-114920",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r451": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(r)(2)",
   "Topic": "715",
   "URI": "https://asc.fasb.org/extlink&oid=123447040&loc=d3e1928-114920",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r452": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "20",
   "Topic": "715",
   "URI": "https://asc.fasb.org/extlink&oid=21916913&loc=d3e273930-122802",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r453": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "60",
   "Subparagraph": "(c)",
   "Topic": "715",
   "URI": "https://asc.fasb.org/extlink&oid=6414203&loc=d3e39689-114964",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r454": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "70",
   "Topic": "715",
   "URI": "https://asc.fasb.org/extlink&oid=49170846&loc=d3e28014-114942",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r455": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "80",
   "Subparagraph": "(d)",
   "Topic": "715",
   "URI": "https://asc.fasb.org/extlink&oid=65877416&loc=SL14450657-114947",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r456": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "80",
   "Subparagraph": "(f)(3)",
   "Topic": "715",
   "URI": "https://asc.fasb.org/extlink&oid=65877416&loc=SL14450657-114947",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r457": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "715",
   "URI": "https://asc.fasb.org/topic&trid=2235017",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r458": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1D",
   "Publisher": "FASB",
   "Section": "35",
   "SubTopic": "10",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=126961718&loc=SL116886442-113899",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r459": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "35",
   "SubTopic": "10",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=126961718&loc=d3e4534-113899",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r46": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "https://asc.fasb.org/extlink&oid=126954810&loc=d3e3044-108585",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r460": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "35",
   "SubTopic": "10",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=126961718&loc=d3e4549-113899",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r461": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r462": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)(1)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r463": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)(2)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r464": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)(3)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r465": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r466": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)(1)(i)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r467": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)(1)(ii)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r468": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)(1)(iii)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r469": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)(1)(iv)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r47": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "https://asc.fasb.org/extlink&oid=126999549&loc=d3e4273-108586",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r470": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)(1)(iv)(01)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r471": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)(1)(iv)(02)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r472": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)(1)(iv)(03)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r473": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)(1)(iv)(04)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r474": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)(2)(i)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r475": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)(2)(ii)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r476": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)(2)(iii)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r477": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)(2)(iii)(01)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r478": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)(2)(iii)(02)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r479": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)(2)(iii)(03)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r48": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "https://asc.fasb.org/extlink&oid=126999549&loc=d3e4297-108586",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r480": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(d)(1)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r481": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(d)(2)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r482": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(e)(1)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r483": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(e)(2)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r484": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(f)(1)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r485": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(f)(2)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r486": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(f)(2)(i)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r487": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(f)(2)(ii)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r488": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(f)(2)(iii)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r489": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(f)(2)(iv)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r49": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "https://asc.fasb.org/extlink&oid=126999549&loc=d3e4304-108586",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r490": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(f)(2)(v)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r491": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(h)(1)(i)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r492": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(h)(2)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r493": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(h)(2)(i)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r494": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(i)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r495": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(l)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r496": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "15",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "10",
   "Subparagraph": "(e)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128097895&loc=SL121327923-165333",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r497": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "15",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "10",
   "Subparagraph": "(f)(1)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128097895&loc=SL121327923-165333",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r498": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "15",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "10",
   "Subparagraph": "(f)(2)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128097895&loc=SL121327923-165333",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r499": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SAB Topic 14.D.2.Q6)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=122041274&loc=d3e301413-122809",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r5": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(28))",
   "Topic": "210",
   "URI": "https://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r50": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "https://asc.fasb.org/extlink&oid=126999549&loc=d3e4313-108586",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r500": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "718",
   "URI": "https://asc.fasb.org/topic&trid=2228938",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r501": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "35",
   "Subparagraph": "(a)",
   "Topic": "720",
   "URI": "https://asc.fasb.org/extlink&oid=6420018&loc=d3e36677-107848",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r502": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "35",
   "Subparagraph": "(b)",
   "Topic": "720",
   "URI": "https://asc.fasb.org/extlink&oid=6420018&loc=d3e36677-107848",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r503": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "10B",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "740",
   "URI": "https://asc.fasb.org/extlink&oid=123427490&loc=SL37586934-109318",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r504": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "25",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "740",
   "URI": "https://asc.fasb.org/extlink&oid=123427490&loc=d3e32247-109318",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r505": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "28",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "740",
   "URI": "https://asc.fasb.org/extlink&oid=123427490&loc=d3e32280-109318",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r506": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "10",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "740",
   "URI": "https://asc.fasb.org/extlink&oid=121826272&loc=d3e32672-109319",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r507": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "12",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "740",
   "URI": "https://asc.fasb.org/extlink&oid=121826272&loc=d3e32687-109319",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r508": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "14",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "740",
   "URI": "https://asc.fasb.org/extlink&oid=121826272&loc=d3e32705-109319",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r509": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "15",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "740",
   "URI": "https://asc.fasb.org/extlink&oid=121826272&loc=d3e32718-109319",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r51": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "https://asc.fasb.org/extlink&oid=126999549&loc=d3e4332-108586",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r510": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "15A",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "740",
   "URI": "https://asc.fasb.org/extlink&oid=121826272&loc=SL6600010-109319",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r511": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "15A",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)(1)",
   "Topic": "740",
   "URI": "https://asc.fasb.org/extlink&oid=121826272&loc=SL6600010-109319",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r512": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "15A",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)(2)",
   "Topic": "740",
   "URI": "https://asc.fasb.org/extlink&oid=121826272&loc=SL6600010-109319",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r513": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "15A",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "740",
   "URI": "https://asc.fasb.org/extlink&oid=121826272&loc=SL6600010-109319",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r514": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "17",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "740",
   "URI": "https://asc.fasb.org/extlink&oid=121826272&loc=d3e32809-109319",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r515": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "19",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "740",
   "URI": "https://asc.fasb.org/extlink&oid=121826272&loc=d3e32840-109319",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r516": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "740",
   "URI": "https://asc.fasb.org/extlink&oid=121826272&loc=d3e32537-109319",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r517": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "740",
   "URI": "https://asc.fasb.org/extlink&oid=121826272&loc=d3e32537-109319",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r518": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "740",
   "URI": "https://asc.fasb.org/extlink&oid=121826272&loc=d3e32537-109319",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r519": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "740",
   "URI": "https://asc.fasb.org/extlink&oid=121826272&loc=d3e32537-109319",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r52": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "https://asc.fasb.org/extlink&oid=126999549&loc=SL98516268-108586",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r520": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "20",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "740",
   "URI": "https://asc.fasb.org/extlink&oid=121826272&loc=d3e32847-109319",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r521": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "21",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "740",
   "URI": "https://asc.fasb.org/extlink&oid=121826272&loc=d3e32857-109319",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r522": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "9",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "740",
   "URI": "https://asc.fasb.org/extlink&oid=121826272&loc=d3e32639-109319",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r523": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "9",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "740",
   "URI": "https://asc.fasb.org/extlink&oid=121826272&loc=d3e32639-109319",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r524": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "9",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "740",
   "URI": "https://asc.fasb.org/extlink&oid=121826272&loc=d3e32639-109319",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r525": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "10",
   "Subparagraph": "(d)(2)",
   "Topic": "740",
   "URI": "https://asc.fasb.org/extlink&oid=126983759&loc=SL121830611-158277",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r526": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "10",
   "Subparagraph": "(d)(3)",
   "Topic": "740",
   "URI": "https://asc.fasb.org/extlink&oid=126983759&loc=SL121830611-158277",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r527": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SAB TOPIC 6.I.5.Q1)",
   "Topic": "740",
   "URI": "https://asc.fasb.org/extlink&oid=122134291&loc=d3e330036-122817",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r528": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SAB TOPIC 6.I.7)",
   "Topic": "740",
   "URI": "https://asc.fasb.org/extlink&oid=122134291&loc=d3e330036-122817",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r529": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SAB Topic 6.I.Fact.1)",
   "Topic": "740",
   "URI": "https://asc.fasb.org/extlink&oid=122134291&loc=d3e330036-122817",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r53": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "235",
   "URI": "https://asc.fasb.org/topic&trid=2122369",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r530": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SAB Topic 6.I.Fact.2)",
   "Topic": "740",
   "URI": "https://asc.fasb.org/extlink&oid=122134291&loc=d3e330036-122817",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r531": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SAB Topic 6.I.Fact.3)",
   "Topic": "740",
   "URI": "https://asc.fasb.org/extlink&oid=122134291&loc=d3e330036-122817",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r532": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SAB Topic 11.C)",
   "Topic": "740",
   "URI": "https://asc.fasb.org/extlink&oid=122134291&loc=d3e330215-122817",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r533": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "20",
   "Subparagraph": "(a)",
   "Topic": "740",
   "URI": "https://asc.fasb.org/extlink&oid=123586238&loc=d3e38679-109324",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r534": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "270",
   "Topic": "740",
   "URI": "https://asc.fasb.org/extlink&oid=6424409&loc=d3e44925-109338",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r535": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "30",
   "Subparagraph": "(a)",
   "Topic": "740",
   "URI": "https://asc.fasb.org/extlink&oid=6424122&loc=d3e41874-109331",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r536": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "740",
   "URI": "https://asc.fasb.org/topic&trid=2144680",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r537": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "808",
   "URI": "https://asc.fasb.org/extlink&oid=126928961&loc=SL5834089-161433",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r538": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "808",
   "URI": "https://asc.fasb.org/extlink&oid=6931272&loc=SL5834143-161434",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r539": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "808",
   "URI": "https://asc.fasb.org/extlink&oid=6931272&loc=SL5834143-161434",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r54": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "250",
   "URI": "https://asc.fasb.org/topic&trid=2122394",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r540": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "808",
   "URI": "https://asc.fasb.org/topic&trid=5833765",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r541": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "25",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "810",
   "URI": "https://asc.fasb.org/extlink&oid=116870748&loc=SL6758485-165988",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r542": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "25",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "810",
   "URI": "https://asc.fasb.org/extlink&oid=116870748&loc=SL6758485-165988",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r543": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(bb)",
   "Topic": "810",
   "URI": "https://asc.fasb.org/extlink&oid=123419778&loc=d3e5710-111685",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r544": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "810",
   "URI": "https://asc.fasb.org/extlink&oid=123419778&loc=d3e5710-111685",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r545": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "6",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "40",
   "Subparagraph": "(a)",
   "Topic": "815",
   "URI": "https://asc.fasb.org/extlink&oid=126731327&loc=SL126733271-114008",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r546": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "40",
   "Subparagraph": "(e)(3)",
   "Topic": "815",
   "URI": "https://asc.fasb.org/extlink&oid=126732423&loc=SL123482106-238011",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r547": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "40",
   "Subparagraph": "(e)(4)",
   "Topic": "815",
   "URI": "https://asc.fasb.org/extlink&oid=126732423&loc=SL123482106-238011",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r548": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "40",
   "Subparagraph": "(f)",
   "Topic": "815",
   "URI": "https://asc.fasb.org/extlink&oid=126732423&loc=SL123482106-238011",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r549": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "820",
   "URI": "https://asc.fasb.org/extlink&oid=126976982&loc=d3e19207-110258",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r55": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "260",
   "URI": "https://asc.fasb.org/extlink&oid=124432515&loc=d3e3550-109257",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r550": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "820",
   "URI": "https://asc.fasb.org/extlink&oid=126976982&loc=d3e19207-110258",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r551": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "820",
   "URI": "https://asc.fasb.org/extlink&oid=126976982&loc=d3e19279-110258",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r552": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "28",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(f)",
   "Topic": "825",
   "URI": "https://asc.fasb.org/extlink&oid=123596393&loc=d3e14064-108612",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r553": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "17",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "30",
   "Topic": "830",
   "URI": "https://asc.fasb.org/extlink&oid=118261656&loc=d3e32136-110900",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r554": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "20",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "30",
   "Subparagraph": "(a)",
   "Topic": "830",
   "URI": "https://asc.fasb.org/extlink&oid=118261656&loc=d3e32211-110900",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r555": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "20",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "30",
   "Subparagraph": "(b)",
   "Topic": "830",
   "URI": "https://asc.fasb.org/extlink&oid=118261656&loc=d3e32211-110900",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r556": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "20",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "30",
   "Subparagraph": "(c)",
   "Topic": "830",
   "URI": "https://asc.fasb.org/extlink&oid=118261656&loc=d3e32211-110900",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r557": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "20",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "30",
   "Subparagraph": "(d)",
   "Topic": "830",
   "URI": "https://asc.fasb.org/extlink&oid=118261656&loc=d3e32211-110900",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r558": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "30",
   "Topic": "830",
   "URI": "https://asc.fasb.org/extlink&oid=6450520&loc=d3e32583-110901",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r559": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "30",
   "Topic": "830",
   "URI": "https://asc.fasb.org/extlink&oid=6450520&loc=d3e32618-110901",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r56": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "16",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "275",
   "URI": "https://asc.fasb.org/extlink&oid=99393423&loc=d3e6327-108592",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r560": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "830",
   "URI": "https://asc.fasb.org/topic&trid=2175825",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r561": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "20",
   "Subparagraph": "(a)",
   "Topic": "842",
   "URI": "https://asc.fasb.org/extlink&oid=123391704&loc=SL77918627-209977",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r562": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "20",
   "Subparagraph": "(b)",
   "Topic": "842",
   "URI": "https://asc.fasb.org/extlink&oid=123391704&loc=SL77918627-209977",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r563": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "20",
   "Subparagraph": "(a)",
   "Topic": "842",
   "URI": "https://asc.fasb.org/extlink&oid=123391704&loc=SL77918638-209977",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r564": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "20",
   "Subparagraph": "(a)",
   "Topic": "842",
   "URI": "https://asc.fasb.org/extlink&oid=123391704&loc=SL77918643-209977",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r565": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "20",
   "Subparagraph": "(b)",
   "Topic": "842",
   "URI": "https://asc.fasb.org/extlink&oid=123391704&loc=SL77918643-209977",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r566": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "20",
   "Subparagraph": "(c)",
   "Topic": "842",
   "URI": "https://asc.fasb.org/extlink&oid=123391704&loc=SL77918643-209977",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r567": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(b)",
   "Topic": "842",
   "URI": "https://asc.fasb.org/extlink&oid=128292326&loc=SL77918666-209980",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r568": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(a)",
   "Topic": "842",
   "URI": "https://asc.fasb.org/extlink&oid=128292326&loc=SL77918686-209980",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r569": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(b)",
   "Topic": "842",
   "URI": "https://asc.fasb.org/extlink&oid=128292326&loc=SL77918686-209980",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r57": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "18",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "275",
   "URI": "https://asc.fasb.org/extlink&oid=99393423&loc=d3e6351-108592",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r570": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(c)",
   "Topic": "842",
   "URI": "https://asc.fasb.org/extlink&oid=128292326&loc=SL77918686-209980",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r571": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(e)",
   "Topic": "842",
   "URI": "https://asc.fasb.org/extlink&oid=128292326&loc=SL77918686-209980",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r572": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(g)(1)",
   "Topic": "842",
   "URI": "https://asc.fasb.org/extlink&oid=128292326&loc=SL77918686-209980",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r573": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(g)(2)",
   "Topic": "842",
   "URI": "https://asc.fasb.org/extlink&oid=128292326&loc=SL77918686-209980",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r574": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(g)(3)",
   "Topic": "842",
   "URI": "https://asc.fasb.org/extlink&oid=128292326&loc=SL77918686-209980",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r575": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(g)(4)",
   "Topic": "842",
   "URI": "https://asc.fasb.org/extlink&oid=128292326&loc=SL77918686-209980",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r576": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "842",
   "URI": "https://asc.fasb.org/extlink&oid=128292326&loc=SL77918686-209980",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r577": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "6",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "842",
   "URI": "https://asc.fasb.org/extlink&oid=128292326&loc=SL77918701-209980",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r578": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "10",
   "Subparagraph": "(a)(3)(iii)(03)",
   "Topic": "848",
   "URI": "https://asc.fasb.org/extlink&oid=125980421&loc=SL125981372-237846",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r579": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "850",
   "URI": "https://asc.fasb.org/extlink&oid=6457730&loc=d3e39549-107864",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r58": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "18",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "275",
   "URI": "https://asc.fasb.org/extlink&oid=99393423&loc=d3e6351-108592",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r580": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "850",
   "URI": "https://asc.fasb.org/extlink&oid=6457730&loc=d3e39549-107864",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r581": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "850",
   "URI": "https://asc.fasb.org/extlink&oid=6457730&loc=d3e39549-107864",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r582": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "850",
   "URI": "https://asc.fasb.org/extlink&oid=6457730&loc=d3e39549-107864",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r583": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "6",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "850",
   "URI": "https://asc.fasb.org/extlink&oid=6457730&loc=d3e39691-107864",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r584": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "850",
   "URI": "https://asc.fasb.org/topic&trid=2122745",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r585": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "855",
   "URI": "https://asc.fasb.org/extlink&oid=6842918&loc=SL6314017-165662",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r586": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "855",
   "URI": "https://asc.fasb.org/extlink&oid=6842918&loc=SL6314017-165662",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r587": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "855",
   "URI": "https://asc.fasb.org/topic&trid=2122774",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r588": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(bb)(1)",
   "Topic": "860",
   "URI": "https://asc.fasb.org/extlink&oid=121570589&loc=d3e107207-111719",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r589": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(bb)(2)",
   "Topic": "860",
   "URI": "https://asc.fasb.org/extlink&oid=121570589&loc=d3e107207-111719",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r59": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "20",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "275",
   "URI": "https://asc.fasb.org/extlink&oid=99393423&loc=d3e6404-108592",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r590": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(bb)(3)",
   "Topic": "860",
   "URI": "https://asc.fasb.org/extlink&oid=121570589&loc=d3e107207-111719",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r591": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(c)(1)",
   "Topic": "860",
   "URI": "https://asc.fasb.org/extlink&oid=121570589&loc=d3e107207-111719",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r592": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "6",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "910",
   "URI": "https://asc.fasb.org/extlink&oid=126937589&loc=SL119991595-234733",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r593": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "11",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "310",
   "Subparagraph": "(b)",
   "Topic": "912",
   "URI": "https://asc.fasb.org/extlink&oid=126938201&loc=d3e55415-109406",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r594": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "330",
   "Topic": "912",
   "URI": "https://asc.fasb.org/extlink&oid=6471895&loc=d3e55923-109411",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r595": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SAB Topic 11.L)",
   "Topic": "924",
   "URI": "https://asc.fasb.org/extlink&oid=6472922&loc=d3e499488-122856",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r596": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "15",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "235",
   "Subparagraph": "(a)",
   "Topic": "932",
   "URI": "https://asc.fasb.org/extlink&oid=126939881&loc=d3e61929-109447",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r597": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "15",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "235",
   "Subparagraph": "(b)",
   "Topic": "932",
   "URI": "https://asc.fasb.org/extlink&oid=126939881&loc=d3e61929-109447",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r598": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "20",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "235",
   "Subparagraph": "(a)",
   "Topic": "932",
   "URI": "https://asc.fasb.org/extlink&oid=126939881&loc=d3e62059-109447",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r599": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "20",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "235",
   "Subparagraph": "(b)",
   "Topic": "932",
   "URI": "https://asc.fasb.org/extlink&oid=126939881&loc=d3e62059-109447",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r6": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(29))",
   "Topic": "210",
   "URI": "https://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r60": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "21",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "275",
   "URI": "https://asc.fasb.org/extlink&oid=99393423&loc=d3e6442-108592",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r600": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "28",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "235",
   "Subparagraph": "(a)",
   "Topic": "932",
   "URI": "https://asc.fasb.org/extlink&oid=126939881&loc=d3e62395-109447",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r601": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "28",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "235",
   "Subparagraph": "(b)",
   "Topic": "932",
   "URI": "https://asc.fasb.org/extlink&oid=126939881&loc=d3e62395-109447",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r602": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "33",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "235",
   "Subparagraph": "(a)",
   "Topic": "932",
   "URI": "https://asc.fasb.org/extlink&oid=126939881&loc=d3e62479-109447",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r603": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "33",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "235",
   "Subparagraph": "(b)",
   "Topic": "932",
   "URI": "https://asc.fasb.org/extlink&oid=126939881&loc=d3e62479-109447",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r604": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "35A",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "235",
   "Subparagraph": "(a)",
   "Topic": "932",
   "URI": "https://asc.fasb.org/extlink&oid=126939881&loc=SL6807758-109447",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r605": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "35A",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "235",
   "Subparagraph": "(b)",
   "Topic": "932",
   "URI": "https://asc.fasb.org/extlink&oid=126939881&loc=SL6807758-109447",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r606": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "235",
   "Subparagraph": "(c)(1)",
   "Topic": "932",
   "URI": "https://asc.fasb.org/extlink&oid=126939881&loc=d3e61872-109447",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r607": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "235",
   "Subparagraph": "(c)(2)",
   "Topic": "932",
   "URI": "https://asc.fasb.org/extlink&oid=126939881&loc=d3e61872-109447",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r608": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.9-03(10)(1))",
   "Topic": "942",
   "URI": "https://asc.fasb.org/extlink&oid=126897435&loc=d3e534808-122878",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r609": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.9-03(6))",
   "Topic": "942",
   "URI": "https://asc.fasb.org/extlink&oid=126897435&loc=d3e534808-122878",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r61": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "275",
   "URI": "https://asc.fasb.org/extlink&oid=99393423&loc=d3e6061-108592",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r610": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "220",
   "Subparagraph": "(SX 210.9-04(11))",
   "Topic": "942",
   "URI": "https://asc.fasb.org/extlink&oid=120399700&loc=SL114874048-224260",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r611": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "220",
   "Subparagraph": "(SX 210.9-04(27))",
   "Topic": "942",
   "URI": "https://asc.fasb.org/extlink&oid=120399700&loc=SL114874048-224260",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r612": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "235",
   "Subparagraph": "(SX 210.9-05(b)(2))",
   "Topic": "942",
   "URI": "https://asc.fasb.org/extlink&oid=120399901&loc=d3e537907-122884",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r613": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "360",
   "Topic": "942",
   "URI": "https://asc.fasb.org/extlink&oid=124429447&loc=SL124453093-239630",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r614": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.7-03(5))",
   "Topic": "944",
   "URI": "https://asc.fasb.org/extlink&oid=126734703&loc=d3e572229-122910",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r615": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "220",
   "Subparagraph": "(SX 210.7-04(23))",
   "Topic": "944",
   "URI": "https://asc.fasb.org/extlink&oid=120400993&loc=SL114874131-224263",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r616": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "220",
   "Subparagraph": "(SX 210.7-04(9))",
   "Topic": "944",
   "URI": "https://asc.fasb.org/extlink&oid=120400993&loc=SL114874131-224263",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r617": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "7A",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "40",
   "Subparagraph": "(d)",
   "Topic": "944",
   "URI": "https://asc.fasb.org/extlink&oid=124506351&loc=SL117782755-158439",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r618": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "40",
   "Subparagraph": "(e)",
   "Topic": "944",
   "URI": "https://asc.fasb.org/extlink&oid=124501264&loc=SL117420844-207641",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r619": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "40",
   "Subparagraph": "(f)(1)",
   "Topic": "944",
   "URI": "https://asc.fasb.org/extlink&oid=124501264&loc=SL117420844-207641",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r62": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "275",
   "URI": "https://asc.fasb.org/extlink&oid=99393423&loc=d3e6132-108592",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r620": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "40",
   "Subparagraph": "(f)(2)",
   "Topic": "944",
   "URI": "https://asc.fasb.org/extlink&oid=124501264&loc=SL117420844-207641",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r621": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "40",
   "Subparagraph": "(g)(2)(i)",
   "Topic": "944",
   "URI": "https://asc.fasb.org/extlink&oid=124501264&loc=SL117420844-207641",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r622": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "40",
   "Subparagraph": "(h)(2)",
   "Topic": "944",
   "URI": "https://asc.fasb.org/extlink&oid=124501264&loc=SL117420844-207641",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r623": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1B",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "825",
   "Topic": "944",
   "URI": "https://asc.fasb.org/extlink&oid=123600520&loc=SL75241803-196195",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r624": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "20",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "210",
   "Topic": "946",
   "URI": "https://asc.fasb.org/extlink&oid=118262064&loc=SL116631418-115840",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r625": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "21",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "210",
   "Topic": "946",
   "URI": "https://asc.fasb.org/extlink&oid=118262064&loc=SL116631419-115840",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r626": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "320",
   "Subparagraph": "(SX 210.12-12B(Column B)(Footnote 6))",
   "Topic": "946",
   "URI": "https://asc.fasb.org/extlink&oid=122147990&loc=d3e611197-123010",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r627": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "320",
   "Subparagraph": "(SX 210.12-12B(Column B))",
   "Topic": "946",
   "URI": "https://asc.fasb.org/extlink&oid=122147990&loc=d3e611197-123010",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r628": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "320",
   "Subparagraph": "(SX 210.12-12B(Column C)(Footnote 6))",
   "Topic": "946",
   "URI": "https://asc.fasb.org/extlink&oid=122147990&loc=d3e611197-123010",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r629": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "320",
   "Subparagraph": "(SX 210.12-12B(Column D)(Footnote 6))",
   "Topic": "946",
   "URI": "https://asc.fasb.org/extlink&oid=122147990&loc=d3e611197-123010",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r63": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "9",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "275",
   "URI": "https://asc.fasb.org/extlink&oid=99393423&loc=d3e6143-108592",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r630": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "310",
   "Subparagraph": "(SX 210.12-29(Footnote 4))",
   "Topic": "948",
   "URI": "https://asc.fasb.org/extlink&oid=120402547&loc=d3e617274-123014",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r631": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "210",
   "Topic": "954",
   "URI": "https://asc.fasb.org/extlink&oid=120413173&loc=SL116631458-115580",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r632": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "310",
   "Topic": "954",
   "URI": "https://asc.fasb.org/extlink&oid=126942805&loc=d3e3115-115594",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r633": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "440",
   "Subparagraph": "(a)",
   "Topic": "954",
   "URI": "https://asc.fasb.org/extlink&oid=6491277&loc=d3e6429-115629",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r634": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "360",
   "Subparagraph": "(d)",
   "Topic": "958",
   "URI": "https://asc.fasb.org/extlink&oid=126982197&loc=d3e99779-112916",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r635": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "6",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "360",
   "Topic": "958",
   "URI": "https://asc.fasb.org/extlink&oid=126982197&loc=d3e99893-112916",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r636": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "360",
   "Subparagraph": "(SX 210.12-28(Column B))",
   "Topic": "970",
   "URI": "https://asc.fasb.org/extlink&oid=120402810&loc=d3e638233-123024",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r637": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "360",
   "Subparagraph": "(SX 210.12-28(Column C))",
   "Topic": "970",
   "URI": "https://asc.fasb.org/extlink&oid=120402810&loc=d3e638233-123024",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r638": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "360",
   "Subparagraph": "(SX 210.12-28(Column D))",
   "Topic": "970",
   "URI": "https://asc.fasb.org/extlink&oid=120402810&loc=d3e638233-123024",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r639": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "360",
   "Subparagraph": "(SX 210.12-28(Column E))",
   "Topic": "970",
   "URI": "https://asc.fasb.org/extlink&oid=120402810&loc=d3e638233-123024",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r64": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "275",
   "URI": "https://asc.fasb.org/topic&trid=2134479",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r640": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "360",
   "Subparagraph": "(SX 210.12-28(Column F))",
   "Topic": "970",
   "URI": "https://asc.fasb.org/extlink&oid=120402810&loc=d3e638233-123024",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r641": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "360",
   "Subparagraph": "(SX 210.12-28(Column G))",
   "Topic": "970",
   "URI": "https://asc.fasb.org/extlink&oid=120402810&loc=d3e638233-123024",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r642": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "360",
   "Subparagraph": "(SX 210.12-28(Column H))",
   "Topic": "970",
   "URI": "https://asc.fasb.org/extlink&oid=120402810&loc=d3e638233-123024",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r643": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "360",
   "Subparagraph": "(SX 210.12-28(Column I))",
   "Topic": "970",
   "URI": "https://asc.fasb.org/extlink&oid=120402810&loc=d3e638233-123024",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r644": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "360",
   "Subparagraph": "(SX 210.12-28(Footnote 2))",
   "Topic": "970",
   "URI": "https://asc.fasb.org/extlink&oid=120402810&loc=d3e638233-123024",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r645": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "360",
   "Subparagraph": "(SX 210.12-28(Footnote 4))",
   "Topic": "970",
   "URI": "https://asc.fasb.org/extlink&oid=120402810&loc=d3e638233-123024",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r646": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "360",
   "Subparagraph": "(SX 210.12-28(Footnote 5))",
   "Topic": "970",
   "URI": "https://asc.fasb.org/extlink&oid=120402810&loc=d3e638233-123024",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r647": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "310",
   "Subparagraph": "(c)",
   "Topic": "976",
   "URI": "https://asc.fasb.org/extlink&oid=6497875&loc=d3e22274-108663",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r648": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "310",
   "Subparagraph": "(b)",
   "Topic": "978",
   "URI": "https://asc.fasb.org/extlink&oid=126945304&loc=d3e27327-108691",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r649": {
   "Name": "Regulation S-K (SK)",
   "Number": "229",
   "Paragraph": "(a)",
   "Publisher": "SEC",
   "Section": "1402",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r65": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "22",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "280",
   "URI": "https://asc.fasb.org/extlink&oid=126901519&loc=d3e8736-108599",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r650": {
   "Name": "Regulation S-K (SK)",
   "Number": "229",
   "Paragraph": "(a)",
   "Publisher": "SEC",
   "Section": "1405",
   "Subparagraph": "(1)",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r651": {
   "Name": "Regulation S-K (SK)",
   "Number": "229",
   "Paragraph": "(a)",
   "Publisher": "SEC",
   "Section": "1405",
   "Subparagraph": "(2)",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r652": {
   "Name": "Regulation S-K (SK)",
   "Number": "229",
   "Paragraph": "(c)",
   "Publisher": "SEC",
   "Section": "1405",
   "role": "http://www.xbrl.org/2003/role/disclosureRef"
  },
  "r653": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "210",
   "URI": "https://asc.fasb.org/extlink&oid=124098289&loc=d3e6676-107765",
   "role": "http://www.xbrl.org/2003/role/exampleRef"
  },
  "r654": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "210",
   "URI": "https://asc.fasb.org/extlink&oid=124098289&loc=d3e6676-107765",
   "role": "http://www.xbrl.org/2003/role/exampleRef"
  },
  "r655": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "16",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "20",
   "Topic": "210",
   "URI": "https://asc.fasb.org/extlink&oid=99393222&loc=SL20226024-175313",
   "role": "http://www.xbrl.org/2003/role/exampleRef"
  },
  "r656": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "21",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "20",
   "Topic": "210",
   "URI": "https://asc.fasb.org/extlink&oid=99393222&loc=SL20226049-175313",
   "role": "http://www.xbrl.org/2003/role/exampleRef"
  },
  "r657": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "22",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "20",
   "Topic": "210",
   "URI": "https://asc.fasb.org/extlink&oid=99393222&loc=SL20226052-175313",
   "role": "http://www.xbrl.org/2003/role/exampleRef"
  },
  "r658": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "235",
   "URI": "https://asc.fasb.org/extlink&oid=126899994&loc=d3e18823-107790",
   "role": "http://www.xbrl.org/2003/role/exampleRef"
  },
  "r659": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(e)",
   "Topic": "235",
   "URI": "https://asc.fasb.org/extlink&oid=126899994&loc=d3e18823-107790",
   "role": "http://www.xbrl.org/2003/role/exampleRef"
  },
  "r66": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "25",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "280",
   "URI": "https://asc.fasb.org/extlink&oid=126901519&loc=d3e8813-108599",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r660": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "52",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "10",
   "Topic": "260",
   "URI": "https://asc.fasb.org/extlink&oid=128363288&loc=d3e4984-109258",
   "role": "http://www.xbrl.org/2003/role/exampleRef"
  },
  "r661": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "30",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "280",
   "URI": "https://asc.fasb.org/extlink&oid=126901519&loc=d3e8906-108599",
   "role": "http://www.xbrl.org/2003/role/exampleRef"
  },
  "r662": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "31",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "280",
   "URI": "https://asc.fasb.org/extlink&oid=126901519&loc=d3e8924-108599",
   "role": "http://www.xbrl.org/2003/role/exampleRef"
  },
  "r663": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "9",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "310",
   "URI": "https://asc.fasb.org/extlink&oid=124259787&loc=d3e4531-111522",
   "role": "http://www.xbrl.org/2003/role/exampleRef"
  },
  "r664": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "79",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "20",
   "Topic": "326",
   "URI": "https://asc.fasb.org/extlink&oid=124267575&loc=SL82922352-210448",
   "role": "http://www.xbrl.org/2003/role/exampleRef"
  },
  "r665": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "80",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "20",
   "Topic": "326",
   "URI": "https://asc.fasb.org/extlink&oid=124267575&loc=SL82922355-210448",
   "role": "http://www.xbrl.org/2003/role/exampleRef"
  },
  "r666": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "24",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "20",
   "Topic": "350",
   "URI": "https://asc.fasb.org/extlink&oid=122137925&loc=d3e14258-109268",
   "role": "http://www.xbrl.org/2003/role/exampleRef"
  },
  "r667": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)(1)",
   "Topic": "420",
   "URI": "https://asc.fasb.org/extlink&oid=6394359&loc=d3e17939-110869",
   "role": "http://www.xbrl.org/2003/role/exampleRef"
  },
  "r668": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)(2)",
   "Topic": "420",
   "URI": "https://asc.fasb.org/extlink&oid=6394359&loc=d3e17939-110869",
   "role": "http://www.xbrl.org/2003/role/exampleRef"
  },
  "r669": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SAB Topic 5.P.4(b)(1))",
   "Topic": "420",
   "URI": "https://asc.fasb.org/extlink&oid=115931487&loc=d3e140904-122747",
   "role": "http://www.xbrl.org/2003/role/exampleRef"
  },
  "r67": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "30",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "280",
   "URI": "https://asc.fasb.org/extlink&oid=126901519&loc=d3e8906-108599",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r670": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SAB Topic 5.P.4(b)(2))",
   "Topic": "420",
   "URI": "https://asc.fasb.org/extlink&oid=115931487&loc=d3e140904-122747",
   "role": "http://www.xbrl.org/2003/role/exampleRef"
  },
  "r671": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1B",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(d)",
   "Topic": "470",
   "URI": "https://asc.fasb.org/extlink&oid=123466505&loc=SL123495323-112611",
   "role": "http://www.xbrl.org/2003/role/exampleRef"
  },
  "r672": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "69B",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "20",
   "Topic": "470",
   "URI": "https://asc.fasb.org/extlink&oid=123466577&loc=SL123495735-112612",
   "role": "http://www.xbrl.org/2003/role/exampleRef"
  },
  "r673": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "69C",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "20",
   "Topic": "470",
   "URI": "https://asc.fasb.org/extlink&oid=123466577&loc=SL123495737-112612",
   "role": "http://www.xbrl.org/2003/role/exampleRef"
  },
  "r674": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "69E",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "20",
   "Topic": "470",
   "URI": "https://asc.fasb.org/extlink&oid=123466577&loc=SL123495743-112612",
   "role": "http://www.xbrl.org/2003/role/exampleRef"
  },
  "r675": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "69F",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "20",
   "Topic": "470",
   "URI": "https://asc.fasb.org/extlink&oid=123466577&loc=SL123495745-112612",
   "role": "http://www.xbrl.org/2003/role/exampleRef"
  },
  "r676": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "505",
   "URI": "https://asc.fasb.org/extlink&oid=126973232&loc=SL123496158-112644",
   "role": "http://www.xbrl.org/2003/role/exampleRef"
  },
  "r677": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "10",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "606",
   "URI": "https://asc.fasb.org/extlink&oid=126920106&loc=SL49130551-203045",
   "role": "http://www.xbrl.org/2003/role/exampleRef"
  },
  "r678": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "10",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "606",
   "URI": "https://asc.fasb.org/extlink&oid=126920106&loc=SL49130551-203045",
   "role": "http://www.xbrl.org/2003/role/exampleRef"
  },
  "r679": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "91",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "606",
   "URI": "https://asc.fasb.org/extlink&oid=126920602&loc=SL49130690-203046-203046",
   "role": "http://www.xbrl.org/2003/role/exampleRef"
  },
  "r68": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "30",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "280",
   "URI": "https://asc.fasb.org/extlink&oid=126901519&loc=d3e8906-108599",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r680": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "91",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "606",
   "URI": "https://asc.fasb.org/extlink&oid=126920602&loc=SL49130690-203046-203046",
   "role": "http://www.xbrl.org/2003/role/exampleRef"
  },
  "r681": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "91",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "606",
   "URI": "https://asc.fasb.org/extlink&oid=126920602&loc=SL49130690-203046-203046",
   "role": "http://www.xbrl.org/2003/role/exampleRef"
  },
  "r682": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "91",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "606",
   "URI": "https://asc.fasb.org/extlink&oid=126920602&loc=SL49130690-203046-203046",
   "role": "http://www.xbrl.org/2003/role/exampleRef"
  },
  "r683": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "91",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "10",
   "Subparagraph": "(e)",
   "Topic": "606",
   "URI": "https://asc.fasb.org/extlink&oid=126920602&loc=SL49130690-203046-203046",
   "role": "http://www.xbrl.org/2003/role/exampleRef"
  },
  "r684": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "91",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "10",
   "Subparagraph": "(f)",
   "Topic": "606",
   "URI": "https://asc.fasb.org/extlink&oid=126920602&loc=SL49130690-203046-203046",
   "role": "http://www.xbrl.org/2003/role/exampleRef"
  },
  "r685": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "91",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "10",
   "Subparagraph": "(g)",
   "Topic": "606",
   "URI": "https://asc.fasb.org/extlink&oid=126920602&loc=SL49130690-203046-203046",
   "role": "http://www.xbrl.org/2003/role/exampleRef"
  },
  "r686": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(d)(ii)",
   "Topic": "715",
   "URI": "https://asc.fasb.org/extlink&oid=123447040&loc=d3e1928-114920",
   "role": "http://www.xbrl.org/2003/role/exampleRef"
  },
  "r687": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(d)(iv)(01)",
   "Topic": "715",
   "URI": "https://asc.fasb.org/extlink&oid=123447040&loc=d3e1928-114920",
   "role": "http://www.xbrl.org/2003/role/exampleRef"
  },
  "r688": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "17",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "20",
   "Topic": "715",
   "URI": "https://asc.fasb.org/extlink&oid=123450688&loc=d3e4179-114921",
   "role": "http://www.xbrl.org/2003/role/exampleRef"
  },
  "r689": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "80",
   "Topic": "715",
   "URI": "https://asc.fasb.org/extlink&oid=35742348&loc=SL14450788-114948",
   "role": "http://www.xbrl.org/2003/role/exampleRef"
  },
  "r69": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "31",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "280",
   "URI": "https://asc.fasb.org/extlink&oid=126901519&loc=d3e8924-108599",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r690": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)(1)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2003/role/exampleRef"
  },
  "r691": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)(2)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2003/role/exampleRef"
  },
  "r692": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)(3)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2003/role/exampleRef"
  },
  "r693": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "217",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "10",
   "Topic": "740",
   "URI": "https://asc.fasb.org/extlink&oid=126976462&loc=d3e36027-109320",
   "role": "http://www.xbrl.org/2003/role/exampleRef"
  },
  "r694": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "53",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "20",
   "Topic": "842",
   "URI": "https://asc.fasb.org/extlink&oid=123414884&loc=SL77918982-209971",
   "role": "http://www.xbrl.org/2003/role/exampleRef"
  },
  "r695": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "10",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "10",
   "Topic": "852",
   "URI": "https://asc.fasb.org/extlink&oid=84165509&loc=d3e56426-112766",
   "role": "http://www.xbrl.org/2003/role/exampleRef"
  },
  "r696": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13H",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "40",
   "Subparagraph": "(a)",
   "Topic": "944",
   "URI": "https://asc.fasb.org/extlink&oid=126561865&loc=SL117783719-158441",
   "role": "http://www.xbrl.org/2003/role/exampleRef"
  },
  "r697": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13H",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "40",
   "Subparagraph": "(b)",
   "Topic": "944",
   "URI": "https://asc.fasb.org/extlink&oid=126561865&loc=SL117783719-158441",
   "role": "http://www.xbrl.org/2003/role/exampleRef"
  },
  "r698": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "29F",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "40",
   "Topic": "944",
   "URI": "https://asc.fasb.org/extlink&oid=126561865&loc=SL117819544-158441",
   "role": "http://www.xbrl.org/2003/role/exampleRef"
  },
  "r699": {
   "Name": "Exchange Act",
   "Number": "240",
   "Publisher": "SEC",
   "Section": "12",
   "Subsection": "b",
   "role": "http://www.xbrl.org/2003/role/presentationRef"
  },
  "r7": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(30)(a)(1))",
   "Topic": "210",
   "URI": "https://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r70": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "280",
   "URI": "https://asc.fasb.org/extlink&oid=126901519&loc=d3e8475-108599",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r700": {
   "Name": "Exchange Act",
   "Number": "240",
   "Publisher": "SEC",
   "Section": "12",
   "Subsection": "b-2",
   "role": "http://www.xbrl.org/2003/role/presentationRef"
  },
  "r701": {
   "Name": "Exchange Act",
   "Number": "240",
   "Publisher": "SEC",
   "Section": "12",
   "Subsection": "b-23",
   "role": "http://www.xbrl.org/2003/role/presentationRef"
  },
  "r702": {
   "Name": "Exchange Act",
   "Number": "240",
   "Publisher": "SEC",
   "Section": "12",
   "Subsection": "d1-1",
   "role": "http://www.xbrl.org/2003/role/presentationRef"
  },
  "r703": {
   "Name": "Form 10-K",
   "Number": "249",
   "Publisher": "SEC",
   "Section": "310",
   "role": "http://www.xbrl.org/2003/role/presentationRef"
  },
  "r704": {
   "Name": "Form 20-F",
   "Number": "249",
   "Publisher": "SEC",
   "Section": "220",
   "Subsection": "f",
   "role": "http://www.xbrl.org/2003/role/presentationRef"
  },
  "r705": {
   "Name": "Form 40-F",
   "Number": "249",
   "Publisher": "SEC",
   "Section": "240",
   "Subsection": "f",
   "role": "http://www.xbrl.org/2003/role/presentationRef"
  },
  "r706": {
   "Name": "Forms 10-K, 10-Q, 20-F",
   "Number": "240",
   "Publisher": "SEC",
   "Section": "13",
   "Subsection": "a-1",
   "role": "http://www.xbrl.org/2003/role/presentationRef"
  },
  "r707": {
   "Name": "Regulation S-T",
   "Number": "232",
   "Publisher": "SEC",
   "Section": "405",
   "role": "http://www.xbrl.org/2003/role/presentationRef"
  },
  "r708": {
   "Name": "Securities Act",
   "Number": "230",
   "Publisher": "SEC",
   "Section": "405",
   "role": "http://www.xbrl.org/2003/role/presentationRef"
  },
  "r709": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "272",
   "URI": "https://asc.fasb.org/extlink&oid=125520817&loc=d3e70229-108054",
   "role": "http://www.xbrl.org/2003/role/recommendedDisclosureRef"
  },
  "r71": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "41",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "280",
   "URI": "https://asc.fasb.org/extlink&oid=126901519&loc=d3e9038-108599",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r710": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "10",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "450",
   "URI": "https://asc.fasb.org/extlink&oid=121557415&loc=d3e14615-108349",
   "role": "http://www.xbrl.org/2003/role/recommendedDisclosureRef"
  },
  "r711": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "855",
   "URI": "https://asc.fasb.org/extlink&oid=6842918&loc=SL6314020-165662",
   "role": "http://www.xbrl.org/2003/role/recommendedDisclosureRef"
  },
  "r712": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(1))",
   "Topic": "210",
   "URI": "https://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r713": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(17))",
   "Topic": "210",
   "URI": "https://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r714": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(27)(b))",
   "Topic": "210",
   "URI": "https://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r715": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(28))",
   "Topic": "210",
   "URI": "https://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r716": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(6)(a)(1))",
   "Topic": "210",
   "URI": "https://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r717": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(6)(a)(3))",
   "Topic": "210",
   "URI": "https://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r718": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(6)(a)(4))",
   "Topic": "210",
   "URI": "https://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r719": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(6))",
   "Topic": "210",
   "URI": "https://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r72": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "11B",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "310",
   "URI": "https://asc.fasb.org/extlink&oid=123577603&loc=SL6953423-111524",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r720": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(9))",
   "Topic": "210",
   "URI": "https://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r721": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "210",
   "URI": "https://asc.fasb.org/topic&trid=2122208",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r722": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "28",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "230",
   "URI": "https://asc.fasb.org/extlink&oid=126954810&loc=d3e3602-108585",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r723": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "8",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "230",
   "URI": "https://asc.fasb.org/extlink&oid=126999549&loc=SL98516268-108586",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r724": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.4-08(d))",
   "Topic": "235",
   "URI": "https://asc.fasb.org/extlink&oid=120395691&loc=d3e23780-122690",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r725": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.4-08(g)(1)(ii))",
   "Topic": "235",
   "URI": "https://asc.fasb.org/extlink&oid=120395691&loc=d3e23780-122690",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r726": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.4-08(h)(1)(Note 1))",
   "Topic": "235",
   "URI": "https://asc.fasb.org/extlink&oid=120395691&loc=d3e23780-122690",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r727": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.4-08(k)(1))",
   "Topic": "235",
   "URI": "https://asc.fasb.org/extlink&oid=120395691&loc=d3e23780-122690",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r728": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "23",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "250",
   "URI": "https://asc.fasb.org/extlink&oid=124436220&loc=d3e21914-107793",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r729": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "24",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "250",
   "URI": "https://asc.fasb.org/extlink&oid=124436220&loc=d3e21930-107793",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r73": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "7",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "310",
   "URI": "https://asc.fasb.org/extlink&oid=123577603&loc=d3e5111-111524",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r730": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "250",
   "URI": "https://asc.fasb.org/extlink&oid=124436220&loc=d3e21711-107793",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r731": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "250",
   "URI": "https://asc.fasb.org/extlink&oid=124431687&loc=d3e22595-107794",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r732": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "55",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "260",
   "URI": "https://asc.fasb.org/extlink&oid=126958026&loc=d3e2626-109256",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r733": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "260",
   "URI": "https://asc.fasb.org/extlink&oid=124432515&loc=d3e3550-109257",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r734": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "18",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "275",
   "URI": "https://asc.fasb.org/extlink&oid=99393423&loc=d3e6351-108592",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r735": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "18",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "275",
   "URI": "https://asc.fasb.org/extlink&oid=99393423&loc=d3e6351-108592",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r736": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "18",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "280",
   "URI": "https://asc.fasb.org/extlink&oid=126901519&loc=d3e8672-108599",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r737": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "30",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "280",
   "URI": "https://asc.fasb.org/extlink&oid=126901519&loc=d3e8906-108599",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r738": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "321",
   "URI": "https://asc.fasb.org/extlink&oid=126980263&loc=SL75117539-209714",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r739": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "321",
   "URI": "https://asc.fasb.org/extlink&oid=126980263&loc=SL75117539-209714",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r74": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "7A",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "310",
   "URI": "https://asc.fasb.org/extlink&oid=123577603&loc=SL6953401-111524",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r740": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "321",
   "URI": "https://asc.fasb.org/extlink&oid=126980263&loc=SL75117539-209714",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r741": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "323",
   "URI": "https://asc.fasb.org/extlink&oid=114001798&loc=d3e33918-111571",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r742": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "20",
   "Topic": "326",
   "URI": "https://asc.fasb.org/extlink&oid=124255206&loc=SL82895884-210446",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r743": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "326",
   "URI": "https://asc.fasb.org/extlink&oid=124255953&loc=SL82919249-210447",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r744": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "14",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "326",
   "URI": "https://asc.fasb.org/extlink&oid=124255953&loc=SL82919253-210447",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r745": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(a)",
   "Topic": "350",
   "URI": "https://asc.fasb.org/extlink&oid=121556970&loc=d3e13816-109267",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r746": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(h)",
   "Topic": "350",
   "URI": "https://asc.fasb.org/extlink&oid=121556970&loc=d3e13816-109267",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r747": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "10",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "30",
   "Subparagraph": "(c)",
   "Topic": "410",
   "URI": "https://asc.fasb.org/extlink&oid=6393242&loc=d3e13237-110859",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r748": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "420",
   "URI": "https://asc.fasb.org/extlink&oid=109237686&loc=d3e17752-110868",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r749": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(a)",
   "Topic": "450",
   "URI": "https://asc.fasb.org/extlink&oid=121557415&loc=d3e14435-108349",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r75": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "9",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "310",
   "URI": "https://asc.fasb.org/extlink&oid=123577603&loc=d3e5144-111524",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r750": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "9",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(a)",
   "Topic": "450",
   "URI": "https://asc.fasb.org/extlink&oid=121557415&loc=d3e14557-108349",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r751": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "9",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(b)",
   "Topic": "450",
   "URI": "https://asc.fasb.org/extlink&oid=121557415&loc=d3e14557-108349",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r752": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "20",
   "Subparagraph": "(SAB Topic 5.Y.Q2)",
   "Topic": "450",
   "URI": "https://asc.fasb.org/extlink&oid=27011672&loc=d3e149879-122751",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r753": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "450",
   "URI": "https://asc.fasb.org/topic&trid=2127136",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r754": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1A",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.13-01(a)(4)(ii))",
   "Topic": "470",
   "URI": "https://asc.fasb.org/extlink&oid=126975872&loc=SL124442526-122756",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r755": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1A",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.13-01(a)(4)(iii))",
   "Topic": "470",
   "URI": "https://asc.fasb.org/extlink&oid=126975872&loc=SL124442526-122756",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r756": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1B",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(d)",
   "Topic": "470",
   "URI": "https://asc.fasb.org/extlink&oid=123466505&loc=SL123495323-112611",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r757": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "505",
   "URI": "https://asc.fasb.org/extlink&oid=126973232&loc=d3e21463-112644",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r758": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "606",
   "URI": "https://asc.fasb.org/extlink&oid=126919976&loc=SL49130531-203044",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r759": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "606",
   "URI": "https://asc.fasb.org/extlink&oid=126919976&loc=SL49130533-203044",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r76": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SAB Topic 4.E)",
   "Topic": "310",
   "URI": "https://asc.fasb.org/extlink&oid=122038336&loc=d3e74512-122707",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r760": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "10",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "606",
   "URI": "https://asc.fasb.org/extlink&oid=126920106&loc=SL49130551-203045",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r761": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)(1)",
   "Topic": "606",
   "URI": "https://asc.fasb.org/extlink&oid=126920106&loc=SL49130556-203045",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r762": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "5",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "606",
   "URI": "https://asc.fasb.org/extlink&oid=126920106&loc=SL49130545-203045",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r763": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "91",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "606",
   "URI": "https://asc.fasb.org/extlink&oid=126920602&loc=SL49130690-203046-203046",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r764": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(d)(ii)",
   "Topic": "715",
   "URI": "https://asc.fasb.org/extlink&oid=123447040&loc=d3e1928-114920",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r765": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(n)",
   "Topic": "715",
   "URI": "https://asc.fasb.org/extlink&oid=123447040&loc=d3e1928-114920",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r766": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)(1)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r767": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)(2)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r768": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)(3)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r769": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)(1)(i)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r77": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(aa)",
   "Topic": "320",
   "URI": "https://asc.fasb.org/extlink&oid=126970911&loc=d3e27161-111563",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r770": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)(1)(ii)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r771": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)(1)(iii)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r772": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)(1)(iv)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r773": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)(1)(iv)(01)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r774": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)(1)(iv)(02)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r775": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)(1)(iv)(03)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r776": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)(1)(iv)(04)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r777": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)(2)(i)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r778": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)(2)(ii)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r779": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)(2)(iii)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r78": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "320",
   "URI": "https://asc.fasb.org/extlink&oid=126970911&loc=d3e27161-111563",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r780": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)(2)(iii)(01)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r781": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)(2)(iii)(02)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r782": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)(2)(iii)(03)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r783": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(d)(1)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r784": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(d)(2)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r785": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(e)(1)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r786": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(e)(2)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r787": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(f)(2)(i)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r788": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(f)(2)(ii)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r789": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(f)(2)(iii)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r79": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SAB TOPIC 5.BB)",
   "Topic": "330",
   "URI": "https://asc.fasb.org/extlink&oid=27011343&loc=d3e100047-122729",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r790": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(f)(2)(iv)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r791": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(f)(2)(v)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r792": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(i)",
   "Topic": "718",
   "URI": "https://asc.fasb.org/extlink&oid=128089324&loc=d3e5070-113901",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r793": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "12",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "740",
   "URI": "https://asc.fasb.org/extlink&oid=121826272&loc=d3e32687-109319",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r794": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "15A",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "740",
   "URI": "https://asc.fasb.org/extlink&oid=121826272&loc=SL6600010-109319",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r795": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "740",
   "URI": "https://asc.fasb.org/extlink&oid=121826272&loc=d3e32537-109319",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r796": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "6",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "740",
   "URI": "https://asc.fasb.org/extlink&oid=121826272&loc=d3e32621-109319",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r797": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "9",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "740",
   "URI": "https://asc.fasb.org/extlink&oid=121826272&loc=d3e32639-109319",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r798": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "9",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "740",
   "URI": "https://asc.fasb.org/extlink&oid=121826272&loc=d3e32639-109319",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r799": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SAB Topic 6.I.7)",
   "Topic": "740",
   "URI": "https://asc.fasb.org/extlink&oid=122134291&loc=d3e330036-122817",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r8": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(30)(a)(3))",
   "Topic": "210",
   "URI": "https://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r80": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "350",
   "URI": "https://asc.fasb.org/extlink&oid=121556970&loc=d3e13816-109267",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r800": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "808",
   "URI": "https://asc.fasb.org/extlink&oid=6931272&loc=SL5834143-161434",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r801": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "808",
   "URI": "https://asc.fasb.org/extlink&oid=6931272&loc=SL5834143-161434",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r802": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "65",
   "SubTopic": "40",
   "Subparagraph": "(e)(3)",
   "Topic": "815",
   "URI": "https://asc.fasb.org/extlink&oid=126732423&loc=SL123482106-238011",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r803": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "28",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(f)",
   "Topic": "825",
   "URI": "https://asc.fasb.org/extlink&oid=123596393&loc=d3e14064-108612",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r804": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(a)(3)",
   "Topic": "842",
   "URI": "https://asc.fasb.org/extlink&oid=128292326&loc=SL77918673-209980",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r805": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(b)",
   "Topic": "842",
   "URI": "https://asc.fasb.org/extlink&oid=128292326&loc=SL77918673-209980",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r806": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "842",
   "URI": "https://asc.fasb.org/extlink&oid=128292326&loc=SL77918686-209980",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r807": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "6",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Topic": "842",
   "URI": "https://asc.fasb.org/extlink&oid=128292326&loc=SL77918701-209980",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r808": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "850",
   "URI": "https://asc.fasb.org/extlink&oid=6457730&loc=d3e39549-107864",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r809": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(d)",
   "Topic": "850",
   "URI": "https://asc.fasb.org/extlink&oid=6457730&loc=d3e39549-107864",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r81": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "05",
   "SubTopic": "10",
   "Topic": "360",
   "URI": "https://asc.fasb.org/extlink&oid=109226317&loc=d3e202-110218",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r810": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "850",
   "URI": "https://asc.fasb.org/extlink&oid=6457730&loc=d3e39603-107864",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r811": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "7",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "852",
   "URI": "https://asc.fasb.org/extlink&oid=124433192&loc=SL2890621-112765",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r812": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "7",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "852",
   "URI": "https://asc.fasb.org/extlink&oid=124433192&loc=SL2890621-112765",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r813": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(c)(1)",
   "Topic": "860",
   "URI": "https://asc.fasb.org/extlink&oid=121570589&loc=d3e107207-111719",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r814": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(c)(2)",
   "Topic": "860",
   "URI": "https://asc.fasb.org/extlink&oid=121570589&loc=d3e107207-111719",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r815": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(c)(3)",
   "Topic": "860",
   "URI": "https://asc.fasb.org/extlink&oid=121570589&loc=d3e107207-111719",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r816": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(b)(1)",
   "Topic": "860",
   "URI": "https://asc.fasb.org/extlink&oid=121570589&loc=d3e107314-111719",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r817": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(b)(2)",
   "Topic": "860",
   "URI": "https://asc.fasb.org/extlink&oid=121570589&loc=d3e107314-111719",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r818": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "20",
   "Subparagraph": "(b)(3)",
   "Topic": "860",
   "URI": "https://asc.fasb.org/extlink&oid=121570589&loc=d3e107314-111719",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r819": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "25",
   "SubTopic": "730",
   "Topic": "912",
   "URI": "https://asc.fasb.org/extlink&oid=6472174&loc=d3e58812-109433",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r82": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "360",
   "URI": "https://asc.fasb.org/extlink&oid=126905981&loc=d3e2420-110228",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r820": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.9-03(1)(a))",
   "Topic": "942",
   "URI": "https://asc.fasb.org/extlink&oid=126897435&loc=d3e534808-122878",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r821": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "210",
   "Subparagraph": "(SX 210.7-03(a)(2))",
   "Topic": "944",
   "URI": "https://asc.fasb.org/extlink&oid=126734703&loc=d3e572229-122910",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r822": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "220",
   "Subparagraph": "(SX 210.7-04(3)(b))",
   "Topic": "944",
   "URI": "https://asc.fasb.org/extlink&oid=120400993&loc=SL114874131-224263",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r823": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4H",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "40",
   "Topic": "944",
   "URI": "https://asc.fasb.org/extlink&oid=116884468&loc=SL65671331-158438",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r824": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13H",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "40",
   "Subparagraph": "(c)",
   "Topic": "944",
   "URI": "https://asc.fasb.org/extlink&oid=126561865&loc=SL117783719-158441",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r825": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1B",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "825",
   "Topic": "944",
   "URI": "https://asc.fasb.org/extlink&oid=123600520&loc=SL75241803-196195",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r826": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "360",
   "Subparagraph": "(SX 210.12-28(Column B))",
   "Topic": "970",
   "URI": "https://asc.fasb.org/extlink&oid=120402810&loc=d3e638233-123024",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r827": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "360",
   "Subparagraph": "(SX 210.12-28(Column C))",
   "Topic": "970",
   "URI": "https://asc.fasb.org/extlink&oid=120402810&loc=d3e638233-123024",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r828": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "360",
   "Subparagraph": "(SX 210.12-28(Column D))",
   "Topic": "970",
   "URI": "https://asc.fasb.org/extlink&oid=120402810&loc=d3e638233-123024",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r829": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "360",
   "Subparagraph": "(SX 210.12-28(Column E))",
   "Topic": "970",
   "URI": "https://asc.fasb.org/extlink&oid=120402810&loc=d3e638233-123024",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r83": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "360",
   "URI": "https://asc.fasb.org/extlink&oid=6391035&loc=d3e2868-110229",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r830": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "360",
   "Subparagraph": "(SX 210.12-28(Column F))",
   "Topic": "970",
   "URI": "https://asc.fasb.org/extlink&oid=120402810&loc=d3e638233-123024",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r831": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "360",
   "Subparagraph": "(SX 210.12-28(Column G))",
   "Topic": "970",
   "URI": "https://asc.fasb.org/extlink&oid=120402810&loc=d3e638233-123024",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r832": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "360",
   "Subparagraph": "(SX 210.12-28(Column H))",
   "Topic": "970",
   "URI": "https://asc.fasb.org/extlink&oid=120402810&loc=d3e638233-123024",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r833": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "360",
   "Subparagraph": "(SX 210.12-28(Column I))",
   "Topic": "970",
   "URI": "https://asc.fasb.org/extlink&oid=120402810&loc=d3e638233-123024",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r834": {
   "Name": "Regulation S-K (SK)",
   "Number": "229",
   "Paragraph": "(a)",
   "Publisher": "SEC",
   "Section": "1404",
   "role": "http://www.xbrl.org/2009/role/commonPracticeRef"
  },
  "r84": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "360",
   "URI": "https://asc.fasb.org/extlink&oid=6391035&loc=d3e2868-110229",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r85": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "360",
   "URI": "https://asc.fasb.org/extlink&oid=6391035&loc=d3e2868-110229",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r86": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "360",
   "URI": "https://asc.fasb.org/extlink&oid=6391035&loc=d3e2868-110229",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r87": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Subparagraph": "(b)",
   "Topic": "360",
   "URI": "https://asc.fasb.org/extlink&oid=109226691&loc=d3e2921-110230",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r88": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SAB Topic 5.CC)",
   "Topic": "360",
   "URI": "https://asc.fasb.org/extlink&oid=27011434&loc=d3e125687-122742",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r89": {
   "Name": "Accounting Standards Codification",
   "Publisher": "FASB",
   "Topic": "440",
   "URI": "https://asc.fasb.org/topic&trid=2144648",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r9": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(SX 210.5-02(30))",
   "Topic": "210",
   "URI": "https://asc.fasb.org/extlink&oid=120391452&loc=d3e13212-122682",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r90": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "4",
   "Publisher": "FASB",
   "Section": "15",
   "SubTopic": "10",
   "Subparagraph": "(c)",
   "Topic": "460",
   "URI": "https://asc.fasb.org/extlink&oid=126907419&loc=d3e10037-110241",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r91": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "460",
   "URI": "https://asc.fasb.org/extlink&oid=124440162&loc=d3e12021-110248",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r92": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "460",
   "URI": "https://asc.fasb.org/extlink&oid=124440162&loc=d3e12053-110248",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r93": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "13",
   "Publisher": "FASB",
   "Section": "55",
   "SubTopic": "10",
   "Subparagraph": "(a)",
   "Topic": "460",
   "URI": "https://asc.fasb.org/extlink&oid=126907907&loc=d3e13051-110250",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r94": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "10",
   "Publisher": "FASB",
   "Section": "25",
   "SubTopic": "20",
   "Topic": "470",
   "URI": "https://asc.fasb.org/extlink&oid=123466302&loc=d3e4852-112606",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r95": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "1",
   "Publisher": "FASB",
   "Section": "S99",
   "SubTopic": "10",
   "Subparagraph": "(CFRR 211.02)",
   "Topic": "480",
   "URI": "https://asc.fasb.org/extlink&oid=122040564&loc=d3e177068-122764",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r96": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "45",
   "SubTopic": "10",
   "Topic": "505",
   "URI": "https://asc.fasb.org/extlink&oid=65888546&loc=d3e21300-112643",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r97": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "10",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "505",
   "URI": "https://asc.fasb.org/extlink&oid=126973232&loc=d3e21553-112644",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r98": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "2",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "505",
   "URI": "https://asc.fasb.org/extlink&oid=126973232&loc=d3e21463-112644",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  },
  "r99": {
   "Name": "Accounting Standards Codification",
   "Paragraph": "3",
   "Publisher": "FASB",
   "Section": "50",
   "SubTopic": "10",
   "Topic": "505",
   "URI": "https://asc.fasb.org/extlink&oid=126973232&loc=d3e21475-112644",
   "role": "http://fasb.org/us-gaap/role/ref/legacyRef"
  }
 },
 "version": "2.2"
}
