🔍

ContractScan Smart Contract Scanner

AI Contract Risk Analysis · Negotiation Advice · One-stop Decision Support

Please enter your email to continue

⚠️ All uploaded data will be automatically destroyed within 24 hours
23:59:59
🔍 AI Contract Risk Analysis

Don't Sign First and Regret Later

AI Contract Risk Scanner — Scan for Fatal Traps Before Signing

Upload contract PDF/Word/Excel/PPT/images or select a Demo below to try — AI scans every clause, flags high-risk traps, and generates negotiation priorities. Specially designed for Hong Kong trading companies and manufacturers, targeting common traps in Chinese supplier contracts.

📤

Drag & Drop Contract File to Upload

Supports PDF · Word · Excel · PPT · JPG · PNG · TXT

— Loaded, AI analyzing...
🤖 AI scanning contract...

🎯 Or select a contract Demo below to try:

🏭 Supply AgreementHigh Risk
🌍 Distribution AgreementMedium Risk
🛡️ OEM AgreementLow Risk
🔒 NDA AgreementMedium Risk
🏗️ Manufacturing AgreementHigh Risk
🤝 Agency AgreementMedium Risk

🤖 AI is analyzing contract...

📄 Parsing Contract Structure 🎯 Flagging Key Clauses ⚖️ Comparing Industry Standards 🪤 Detecting Hidden Traps 📊 Generating Risk Report

📊 AI Risk Scan Report

📈 Risk Category Breakdown

By Financial · Legal · Operational · IP Categories

⚠️ Clause-by-Clause Risk Analysis

Original Clause + Risk Explanation + Revision Suggestion

🥊 Negotiation Priority

AI sorted by Risk Severity × Business Impact × Negotiation Difficulty

💡 Common Pitfalls in Chinese Supplier Contracts

Below are the most common fatal clauses summarized after analyzing over a thousand China-Hong Kong trade contracts — a must-read before signing

⚠️
All uploaded files and analysis results will be permanently deleted from the server within 24 hours.
Please download and save the report yourself. If you need to use it again, please re-upload.
'+riskLabel+''+riskText+''+ '

'+(json.overallRisk==='high'?'⚠️':json.overallRisk==='med'?'⚠️':'✅ ')+' Overall Risk Rating: '+riskText+'

'+ '

'+json.contractType+' · '+json.parties+'

'+ '
'+ '
'+json.highCount+'
🔴 High-Risk Clauses
'+ '
'+json.medCount+'
🟡 Medium-Risk Clauses
'+ '
'+json.lowCount+'
🟢 Low-Risk Clauses
'+ '
'; // Summary document.getElementById('summaryCard').innerHTML= '
⚠️

Risk Summary

'+ '
'+json.summary+'
💰 Estimated Financial Exposure: '+json.financialExposure+'
'; // Categories var catHTML=''; (json.categories || []).forEach(function(c){ catHTML+='
'+c.icon+'

'+c.name+'

'+c.highCount+' High · '+c.medCount+' Med

'+c.desc+'

'; }); document.getElementById('catGrid').innerHTML=catHTML; // Clauses var clauseHTML=''; (json.clauses || []).forEach(function(c){ clauseHTML+= '
'+ '
'+c.ref+''+riskBadge(c.level)+'
'+ '
📄 Original Clause"'+c.originalText.replace(/"/g,'"')+'"
'+ '
💡'+c.explanation+'
'+ '
✅ Suggested Revision
'+c.revision+'
'+ '
'; }); document.getElementById('clauseCards').innerHTML=clauseHTML; // Priorities var priHTML=''; (json.priorities || []).forEach(function(p){ priHTML+= '
'+p.rank+'
'+ '
'+p.title+'
'+p.reason+'
'+ ''+(p.level==='must'?'🥊 Must Fix — No contract without revision':p.level==='should'?'🤝 Should Fix — Strive to resolve':'✅ Nice to Fix — Acceptable compromise')+'
'; }); document.getElementById('priorityList').innerHTML=priHTML; // Tips var tipHTML=''; (json.tips || []).forEach(function(t,i){ tipHTML+='
'+(i+1)+'
'+t.title+'
';'+t.desc+'
'; }); document.getElementById('tipList').innerHTML=tipHTML; document.getElementById('results').classList.add('active'); } // ════════════════ FILE UPLOAD HANDLER ════════════════ var _pendingFile=null; function handleFileUpload(files){ if(!files.length)return; var file=files[0]; document.getElementById('fileName').textContent=file.name; document.getElementById('dropZone').classList.add('loaded'); _pendingFile=file; toast('📄 Loaded: '+file.name); // Immediately start AI analysis processUploadedFile(file); } function processUploadedFile(file){ var reader=new FileReader(); var isImage=file.type.startsWith('image/') || /\.(jpg|jpeg|png)$/i.test(file.name); var isText=file.type==='text/plain' || /\.txt$/i.test(file.name); if(isImage){ reader.onload=function(e){ var base64=e.target.result.split(',')[1]; analyzeWithGemini(null,{mimeType:file.type || 'image/png',data:base64}); }; reader.readAsDataURL(file); }else if(isText){ reader.onload=function(e){ analyzeWithGemini(e.target.result,null); }; reader.readAsText(file); }else{ // PDF/DOCX/XLSX/PPTX — try as base64 inline for Gemini reader.onload=function(e){ var base64=e.target.result.split(',')[1]; var mime=file.type || 'application/pdf'; if(/\.docx?$/i.test(file.name))mime='application/vnd.openxmlformats-officedocument.wordprocessingml.document'; if(/\.xlsx?$/i.test(file.name))mime='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'; if(/\.pptx?$/i.test(file.name))mime='application/vnd.openxmlformats-officedocument.presentationml.presentation'; analyzeWithGemini(null,{mimeType:mime,data:base64}); }; reader.readAsDataURL(file); } } // ════════════════ GATE ════════════════ function enterApp(){ var email=document.getElementById('gateEmail').value.trim(); var err=document.getElementById('gateErr'); if(!email || !email.includes('@')){err.textContent='Please enter a valid email';err.style.display='block';return;} err.style.display='none'; document.getElementById('gateOverlay').style.display='none'; document.getElementById('mainApp').classList.add('active'); startCountdown(); localStorage.setItem('cs_gate','true'); toast('✅ Welcome to ContractScan'); } function startCountdown(){ var remaining=24*60*60; var el=document.getElementById('countdown'); setInterval(function(){ remaining--; if(remaining<=0){el.textContent='Expired';return;} el.textContent=String(Math.floor(remaining/3600)).padStart(2,'0')+':'+String(Math.floor((remaining%3600)/60)).padStart(2,'0')+':'+String(remaining%60).padStart(2,'0'); },1000); } function toast(msg){var t=document.getElementById('toast');t.textContent=msg;t.classList.add('show');setTimeout(function(){t.classList.remove('show');},3000);} // ════════════════ DEMO SELECTION ════════════════ var selectedDemo='supply'; function selectDemo(demo,el){ selectedDemo=demo; document.querySelectorAll('.chip').forEach(function(c){c.classList.remove('active');}); el.classList.add('active'); var names={supply:'Supply Agreement',distribution:'Distribution Agreement',oem:'OEM Agreement',nda:'NDA Agreement',manufacturing:'Manufacturing Agreement',agency:'Agency Agreement'}; toast('🎯 Selected: '+names[demo]); } // ════════════════ SCAN ════════════════ function startScan(){ var hasFile=document.getElementById('dropZone').classList.contains('loaded'); if(!hasFile){toast('📤 Please upload a contract file, or select a Demo to try');return;} if(_pendingFile){processUploadedFile(_pendingFile);return;} toast('⚠️ Please re-select the file'); } function startDemoScan(){runScan();} function runScan(){ document.getElementById('results').classList.remove('active'); var progress=document.getElementById('scanProgress'); progress.classList.add('active'); document.getElementById('scanBtn').disabled=true; var stages=document.getElementById('scanStages').querySelectorAll('span'); stages.forEach(function(s){s.classList.remove('done','current');}); var si=0; var stageInterval=setInterval(function(){ if(si>0)stages[si-1].classList.add('done'); if(sistages.length)clearInterval(stageInterval); },600); setTimeout(function(){ clearInterval(stageInterval); stages.forEach(function(s){s.classList.add('done');s.classList.remove('current');}); progress.classList.remove('active'); document.getElementById('scanBtn').disabled=false; if(selectedDemo==='supply')renderSupplyDemo(); else if(selectedDemo==='distribution')renderDistributionDemo(); else if(selectedDemo==='oem')renderOemDemo(); else if(selectedDemo==='nda')renderNDADemo(); else if(selectedDemo==='manufacturing')renderManufacturingDemo(); else if(selectedDemo==='agency')renderAgencyDemo(); document.getElementById('results').classList.add('active'); document.getElementById('results').scrollIntoView({behavior:'smooth',block:'start'}); toast('✅ AI Risk Scan Completed'); },3200); } // ════════════════ HELPERS ════════════════ function riskBadge(level){ var icon=level==='high'?'🔴':level==='med'?'🟡':'🟢'; var label=level==='high'?'High Risk':level==='med'?'Medium Risk':'Low Risk'; return ''+icon+' '+label+''; } // ════════════════════════════════════════ // DEMO 1: SUPPLY AGREEMENT (HIGH RISK) // ════════════════════════════════════════ function renderSupplyDemo(){ document.getElementById('resultContractName').textContent='Contract Type: Supply Agreement — Dongguan Hongli Electronics Co., Ltd.'; document.getElementById('scoreHero').innerHTML= '
HighHigh Risk
'+ '

⚠️ Overall Risk Rating: High Risk

'+ '

Supply Agreement · Dongguan Hongli Electronics Co., Ltd. · Electronic Components OEM Supply

'+ '
'+ '
7
🔴 High-Risk Clauses
'+ '
3
🟡 Medium-Risk Clauses
'+ '
2
🟢 Low-Risk Clauses
'+ '
'; document.getElementById('summaryCard').innerHTML= '
⚠️

Risk Summary

'+ '
This contract contains 7 high-risk clauses, and 3 medium-risk clauses. The three most critical issues: (1) Unlimited Liability Clause forces the buyer to bear all downstream risks, (2) Automatic Renewal Trap locks the buyer in for 3 years and requires 180 days’ prior notice for termination, and (3) Arbitration Venue in Supplier’s City, preventing the buyer from obtaining fair arbitration.
'+ '💰 Estimated Financial Risk Exposure: USD $85,000 – $210,000 (when worst-case scenario is triggered)
'; document.getElementById('catGrid').innerHTML= '
💰

Financial Risk

3 High · 1 Med

Unlimited liability, automatic renewal lock-in, uncapped price adjustment rights — total contract value USD 350,000, worst-case financial exposure can reach 2-3 times.

'+ '

Legal Risk

2 High · 1 Med

Arbitration venue at supplier’s location, governing law is Chinese Contract Law, force majeure clause is too narrow — legal protection is severely insufficient.

'+ '
⚙️

Operational Risk

1 High · 1 Med

No quality standard defined, delivery lead time is "estimated" with no penalties, acceptance criteria determined unilaterally by the supplier.

'+ '
🧠

IP Risk

1 High

Unclear IP ownership of design modifications and tooling provided by the buyer; the supplier can legally manufacture the same product for competitors.

'; document.getElementById('clauseCards').innerHTML= supplyClauses(); document.getElementById('priorityList').innerHTML= supplyPriorities(); document.getElementById('tipList').innerHTML= '
1
"Industry Standard" ≠ Having a Standard
The appearance of "industry standard quality" or "satisfactory quality" in Chinese supplier contracts is almost equivalent to having no quality assurance. It is essential to require references to specific AQL levels (e.g., AQL 2.5), international standards (e.g., ISO 9001), or an approval sample as the quality benchmark.
'+ '
2
Tooling Fee ≠ Tooling Ownership
Many buyers assume that paying the tooling fee means they own the tooling. Under Chinese law, unless the contract explicitly states that tooling ownership belongs to the buyer and the supplier is merely a custodian, the tooling may be deemed the supplier’s asset. A tooling return clause must be included.
'+ '
3
Automatic Renewal = Contract Trap
Automatic renewal clauses are often paired with extremely short notice windows (e.g., deciding on renewal within 6 months of contract commencement), locking the buyer in before fully evaluating the supplier’s performance. Always request the removal of automatic renewal, or at least set the notice period to 30-60 days prior to contract expiration.
'+ '
4
Be Extremely Wary of "Unilateral Adjustment"
Any clause granting the supplier the right to "unilately adjust prices" should be considered a deal-breaker. Price adjustments must be based on objective indices, mutual agreement, capped, and confirmed POs must remain unaffected. Daily fluctuations in the RMB exchange rate are enough to trigger price adjustment clauses in many contracts.
'+ '
5
Force Majeure — The New Normal Post-COVID
Most contract templates before 2020 did not cover pandemics. Ensure your contract's force majeure clause explicitly includes: epidemics/infectious diseases, government lockdowns/power rationing, port closures, and raw material shortages. Also, include a maximum duration limit (e.g., 60 days) and termination rights.
'+ '
6
IP Clauses — Always Assume the Worst-Case Scenario
The most common IP trap in Chinese OEM contracts: "modifications made during production shall be jointly owned". It must be explicitly stated that the IP of the designs provided by the Buyer and any related modifications belongs exclusively to the Buyer, and the supplier shall not use them for any third party. Add an injunctive relief clause to obtain injunction protection.
'+ '
7
Arbitration Venue — Always Choose a Neutral Location
Arbitration in the supplier's home city is extremely disadvantageous to the buyer. The first choice is Hong Kong HKIAC (New York Convention enforcement, bilingual Chinese/English, international arbitrators), and the second choice is Singapore SIAC. If the supplier insists on arbitration in China, consider the CIETAC Hong Kong Arbitration Center.
'+ '
8
Liquidated Damages — Clarify Whether It Is a Penalty or Compensation
Liquidated damages clauses in Chinese contracts are sometimes set extremely high (e.g., 30% of the shortfall amount). Under common law, a penalty clause is unenforceable, but under Chinese law, courts have broad discretion. Ensure that liquidated damages are a genuine pre-estimate of loss, rather than a punitive clause.
'; document.getElementById('results').classList.add('active'); } function supplyClauses(){return''+ '
Clause 12.3 — Limitation of Liability'+riskBadge('high')+'
📄 Original Clause"The Buyer agrees to indemnify and hold harmless the Supplier against any and all claims, losses, damages, liabilities, costs, and expenses (including reasonable attorneys\' fees) arising from or in connection with the products supplied hereunder, regardless of cause, including but not limited to product liability claims, recall costs, and third-party claims. The Buyer waives any right to claim against the Supplier for any indirect, consequential, or incidental damages."
💡Unlimited Liability Clause: This clause shifts all product liability risks entirely to the Buyer — including claims resulting from the supplier's manufacturing defects, product recall costs, and third-party lawsuits. The phrase "regardless of cause" in the clause means that even if the issue stems from the supplier's negligence or intentional acts, the Buyer must still indemnify the supplier. This is an extremely unbalanced clause in international trade, essentially turning the Buyer into a free insurance company for the supplier. If the product is sued by consumers in European or American markets (average product liability lawsuit amount USD 500,000+), the Buyer will bear all costs alone.
✅ Recommended Revision
Change to mutual indemnification with a cap: (1) Delete "regardless of cause" and change it so that each party is responsible for losses caused by its own negligence or breach of contract; (2) The supplier shall bear liability for its manufacturing defects and material defects; (3) Set the liability cap at 150-200% of the contract value; (4) Add a product liability insurance requirement (the supplier must purchase at least USD 2M in product liability insurance and name the Buyer as an additional insured); (5) Third-party claims (end-user claims) should not be subject to the contract liability cap.
'+ '
Clause 16.2 — Term & Auto-Renewal'+riskBadge('high')+'
📄 Original Clause"This Agreement shall have an initial term of one (1) year and shall automatically renew for successive one-year periods unless either party gives written notice of non-renewal at least 180 days prior to the end of the then-current term. During any renewal term, the Buyer shall maintain the minimum purchase volume specified in Schedule A, failing which the Buyer shall pay liquidated damages equal to 30% of the shortfall value."
💡Automatic Renewal Trap + High Liquidated Damages: This clause is extremely cleverly designed—the contract appears to be for a one-year term, but the 180-day prior notice requirement means the Buyer must decide whether to renew only 6 months after the contract takes effect, at which point they may not have even received the first shipment. If the notice window is missed, the contract automatically renews for another year, complete with minimum purchase requirements. Failure to meet the target requires paying 30% of the shortfall as liquidated damages—this penalty could amount to tens of thousands of dollars. This clause locks the Buyer into an unverified supply relationship.
✅ Recommended Revision
(1) Shorten the prior notice period from 180 days to 60 days; (2) Remove the automatic renewal mechanism and change it to renewal by mutual written consent; (3) No minimum purchase quantity for the first year (trial period); (4) If liquidated damages are retained, the amount should be a reasonable estimate of actual loss (could be changed to 10-15% of the shortfall amount), and proof of actual loss must be required.
'+ '
Clause 18.1 — Dispute Resolution & Arbitration'+riskBadge('high')+'
📄 Original Clause"Any dispute arising out of or in connection with this Agreement shall be submitted to the Dongguan Arbitration Commission for arbitration in accordance with its rules. The arbitration shall be conducted in Chinese language only. The arbitral award shall be final and binding upon both parties. Each party shall bear its own costs regardless of outcome. This Agreement shall be governed by the laws of the People\'s Republic of China."
💡Extremely Unfavorable Arbitration Clause: Four fatal issues—(1) The Dongguan Arbitration Commission has a structural advantage for local suppliers, as most arbitrators are former Chinese judges or local lawyers; (2) Conducted in Chinese only, which means high translation costs and potential translation errors affecting the ruling if the Buyer is a Hong Kong or foreign company; (3) Each party bearing its own costs means that even if the Buyer wins, they cannot recover hundreds of thousands of HKD in legal fees; (4) Governed by PRC Contract Law—in Chinese courts/arbitration, certain commercial protections common under common law (such as equitable relief) may not be recognized. Furthermore, enforcing a Dongguan arbitration award in Hong Kong requires going through the Arrangement on Mutual Enforcement of Arbitral Awards between the Mainland and Hong Kong, which is a complex procedure.
✅ Recommended Revision
Strongly recommend changing to the Hong Kong International Arbitration Centre (HKIAC). Reasons: (1) Hong Kong arbitral awards are enforceable in 170+ countries under the New York Convention; (2) Supports bilingual arbitration in Chinese and English; (3) Customarily, the losing party bears the reasonable costs of the winning party; (4) Allows selection of arbitrators familiar with international trade. If the supplier insists on arbitration in China, a compromise would be to accept CIETAC Hong Kong.
'+ '
Clause 5.1(b) — Quality Standards'+riskBadge('high')+'
📄 Original Clause"The Supplier warrants that all products shall be of satisfactory quality and in accordance with generally accepted industry standards. The Buyer\'s sole remedy for any non-conforming products shall be repair or replacement at Supplier\'s discretion within 30 days of delivery. No refunds shall be provided under any circumstances."
💡Quality Standards Completely Blank: "Satisfactory quality" and "generally accepted industry standards" are legally extremely vague and cannot serve as objective criteria in the event of a quality dispute. The supplier can subjectively deem any quality as "satisfactory." More seriously: the Buyer's sole remedy is repair or replacement (at the Supplier's discretion), and refunds are explicitly excluded—meaning that even if the entire batch is defective, the Buyer cannot return the goods to get a refund. The "within 30 days" limit starts from the delivery date, which is not even enough for transoceanic transit time. This is a classic "no returns after sale" clause.
✅ Recommended Revision
(1) Explicitly reference AQL standards (e.g., AQL 2.5 for major defects, AQL 4.0 for minor defects); (2) Add approval sample / golden sample as the quality benchmark; (3) The Buyer has the right to commission a third party (SGS / Bureau Veritas / Intertek) for a pre-shipment inspection before shipping, with costs borne by the Supplier; (4) The Buyer has the right to reject the entire batch and receive a full refund if the defect rate is > 3%; (5) Extend the quality warranty period to 12-18 months after delivery.
'+ '
Clause 7.4 — Price Escalation'+
📄 Original Clause"In the event of any increase in raw material costs, labor costs, or exchange rate fluctuation exceeding 2%, the Supplier may unilaterally adjust the unit price upon 15 days\' written notice. The Buyer shall accept such adjusted price and the adjusted price shall apply to all outstanding orders including those already confirmed."
💡Unilateral Price Increase Right — No Cap, No Objective Benchmark, No Right of Refusal: The 2% trigger threshold is extremely low — daily fluctuations of RMB against USD often exceed this range. The supplier can trigger price increases frequently. Even more fatal, the price increase applies to "confirmed orders," meaning that after you confirm a PO, the supplier can still increase the price before shipment, and you must accept it. This completely subverts the basic function of a contract (locking in prices). The rise in raw material costs lacks objective measurement standards, allowing the supplier to make arbitrary claims.
✅ Recommended Revisions
(1) Price adjustments must be based on objective indices mutually agreed upon in advance (such as LME copper price, Platts plastics index); (2) The trigger threshold should be increased to 5-10%; (3) Adjustments require written consent from both parties and cannot be unilateral; (4) Confirmed POs are not affected by price adjustments; (5) The buyer has the right to cancel the order and receive a full refund if the price increase exceeds 10%; (6) Include a price reduction mechanism — prices should also be adjusted downward when raw material costs decrease.
'+ '
Clause 9.3 — Force Majeure'+riskBadge('med')+'
📄 Original Clause"Neither party shall be liable for failure to perform caused by acts of God, war, fire, or flood. The affected party shall be excused from performance for the duration of such event."
💡Definition of Force Majeure is too narrow: It only lists four extreme situations, completely failing to cover common force majeure events in modern trade — pandemics (COVID-19 has proven its destructive power), government power rationing (which occurred frequently in China during 2021-2022), port closures, raw material shortages, and sanctions/export controls. Furthermore, the clause does not set a maximum duration limit (theoretically, the supplier could delay indefinitely without defaulting), nor does it grant the buyer the right to terminate in the event of prolonged force majeure.
✅ Recommended Revisions
(1) Expand the definition of force majeure to include pandemic/epidemic, government restrictions, port closures, raw material shortage, energy rationing, sanctions/export controls; (2) The affected party must provide written notice within 7 days and provide proof; (3) If force majeure continues for more than 60 days, either party may terminate the contract without liability; (4) Add a mitigation obligation (the affected party must take reasonable measures to reduce the impact).
'+ '
Clause 8.3 — Intellectual Property'+riskBadge('high')+'
📄 Original Clause"All intellectual property rights in any modifications, improvements, or derivative works made to the Buyer\'s designs or specifications during the manufacturing process shall be owned jointly by both parties. The Supplier may freely use such jointly owned IP for any purpose including manufacturing for third parties."
💡IP Trap — Your Design Becomes the Supplier's Asset: This is the most common and dangerous IP clause in Chinese supplier contracts. The supplier will inevitably make minor adjustments to the buyer's design during the manufacturing process (such as modifying dimensions to fit their molds), and these "modifications/improvements" are then defined as "jointly owned." The supplier then obtains the "right to free use" — meaning the supplier can legally use your design and your molds to manufacture the same product for your competitors. "Jointly owned" lacks a clear definition under Chinese law; in practice, whoever controls production controls the IP.
✅ Recommended Revisions
(1) All IP for designs, specifications, and molds provided by the Buyer shall be exclusively owned by the Buyer; (2) Any modifications during the manufacturing process are solely for the purpose of realizing the Buyer's design and shall not generate new IP; (3) If there is indeed substantial innovation, a written agreement between both parties is required to determine ownership and licensing terms; (4) The Supplier shall not use the Buyer's molds or manufacture products based on the Buyer's designs for any third party (non-compete for product); (5) Include injunctive relief clauses.
'+ '
Clause 11.5 — Governing Law'+riskBadge('med')+'
📄 Original Clause"This Agreement shall be governed by and construed in accordance with the laws of the People\'s Republic of China, excluding its conflict of law principles. The United Nations Convention on Contracts for the International Sale of Goods (CISG) is expressly excluded."
💡Governing Law of China + Exclusion of CISG: Chinese contract law differs from common law/international trade practices in many aspects. More notably, the contract explicitly excludes the CISG — the CISG is a set of uniform rules specifically designed for the international sale of goods, and excluding it means the buyer loses a mature, predictable international legal framework. Rules in Chinese contract law regarding breach damages, interest calculation, contract interpretation, etc., may pose unexpected risks to Hong Kong buyers unfamiliar with Chinese law.
✅ Recommended Revision
(1) Add CISG as supplementary governing law to fill the gaps in Chinese contract law regarding international trade; (2) If changed to HKIAC arbitration, Hong Kong law can be chosen as the governing law; (3) Both Chinese and English versions shall have equal legal effect, but in case of conflict, the English version shall prevail (as English is the common language of international trade).
'+ '
Clause 14.2 — Non-Compete'+riskBadge('med')+'
📄 Original Clause"During the term of this Agreement and for a period of five (5) years thereafter, the Buyer shall not directly or indirectly source, manufacture, or sell any products that are similar to or competitive with the products supplied hereunder."
💡Overly Broad Non-Compete Clause: A 5-year term is extremely unreasonable in international trade (industry practice is 1-2 years). The definition of "similar to or competitive with" is too vague — it could cover almost all of the buyer's products. This clause not only restricts the buyer from sourcing from other suppliers, but even restricts the buyer from manufacturing or selling any "similar" products on their own. Such clauses may be ruled invalid as an unreasonable restraint of trade in most jurisdictions, but litigation costs would still be incurred before that.
✅ Recommended Revision
(1) Shorten the non-compete period from 5 years to during the contract term + 12-18 months post-termination; (2) Limit the scope of restriction to specific products manufactured using the supplier's proprietary technology or molds, rather than all similar products; (3) Explicitly clarify that the buyer is not restricted from sourcing similar products from other suppliers (provided that the supplier's IP/molds are not used).
';} function supplyPriorities(){return''+ '
1
Clause 12.3 — Delete Unlimited Liability Clause
This is the most fatal clause in the entire contract. Unlimited liability + "regardless of cause" legally makes you the supplier\'s insurance company. It must be thoroughly rewritten to be mutual and capped.
🥊 Must Fix — No contract without modification
'+ '
2
Clause 7.4 — Remove Unilateral Price Increase Right
The fundamental function of a contract is to lock in prices. The unilateral price increase right makes the contract meaningless — even if you confirm the PO, the supplier can still increase the price before shipment. It must be changed to mutual agreement + objective index + confirmed POs unaffected.
🥊 Must Fix — No contract without modification
'+ '
3
Clause 8.3 — IP Ownership Must Be Explicitly Assigned to Buyer
Your design, your molds, your money — the IP must belong to you. "Jointly owned + free use" is equivalent to giving your trade secrets to the supplier. This clause involves core competitiveness, and there is no room for compromise.
🥊 Must Fix — No contract without modification
'+ '
4
Clause 18.1 — Change Arbitration to Hong Kong HKIAC
The dispute resolution mechanism is the "last line of defense" of a contract. Arbitrating at the supplier\'s location is equivalent to losing before the fight even starts. HKIAC is the most respected arbitration institution in Asia, and this clause is worth fighting hard for.
🥊 Must Fix — No contract without modification
'+ '
5
'
Clause 16.2 — Cancel automatic renewal, shorten notice period
Automatic renewal + minimum purchase quantity + high liquidated damages is a sophisticated lock-in mechanism. The supplier may make concessions because this clause itself is extremely unfair to the buyer.
🤝 Should Fix — Try best to negotiate
'+ '
6
Clause 5.1(b) — Define objective quality standards and acceptance procedures
Suppliers are usually willing to accept AQL standards and third-party inspections, as this is industry practice. Adding pre-shipment inspection has limited impact on the supplier but provides huge protection for the buyer.
🤝 Should Fix — Try best to negotiate
'+ '
7
Clause 14.2 — Rationalize Non-Compete scope and duration
A 5-year global non-compete is unenforceable in most jurisdictions. Shortening the duration to 12-18 months and limiting the scope is usually acceptable to suppliers.
🤝 Should Fix — Try best to negotiate
'+ '
8
Clause 9.3 — Expand the definition of Force Majeure
If the main clauses above have been modified, appropriate concessions can be made on the force majeure clause. However, coverage for epidemics and government actions should at least be added.
✅ Nice to Fix — Acceptable compromise
'+ '
9
Clause 11.5 — Add CISG as supplementary law
If the place of arbitration has been changed to HKIAC, the importance of governing law is relatively reduced. Adding CISG is good, but not a deal-breaker.
✅ Nice to Fix — Acceptable compromise
';} // ════════════════════════════════════════ // DEMO 2: DISTRIBUTION AGREEMENT (MEDIUM RISK) // ════════════════════════════════════════ function renderDistributionDemo(){ document.getElementById('resultContractName').textContent='Contract Type: Distribution Agreement — EuroTrade GmbH (Germany)'; document.getElementById('scoreHero').innerHTML= '
MediumMedium Risk
'+ '

⚠️ Overall Risk Rating: Medium Risk

'+ '

Exclusive Distribution Agreement · EuroTrade GmbH · German Market

'+ '
'+ '
3
🔴 High Risk
'+ '
4
🟡 Medium Risk
'+ '
2
🟢 Low Risk
'+ '
'; document.getElementById('summaryCard').innerHTML= '
📊

Risk Summary

'+ '
This contract contains 3 high-risk clauses and 4 medium-risk clauses. Main issues: (1) EU-wide exclusivity without minimum purchase commitment—the distributor can obtain exclusivity without assuming any obligations, (2) 90-day payment terms put severe pressure on the supplier\'s cash flow, (3) vague termination clauses that may trigger huge statutory compensation under the EU Commercial Agents Directive.
'+ '💰 Estimated financial risk exposure: USD $45,000 – $120,000 (when worst-case scenario is triggered)
'; document.getElementById('catGrid').innerHTML= '
💰

Financial Risk

0 High · 2 Medium

90-day payment terms squeeze cash flow, lack of minimum purchase commitment leads to revenue uncertainty, and post-termination compensation is uncapped.

'+ '
_

Legal Risk

1 High · 1 Medium

The EU Commercial Agents Directive may be mandatorily applicable, the governing law is German law, and the non-compete clause may violate EU competition law.

'+ '
⚙️

Operational Risk

1 High · 1 Medium

Exclusive rights across the EU cannot be effectively managed, vague termination clauses lead to transition period chaos, and inventory buyback obligations are unclear.

'+ '
🧠

IP Intellectual Property Risk

1 High

The distributor is authorized to use trademarks but without quality control clauses — which may damage brand value. Trademark registration and protection obligations in the EU are unclear.

'; document.getElementById('clauseCards').innerHTML= '
Clause 2.1 — Exclusive Territory'+riskBadge('high')+'
📄 Original Clause"The Supplier grants the Distributor the exclusive right to distribute the Products in the European Union and United Kingdom (the \'Territory\'). The Supplier shall not appoint any other distributor in the Territory and shall refer all inquiries from the Territory to the Distributor. This exclusivity is granted without any minimum purchase obligation for the first three years."
💡Unlimited exclusivity, zero obligation: This clause grants exclusive rights for the entire EU + UK market to the distributor, but there is absolutely no minimum purchase requirement for the first three years. The distributor can "monopolize without selling" — occupying market access rights without producing performance. The supplier cannot even directly handle customer inquiries from the region and must refer them to the distributor. If the distributor underperforms, the supplier will completely lose the European market for three years.
✅ Recommended Revision
(1) Add annually increasing minimum purchase volumes (Year 1: USD 100K, Year 2: USD 200K, Year 3: USD 350K); (2) Add a performance review clause — if less than 75% of the minimum purchase volume is met, the exclusivity automatically converts to non-exclusive; (3) The territory can be initially limited to Germany + Austria, and expanded upon good performance; (4) Retain the supplier\'s right to directly serve key accounts.
'+ '
Clause 6.2 — Payment Terms'+riskBadge('med')+'
📄 Original Clause"Payment shall be made within ninety (90) days from the date of the Supplier\'s invoice. No discounts shall apply for early payment. Late payment shall bear interest at the rate of 2% per annum above the European Central Bank base rate."
💡90-day payment term + extremely low late interest: It may take up to 120 days from the invoice date to actual collection (including shipping and administrative time), putting immense pressure on the supplier\'s cash flow. The late interest rate is only ECB + 2% (currently about 4-5%), far below commercial financing costs — this actually encourages the distributor to delay payments. Furthermore, the lack of an early payment discount means the distributor has no incentive to pay on time.
✅ Recommended Revision
(1) Shorten the payment term to 30-60 days; (2) Add an early payment discount (e.g., 3% discount for payment within 10 days); (3) Increase the late interest rate to a commercially reasonable level (e.g., ECB + 8% or 1.5% monthly interest); (4) Require partial advance payment or Letter of Credit (L/C) for large orders.
'+ '
Clause 15.3 — Termination'+riskBadge('high')+'
'📄 Original Terms"This Agreement may be terminated by either party upon reasonable notice. Upon termination, the Distributor shall be entitled to fair compensation for the goodwill and customer base developed. The Supplier shall repurchase all unsold inventory at cost plus 10%."
💡Three vague concepts = Unlimited risk: (1) "Reasonable notice" cannot be defined — German courts may determine it to be 6-12 months; (2) "Fair compensation" for goodwill is a core concept of the EU Commercial Agents Directive, which can be interpreted by courts in multiple EU member states as 1-2 years of average commission/profit; (3) The Supplier must repurchase all unsold inventory at cost + 10% — the Distributor can stock up heavily before termination, forcing the Supplier to repurchase at a high price. The combination of these three can result in hundreds of thousands of dollars in termination costs.
✅ Recommended Revision
(1) Clarify the notice period (e.g., 90 days’ written notice); (2) Clarify the calculation method and cap for compensation (e.g., 50% of the past 12 months’ commission); (3) Inventory repurchase is limited to unopened products purchased within the past 6 months, with the repurchase price at cost (without the 10% markup); (4) Designate Hong Kong law as the governing law to exclude the mandatory application of the EU Commercial Agents Directive.
'+ '
Clause 9.1 — Non-Compete'+riskBadge('high')+'
📄 Original Terms"During the term of this Agreement, the Supplier shall not sell any products directly or indirectly in the Territory, including through online channels or third-party platforms. This restriction shall survive termination for three (3) years."
💡Prohibiting direct sales by the Supplier + 3-year post-termination restriction: This clause not only prohibits the Supplier from selling in the distribution territory, but also completely bans online channels (such as Amazon Europe, self-operated websites). Coupled with the 3-year post-termination restriction, it means that even if the Distributor is terminated, the Supplier still cannot enter the European market for 3 years. In addition, this clause may violate EU competition law (Article 101 TFEU); if ruled invalid, it could trigger greater legal uncertainty.
✅ Recommended Revision
(1) Allow the Supplier to conduct passive sales through its self-operated website; (2) Shorten the post-termination non-compete to 12 months; (3) Incorporate a selective distribution framework to avoid violating EU competition law; (4) Clarify that the non-compete is limited to the contract products and does not extend to the Supplier’s other product lines.
'; document.getElementById('priorityList').innerHTML= '
1
Clause 2.1 — Add Minimum Purchase Commitment
Exclusivity without obligations is the most dangerous commercial clause. Minimum purchase quantity is the cornerstone of a distribution agreement.
🥊 Must Fix
'+ '
2
Clause 15.3 — Clarify Termination Compensation Calculation Method and Cap
"Reasonable notice" + "fair compensation" is a legal time bomb. It must be quantified.
🥊 Must Fix
'+ '
3
Clause 9.1 — Rationalization of Non-Compete
A 3-year post-termination global sales ban is overly restrictive for the Supplier and may violate EU competition law.
🥊 Must Fix
'+ '
4
Clause 6.2 — Shorten Payment Period from 90 Days to 45-60 Days
90 days puts too much pressure on the Supplier’s cash flow. 45-60 days is a reasonable midpoint for similar contracts.
🤝 Should Fix
'+ '
5
Designate Hong Kong Law as Governing Law
'Exclude the application of the EU Commercial Agents Directive. If the distributor insists on German law, a clear compensation cap must be added.
✅ Nice to Fix
'; document.getElementById('tipList').innerHTML= '
1
Exclusivity ≠ Gift
When granting exclusive distribution rights, it must be paired with minimum purchase quantities, performance evaluations, and an exit mechanism for non-performance. Exclusivity without obligations will only allow the distributor to occupy the market without producing results.
'+ '
2
EU Agency/Distribution Regulations — The Most Commonly Overlooked Risk for Hong Kong Companies
The EU Commercial Agents Directive grants distributors the right to substantial statutory compensation upon termination. Choosing a non-EU governing law (such as Hong Kong law) is key to preventing this risk.
'+ '
3
Vagueness = Danger
Terms like "reasonable notice", "fair compensation", and "best efforts" in distribution agreements have no fixed legal meaning, and in litigation, their meaning will be decided by a judge (not you). Try to use specific numbers and clear standards.
'+ '
4
Inventory Buyback Clause — Set Limits
The inventory buyback obligation upon termination should be limited: only applicable to products purchased in the past 6 months that are unopened and resalable. Otherwise, the distributor could stock up heavily before termination for arbitrage.
'; document.getElementById('results').classList.add('active'); } // ════════════════════════════════════════ // DEMO 3: OEM AGREEMENT (LOW RISK) // ════════════════════════════════════════ function renderOemDemo(){ document.getElementById('resultContractName').textContent='Contract Type: OEM Agreement — Shenzhen ProTech Manufacturing Ltd.'; document.getElementById('scoreHero').innerHTML= '
LowLow Risk
'+ '

✅ Overall Risk Rating: Low Risk

'+ '

OEM Manufacturing Agreement · Shenzhen ProTech Manufacturing Ltd. · Smart Home Products

'+ '
'+ '
1
🔴 High Risk
'+ '
2
🟡 Medium Risk
'+ '
4
🟢 Low Risk
'+ '
'; document.getElementById('summaryCard').innerHTML= '

Risk Summary

'+ '
The overall terms of this contract are fair, with only 1 high-risk clause and 2 medium-risk clauses. The main points of concern are: (1) unclear IP ownership of software/firmware (hardware IP clauses have been properly handled), (2) quality inspection standards can be further specified, and (3) the defect rate threshold for the warranty period can be fine-tuned. Overall, the basic framework of this contract is solid and can be safely signed after minor modifications.
'+ '💰 Estimated Financial Risk Exposure: USD $8,000 – $25,000 (when worst-case scenario is triggered)
'; document.getElementById('catGrid').innerHTML= '
💰

Financial Risk

0 High · 1 Med

Payment terms T/T 30/70 are industry standard. The liability cap of 150% of the contract value is reasonable. A defect rate refund mechanism has been established.

'+ '

Legal Risk

0 High · 1 Med

Governing law is Hong Kong law + HKIAC arbitration. The only minor issue: the contract is only available in English.

'+ '
⚙️
'

Operational Risk

0 High · 0 Medium

Clear delivery terms with delay penalties. Quality standards reference AQL 2.5. Pre-shipment inspection is optional.

'+ '
🧠

IP Intellectual Property Risk

1 High

Hardware design and mold IP are properly assigned to the Buyer. However, the IP ownership of firmware/software and source code delivery are not clearly defined.

'; document.getElementById('clauseCards').innerHTML= '
Clause 9.2 — IP Ownership (Firmware/Software)'+riskBadge('high')+'
📄 Original Clause"The Supplier shall retain all rights, title, and interest in and to any firmware, software, or embedded code developed for the Products. The Buyer is granted a perpetual, non-exclusive, royalty-free license to use such firmware/software solely in connection with the Products purchased from the Supplier. Source code shall not be provided to the Buyer."
💡Software IP is fully controlled by the supplier: This means: (1) Even if you pay for the firmware development, the IP still belongs to the supplier; (2) You only have a license to use it, but cannot modify, upgrade, or maintain the software — you are completely dependent on the supplier; (3) Without the source code, if the supplier goes out of business, raises prices, or experiences a decline in service quality, you cannot transfer the firmware to another factory for production; (4) If there are security vulnerabilities in the firmware, the buyer cannot fix them independently and must wait for the supplier to handle them. For smart home products, software is often the primary source of product value, and this clause is equivalent to permanently handing over the core IP to the supplier.
✅ Recommended Revision
(1) Clearly specify that the IP of firmware/software development results fully paid for by the Buyer belongs to the Buyer; (2) The supplier must deliver complete and compilable source code (including build scripts, dependency lists, and development documentation) at each development stage; (3) Add a source code escrow clause — the source code is kept by a third party and released to the buyer under specific conditions (such as supplier bankruptcy/inability to continue services); (4) The supplier guarantees that the software it develops does not infringe on third-party IP.
'+ '
Clause 5.3 — Quality Inspection'+riskBadge('med')+'
📄 Original Clause"The Supplier shall conduct internal quality inspection prior to each shipment. The Buyer may, at its own expense, appoint a third-party inspection agency to conduct pre-shipment inspection. The inspection standard shall be AQL 2.5 for major defects. In the event of non-compliance, the Supplier shall remedy the defects within 15 days."
💡Inspection mechanism can be strengthened: This clause is not bad — it already references AQL 2.5 — but there are three areas for improvement: (1) Third-party inspection fees are borne by the buyer, which is common in the industry but negotiable; (2) It only defines the AQL for major defects, without covering minor defects and critical defects; (3) "remedy within 15 days" does not specify the consequences if it remains unqualified after 15 days (return? refund? cancellation?).
✅ Recommended Revision
(1) Add a zero tolerance standard for critical defects (any critical defect results in rejection of the entire batch); (2) Clearly define the AQL for minor defects (e.g., AQL 4.0); (3) If re-inspection still fails, the buyer has the right to reject the entire batch and receive a full refund (including deposit paid); (4) Negotiate for the supplier to bear the initial inspection costs (if defect rate > AQL threshold).
'+ '
Clause 7.1 — Warranty & Defect Rate'+riskBadge('med')+'
📄 Original Clause"The Supplier warrants the Products against defects in materials and workmanship for 12 months from the date of shipment. The Supplier shall repair or replace defective products at its cost. If the defect rate exceeds 5% of any shipment, the Supplier shall credit the Buyer for the cost of the defective units plus actual freight costs for return shipping."
💡The warranty terms have a good foundation but can be fine-tuned: A 12-month warranty period meets industry standards. However, a 5% defect rate threshold is on the higher side — industry best practices are typically set at 2-3%. In addition, "actual freight costs" only covers return shipping costs, and does not cover import duties, inspection fees, and repackaging/shipping costs to end customers already paid by the Buyer. The labor cost of replacing products for end customers during the warranty period is also a significant expense.
✅ Recommended Revision
(1) Reduce the defect rate threshold from 5% to 3%; (2) Expand the costs borne by the Supplier to include import duties, inspection fees, and reasonable re-shipping costs; (3) If the defect rate exceeds 3%, the Supplier shall bear the cost of a 100% inspection by a third-party inspection agency; (4) Add a chronic defect clause — if the same defect occurs in three consecutive batches, the Buyer has the right to demand a comprehensive corrective action plan.
'+ '
Clause 15.2 — Governing Language'+riskBadge('low')+'
📄 Original Clause"This Agreement is executed in the English language only. All communications, notices, and technical documentation shall be in English."
💡Low risk but noteworthy: Having the contract only in English is common and acceptable in international trade (especially since HKIAC arbitration supports English). However, if the Supplier's internal communication is in Chinese, there may be misunderstandings at the execution level. For example, quality standards and technical specifications may be distorted during translation.
✅ Recommended Revision
A bilingual Chinese-English version can be added, but the English version shall prevail in case of any conflict. Technical documentation can be provided in both languages to ensure the production department accurately understands the specifications.
'; document.getElementById('priorityList').innerHTML= '
1
Clause 9.2 — Firmware/Software IP ownership must be clearly defined as owned by the Buyer
The core of smart products is software. With only a usage license and no source code, you cannot switch factories, upgrade, or maintain the product. This is the only deal-breaker.
🥊 Must Fix
'+ '
2
Clause 5.3 — Improve inspection standards (add critical defect zero tolerance)
This clause already has a good foundation; just add the definition of critical defects and the consequences of re-inspection failure.
🤝 Should Fix
'+ '
3
Clause 7.1 — Reduce defect rate threshold to 3%
Reducing from 5% to 3% is a reasonable adjustment. Suppliers can usually accept this. Add more comprehensive cost coverage.
🤝 Should Fix
'+ '
4
Clause 15.2 — Add a Chinese bilingual version
Not urgent, but can reduce misunderstandings at the execution level. The English version shall prevail.
✅ Nice to Fix
'; document.getElementById('tipList').innerHTML= '
1
Software/Firmware IP — The most commonly overlooked blind spot in OEM contracts
Many buyers carefully protect hardware IP but forget about firmware. For smart products, firmware/IP should receive the same level of protection as hardware IP. Require source code delivery + establish an escrow.
'+ '
_
2
Defect Rate — 5% seems low, but is actually very high
A 5% defect rate means 1 out of every 20 products is defective. For consumer electronics, the acceptable defect rate in the end market is typically < 1-2%. OEM contracts should set stricter thresholds.
'+ '
3
AQL Standards — Must cover all defect levels
A complete quality clause should cover three levels: critical (safety-related, zero tolerance), major (functional defects, AQL 2.5), and minor (cosmetic defects, AQL 4.0).
'+ '
4
Source Code Escrow — Your insurance policy
For OEM products that rely on supplier-developed software, source code escrow is a necessary risk management tool. The cost is about USD 500-2,000 per year, which is far lower than the cost of redevelopment after losing the source code.
'; document.getElementById('results').classList.add('active'); } // ════════════════════════════════════════ // DEMO 4: NDA AGREEMENT (MEDIUM RISK) // ════════════════════════════════════════ function renderNDADemo(){ document.getElementById('resultContractName').textContent='Contract Type: NDA Agreement — Shenzhen TechVista Electronics Co.'; document.getElementById('scoreHero').innerHTML= '
MediumMedium Risk
'+ '

⚠️ Overall Risk Rating: Medium Risk

'+ '

Mutual NDA · Shenzhen TechVista Electronics · Early Stage of New Product Co-development

'+ '
'+ '
3
🔴 High Risk
'+ '
3
🟡 Medium Risk
'+ '
2
🟢 Low Risk
'+ '
'; document.getElementById('summaryCard').innerHTML= '
📊

Risk Summary

'+ '
This NDA seems standard, but contains 3 high-risk clauses. The most critical issues: (1) The Residuals clause allows the receiving party to freely use confidential information "retained in memory" — effectively leaving a backdoor for technology theft; (2) Confidentiality obligations are perpetual, which is commercially unreasonable and potentially unenforceable; (3) Oral disclosures are automatically protected without confirmation requirements, allowing the other party to retroactively claim any conversation content as confidential information.
'+ '💰 Estimated Risk Exposure: IP asset loss is unquantifiable — if core technology is leaked, market competitive advantage can be instantly destroyed
'; document.getElementById('catGrid').innerHTML= '
🧠

IP Intellectual Property Risk

1 High · 1 Med

The Residuals clause allows core technology to be legally "used from memory." No obligation to return source code/design documents.

'+ '

Legal Risk

2 High · 1 Med

Perpetual confidentiality term, no confirmation mechanism for oral disclosures, governing law is Chinese law, injunctive relief is one-way only.

'+ '
⚙️

Operational Risk

0 High · 1 Med

Return/destruction obligations are vague — no time limit, no written confirmation requirement. No verification mechanism for the destruction of electronic copies.

'+ '
💰

Financial Risk

0 High · 0 Med

The NDA has no direct financial clauses, but indirect losses from IP leakage can reach millions of dollars. Indemnification clauses are limited to direct damages.

'; document.getElementById('clauseCards').innerHTML= '
Clause 4.2 — Residuals Clause'+riskBadge('high')+'
📄 Original Clause"The Recipient shall be free to use, for any purpose, any information that is retained in the unaided memory of its employees who have had access to the Confidential Information, provided that such employees have not intentionally memorized the information. The burden of proving intentional memorization shall rest with the Disclosing Party."
💡Residuals Clause — Backdoor of the NDA: This clause is the most dangerous trap in an NDA. (1) "Unaided memory" is a legal gray area — after engineers view your design and return to their own company, even if they "unintentionally" remember key dimensions or material formulas, they can legally use them; (2) The burden of proof is on you — you need to prove that the other party "intentionally memorized" it, which is technically almost impossible; (3) In Chinese courts, such clauses are often successfully cited by suppliers as a defense. This clause substantially weakens the protection of the NDA.
✅ Suggested Revision
Strongly recommend deleting the Residuals Clause entirely. If the other party insists on keeping it, at least: (1) limit it to "general know-how and skills" rather than specific technical information; (2) remove the reversal of the burden of proof; (3) explicitly exclude specific confidential information such as source code, design drawings, chemical formulas, and customer lists.
'+ '
Clause 7.1 — Term & Survival'+riskBadge('high')+'
📄 Original Clause"The obligations of confidentiality under this Agreement shall survive indefinitely and shall not be subject to any time limitation. The Recipient acknowledges that the Confidential Information has perpetual commercial value and shall protect it accordingly."
💡Perpetual Confidentiality Obligation: Requiring perpetual protection of all confidential information is unreasonable both commercially and legally: (1) Most information (such as marketing strategies, short-term pricing) loses commercial value after 3-5 years; (2) Perpetual obligations increase compliance burdens, especially when the parties no longer have a business relationship; (3) In some jurisdictions (including Hong Kong), perpetual confidentiality clauses may be ruled by courts as an unreasonable restraint of trade and thus unenforceable; (4) "Perpetual" may call into question the reasonableness of the NDA as a whole.
✅ Suggested Revision
(1) Set tiered terms: general business information for 3-5 years, trade secrets (such as chemical formulas, source code) can be perpetual; (2) Clearly define what information constitutes a trade secret vs confidential business information; (3) The confidentiality obligation automatically terminates upon expiration without requiring notice from either party.
'+ '
Clause 2.3 — Oral Disclosures'+riskBadge('high')+'
📄 Original Clause"Confidential Information may be disclosed orally, visually, or in any other form without any requirement for marking or written confirmation. Any information exchanged during meetings, calls, or site visits shall be deemed Confidential Information of the Disclosing Party."
💡Unrestricted Oral Disclosure = Unlimited Claim Risk: This clause means: (1) Anything mentioned in any meeting/call/factory visit can be claimed by the other party as confidential information after the fact; (2) No marking or written confirmation is required — the other party can claim a year later that "a certain idea you mentioned in the last meeting is our confidential information"; (3) This provides a perfect foundation for malicious litigation — any commercial dispute can be packaged as an "NDA breach" claim. In the Chinese business environment, this is a common litigation strategy.
✅ Suggested Revision
(1) Oral/visual disclosures must be confirmed in writing within 30 days after disclosure and marked as "Confidential"; (2) Oral information without written confirmation does not enjoy NDA protection; (3) All written confidential information must be clearly marked "CONFIDENTIAL"; (4) Meeting minutes shall be jointly signed and confirmed by both parties.
'+ '
Clause 8.2 — Return or Destruction'+riskBadge('med')+'
📄 Original Clause"Upon the Disclosing Party\'s request, the Recipient shall promptly return or destroy all Confidential Information. The Recipient may retain one copy for archival purposes."
💡Return obligation is too vague: (1) "Promptly" has no clear time limit; (2) No verification mechanism for destruction — the other party can claim to have destroyed it but actually retain it; (3) The exception of "one copy for archival purposes" may be abused — there are no access restrictions specified for this copy; (4) No requirement to provide a certificate of destruction.
✅ Recommended Revision
(1) Clarify the return/destruction period as within 30 days of request; (2) Require a written certificate of destruction signed by an authorized officer; (3) Delete the "archival copy" exception, or strictly limit it to regulatory compliance requirements and restrict access to the legal department only; (4) Retain the right to audit the destroyed data.
'+ '
Clause 10.1 — Governing Law & Injunctive Relief'+riskBadge('med')+'
📄 Original Clause"This Agreement shall be governed by the laws of the People\'s Republic of China. The Disclosing Party shall be entitled to seek injunctive relief in any court of competent jurisdiction. The Recipient waives any right to claim damages for wrongful injunction."
💡Asymmetric remedy clause: (1) Only the Disclosing Party (i.e., the other party) can apply for injunctive relief — if you need to stop the other party from using your confidential information, you do not have this right; (2) Even if the other party applies for a wrongful injunction causing you losses, you waive the right to claim damages; (3) Coupled with PRC governing law, the procedure for a Hong Kong company to apply for an injunction in China is complicated and has a low chance of success. This clause is designed to be clearly biased towards one party.
✅ Recommended Revision
(1) Both parties are entitled to seek injunctive relief; (2) Delete the clause waiving the right to claim damages for wrongful injunction; (3) Consider designating Hong Kong law as the governing law or at least adding an HKIAC arbitration clause; (4) Add an emergency arbitrator clause to quickly obtain interim relief.
'; document.getElementById('priorityList').innerHTML= '
1
Clause 4.2 — Delete Residuals Clause
The residuals clause is the most common backdoor in NDAs. After your engineers demonstrate the technology, the other party can legally use it if they "remember" it. This is a deal-breaker.
🥊 Must Fix
'+ '
2
Clause 2.3 — Oral Disclosures Must Be Confirmed in Writing
Unrestricted oral confidentiality commitments provide a basis for malicious litigation. Written confirmation within 30 days is the industry standard.
🥊 Must Fix
'+ '
3
Clause 10.1 — Equal Injunctive Relief Rights for Both Parties
One-way injunctive relief rights are extremely unfair. Must be changed to mutual.
🥊 Must Fix
'+ '
4
Clause 7.1 — Rationalize Confidentiality Period (Tiered Periods)
Perpetual confidentiality obligations are commercially unreasonable. Use tiered periods (perpetual for trade secrets, 3-5 years for business information).
🤝 Should Fix
'+ '
5
Clause 8.2 — Clarify Return/Destruction Process
Add a written destruction certificate and a specific timeframe. Relatively easy to negotiate.
🤝 Should Fix
'; document.getElementById('tipList').innerHTML= '
1
Residuals Clause — The Most Dangerous Gray Area of NDAs
The residuals clause is an NDA clause commonly used by Silicon Valley companies, but when it appears in a Chinese supplier\'s NDA, it is almost equivalent to giving up protection. Always prioritize requesting its deletion. If the other party insists (such as a large ODM), at least strictly limit its scope.
'+ '
2
Oral Disclosure — No Paper, No Evidence
In an NDA, oral confidential information should be required to be confirmed in writing within a specific period. Otherwise, a year later, the other party can claim any conversation content as confidential information, and you will not be able to refute it.
'+ '
3
Perpetual Confidentiality = Unreasonable Business Burden
Courts usually do not enforce "perpetual" confidentiality obligations. Using tiered terms is both reasonable and more likely to be supported by courts.
'+ '
4
Before signing an NDA, confirm whether the other party is willing to sign a Mutual NDA
Many Chinese suppliers are only willing to sign a one-way NDA (protecting only their interests). For collaborations involving your design/technology, you must insist on a mutual NDA.
'; document.getElementById('results').classList.add('active'); } // ════════════════════════════════════════ // DEMO 5: MANUFACTURING AGREEMENT (HIGH RISK) // ════════════════════════════════════════ function renderManufacturingDemo(){ document.getElementById('resultContractName').textContent='Contract Type: Manufacturing Agreement — Guangzhou Precision Molding Co.'; document.getElementById('scoreHero').innerHTML= '
HighHigh Risk
'+ '

⚠️ Overall Risk Rating: High Risk

'+ '

OEM Manufacturing Agreement · Guangzhou Precision Molding Co., Ltd. · Consumer Electronics Enclosure

'+ '
'+ '
6
🔴 High Risk
'+ '
3
🟡 Medium Risk
'+ '
1
🟢 Low Risk
'+ '
'; document.getElementById('summaryCard').innerHTML= '
⚠️

Risk Summary

'+ '
This manufacturing agreement contains 6 high-risk clauses. Core issues: (1) The tooling belongs to the supplier after full payment of tooling fees — you spent USD 80,000 on tooling, but the tooling is not yours; (2) The penalty for failing to meet MOQ is as high as 40% of the shortfall; (3) 100% of raw material price increases are passed on to the buyer with no cap; (4) The delivery lead time is only "best efforts" without any binding force; (5) The IP of any design modifications during production belongs to the supplier.
'+ '💰 Estimated Financial Risk Exposure: USD $120,000 – $350,000 (Tooling Fees + MOQ Penalty + Raw Material Price Increases)
'; document.getElementById('catGrid').innerHTML= '
💰

Financial Risk

3 High · 1 Medium

Tooling fees of USD 80K cannot be recovered, MOQ penalty reaches 40% of the shortfall, and raw material price increases are fully passed on with no cap.

'+ '
⚙️

Operational Risk

1 High · 1 Medium

"Best efforts" delivery lead time has no penalties, acceptance criteria are defined by the supplier, and there is no production progress transparency.

'+ '
🧠
'

IP Intellectual Property Risk

1 High · 0 Medium

IP for design modifications belongs to the supplier, tooling design files are not delivered, and similar products can be produced for competitors.

'+ '

Legal Risks

1 High · 1 Medium

Governed by Chinese law + Guangzhou arbitration, no right of rejection for quality non-conformity, compensation limited to direct losses.

'; document.getElementById('clauseCards').innerHTML= '
Clause 3.1 — Tooling Ownership'+riskBadge('high')+'
📄 Original Clause"The Buyer shall pay the full tooling cost of USD 80,000 prior to commencement of tooling fabrication. All tools, molds, and dies shall remain the sole property of the Supplier. The Supplier shall maintain the tools in good working condition. Upon termination, the Supplier has no obligation to release or transfer the tools to the Buyer."
💡You pay, they own: This is the most classic trap in Chinese manufacturing contracts. You pay USD 80,000 in tooling fees, but: (1) the tooling legally belongs to the supplier; (2) the supplier has no obligation to return the tooling after contract termination—meaning you cannot transfer the tooling to another factory; (3) the supplier can theoretically use the tooling you paid for to produce for your competitors; (4) if the supplier goes bankrupt, the tooling will be liquidated as part of their bankruptcy assets. This clause is equivalent to you purchasing production equipment for the supplier and being permanently locked into that supplier.
✅ Recommended Revision
(1) Tooling ownership belongs to the Buyer, and the Supplier is merely a bailee; (2) The tooling must be marked with a label indicating the Buyer’s ownership; (3) Upon contract termination, the Supplier must return the tooling to the Buyer within 14 days (Buyer to bear shipping costs); (4) The Supplier shall not use the tooling to produce for third parties without the Buyer’s prior written consent; (5) The Buyer has the right to inspect the condition of the tooling at any time.
'+ '
Clause 4.3 — MOQ & Penalty'+riskBadge('high')+'
📄 Original Clause"The Buyer shall order a minimum of 50,000 units per quarter. In the event the Buyer fails to meet the quarterly MOQ, the Buyer shall pay the Supplier liquidated damages equal to 40% of the shortfall value within 30 days. The Supplier may also suspend all production until such damages are paid in full."
💡Double Threat of MOQ Penalty + Production Suspension: (1) 50,000 units per quarter is an extremely high volume—if your market demand fluctuates, you will face massive penalties; (2) A 40% shortfall penalty is commercially highly unreasonable—this is clearly a penalty clause rather than a genuine pre-estimate of loss; (3) The supplier can simultaneously suspend all production, meaning you not only get no goods but also have to pay penalties. This is not an incentive mechanism, but a trap.
✅ Recommended Revision
(1) Reduce the MOQ from 50,000 per quarter to a more realistic number (e.g., 20,000), based on a rolling 12-month forecast; (2) Delete or significantly reduce liquidated damages (to a maximum of 10% of the shortfall value); (3) Add an MOQ adjustment mechanism for force majeure / market downturn; (4) In the event of failing to meet the MOQ, a replenishment plan should be negotiated first, rather than directly imposing penalties.
'+ '
Clause 5.7 — Raw Material Cost Pass-through'+riskBadge('high')+'
📄 Original Clause"In the event of any increase in the cost of raw materials, the Supplier shall promptly notify the Buyer of the adjusted unit price, which shall take effect immediately upon notification. The Buyer shall not have the right to dispute or reject such price adjustments. There is no maximum limit on price adjustments."
💡Unlimited and Unreviewed Price Pass-Through: This clause grants the supplier absolute price-raising power: (1) No proof of raw material cost increases is required; (2) The buyer has no right to object or reject; (3) Price increases take effect immediately; (4) There is no upper limit. This means the supplier can increase your price by 50% for a 20% raw material cost increase, and you have no say. Combined with the lack of an objective index benchmark, the supplier can arbitrarily claim "raw material increases."
✅ Recommended Revision
(1) Price adjustments must be based on objective commodity indices agreed upon by both parties in advance (e.g., LME, Platts); (2) the supplier must provide raw material cost breakdown proof; (3) the buyer has the right to audit and challenge the basis of the price increase; (4) the price increase cap is the actual increase in raw material costs, with no additional markups allowed; (5) confirmed POs are not affected by price adjustments.
'+ '
Clause 6.1 — Delivery Terms'+riskBadge('high')+'
📄 Original Clause"The Supplier shall use best efforts to deliver the Products within the estimated delivery timeline. Delivery dates are estimates only and not guaranteed. The Supplier shall not be liable for any delay in delivery, and time shall not be of the essence."
💡Delivery terms are completely non-binding: (1) "Best efforts" has almost no binding force in law—the supplier only needs to prove "I tried my best" to be exempted from liability; (2) "Estimates only" + "not guaranteed" means the delivery date is just for show; (3) Explicitly excludes liability for delays; (4) "Time shall not be of the essence" is an old legal term explicitly stating that "delivery time is not important." If you have seasonal sales (such as the Christmas season), this clause means the goods might not arrive until December, and you will have no right to claim compensation.
✅ Recommended Revision
(1) Clearly define the delivery date as a contractual obligation, and delete "best efforts"; (2) Add delay penalties: for each week of delay, the purchase price is reduced by 1-2% (capped at 10%); (3) if the delay exceeds 30 days, the buyer has the right to cancel the order and receive a full refund; (4) add an expedited shipping clause—the supplier must bear the air freight difference in case of delay; (5) "Time is of the essence".
'+ '
Clause 9.2 — Design Modification IP'+riskBadge('high')+'
📄 Original Clause"Any modifications, adaptations, or improvements made to the Buyer\'s designs, whether suggested by the Supplier or required for manufacturing feasibility, shall become the sole intellectual property of the Supplier. The Supplier may freely use such modifications for any customer without restriction."
💡Your Design Modifications → Their IP: Worse than "joint ownership"—this is "exclusive ownership by the supplier": (1) The IP for any design modifications made for manufacturing feasibility (which almost inevitably happens in mold manufacturing) belongs entirely to the supplier; (2) The supplier can use your modifications to manufacture for any customer (including your direct competitors); (3) You might even need to pay licensing fees to the supplier to continue using your own design "improved by them." This clause is devastating for brand owners.
✅ Recommended Revision
(1) All IP for modifications based on the buyer's design belongs exclusively to the buyer; (2) necessary adjustments made for manufacturing feasibility do not constitute new IP; (3) if there is indeed independent innovation, a written agreement between both parties is required; (4) the supplier commits not to manufacture products based on the buyer's design (including modified versions) for any third party; (5) add a non-compete clause (product level).
'+ '
Clause 14.1 — Limitation of Liability'+riskBadge('high')+'
📄 Original Clause"The Supplier\'s total liability under this Agreement shall be limited to the purchase price of the specific order giving rise to the claim. The Supplier shall not be liable for any indirect, consequential, or incidental damages, including loss of profits, business interruption, or recall costs."
💡Liability cap is too low — limited to the specific order amount only: This means: (1) If a batch of goods worth USD 20,000 is defective, the supplier will compensate at most USD 20,000 — but you could lose USD 200,000+ due to product recalls; (2) Explicitly excludes recall costs — this is the biggest risk exposure in the consumer electronics industry; (3) Excludes business interruption — if your Amazon account is suspended due to the supplier\'s defective products, you bear the loss yourself. The liability cap should match the risk, not the order amount.
✅ Recommended Revision
(1) Increase the liability cap to 150% of the total purchase amount in the past 12 months or USD 500,000 (whichever is higher); (2) Do not exclude recall costs (this is the core of product liability); (3) Losses caused by the supplier\'s willful misconduct or gross negligence shall not be subject to the liability cap; (4) The supplier must purchase product liability insurance of at least USD 2M.
'; document.getElementById('priorityList').innerHTML= '
1
Clause 3.1 — Mold ownership must belong to the Buyer
You paid USD 80K, the mold must be yours. This is your negotiation bottom line.
🥊 Must Fix
'+ '
2
Clause 9.2 — Design modification IP must belong to the Buyer
The supplier having exclusive ownership of the IP for your design modifications is commercial suicide. Zero room for compromise.
🥊 Must Fix
'+ '
3
Clause 5.7 — Change to an objective indexed price adjustment mechanism
Unrestricted, unreviewed price pass-through is unacceptable. It must be based on objective indices and the Buyer must have audit rights.
🥊 Must Fix
'+ '
4
Clause 4.3 — MOQ rationalization + removal of 40% penalty
50K units per quarter + 40% penalty is outrageous. Reduce to a reasonable number and remove punitive penalties.
🥊 Must Fix
'+ '
5
Clause 6.1 — Delivery lead time must be a contractual obligation (not best efforts)
A non-binding delivery lead time is equivalent to no delivery lead time. Add delay penalties and cancellation rights.
🥊 Must Fix
'+ '
6
Clause 14.1 — Increase the
Best Efforts ≠ Commitment
Seeing "best efforts", "reasonable endeavors", "estimates only" in a contract — always treat them as red flags. Delivery dates must be clear contractual obligations with penalties attached.
'+ '
4
Raw Material Prices — Two-Way Adjustment
A good price adjustment clause should be two-way: raw material price increase → price increase; raw material price decrease → price decrease. One-way adjustments will only leave you with prices that go up and never down.
'; document.getElementById('results').classList.add('active'); } // ════════════════════════════════════════ // DEMO 6: AGENCY AGREEMENT (MEDIUM RISK) // ════════════════════════════════════════ function renderAgencyDemo(){ document.getElementById('resultContractName').textContent='Contract Type: Agency Agreement — Asia-Pacific Trading Partners Ltd.'; document.getElementById('scoreHero').innerHTML= '
MediumMedium Risk
'+ '

⚠️ Overall Risk Rating: Medium Risk

'+ '

Sales Agency Agreement · Asia-Pacific Trading Partners · Southeast Asian Market

'+ '
'+ '
3
🔴 High Risk
'+ '
3
🟡 Medium Risk
'+ '
2
🟢 Low Risk
'+ '
'; document.getElementById('summaryCard').innerHTML= '
📊

Risk Summary

'+ '
This agency agreement contains 3 high-risk clauses. Main issues: (1) Commission covers "all sales" within the territory — including customers you developed yourself; (2) Commission continues to be paid for 24 months after termination — you still have to pay commission for two years after firing the agent; (3) Exclusive agency rights with no performance requirements — the agent can sell nothing and still monopolize the market. These clauses are extremely common in Southeast Asian agency agreements but pose huge risks to suppliers.
'+ '💰 Estimated Financial Risk Exposure: USD $30,000 – $90,000 (Post-termination commission + commission on self-developed customers within the territory)
'; document.getElementById('catGrid').innerHTML= '
💰

Financial Risk

2 High · 1 Med

24 months of post-termination commission + commission on all sales within the territory (including self-developed customers) — the actual commission rate is much higher than the surface figure.

'+ '

Legal Risk

0 High · 1 Med

Vague scope of agency authority, unclear assumption of third-party liability, and significant differences in agency laws across Asia-Pacific countries.

'+ '
⚙️

Operational Risk

1 High · 1 Med

Exclusive agency with no performance evaluation, agent can sell competing products simultaneously (no non-compete), and weak reporting obligations.

'+ '
🧠

IP Risk

0 High · 0 Med

Brand usage rights are basically reasonable. Trademark protection obligations in the agency territory can be further clarified.

'; document.getElementById('clauseCards').innerHTML= '
Clause 5.1 — Commission Scope'+riskBadge('high')+'
Original text:
'; }📄 Original Clause"The Agent shall be entitled to a commission of 8% on all sales of the Products in the Territory, regardless of whether such sales are procured by the Agent, the Principal, or any third party. This includes sales to customers originating from the Territory even if the transaction is concluded outside the Territory."
💡"All" Sales in Territory = Unlimited Commission Obligation: (1) Even if the customer is developed by yourself, acquired from an exhibition, or purchased directly through the website, the agent still takes an 8% commission; (2) This includes customers "originating from" the territory—even if the customer signs a contract with you in Singapore but their headquarters is in the agent's territory; (3) You cannot bypass the agent to directly serve any customer within the territory. This means the agent can take a cut from all your regional sales without doing anything. The actual effective commission rate may be much higher than 8%.
✅ Recommended Revision
(1) Commission only applies to sales directly procured by the Agent; (2) The Principal reserves the right to directly serve key accounts / house accounts (with no commission or a lower commission paid); (3) Clearly define "procured by Agent"—requiring the agent to provide concrete proof of participation; (4) No commission or 50% commission for passive online sales.
'+ '
Clause 12.3 — Post-Termination Commission'+riskBadge('high')+'
📄 Original Clause"Upon termination of this Agreement for any reason, the Agent shall continue to receive full commission for a period of 24 months on all sales to customers introduced or serviced by the Agent during the term of this Agreement. This post-termination commission shall apply even if the Agent\'s appointment is terminated for cause (including breach by Agent)."
💡Still paying commission for two years after firing the agent: (1) A 24-month post-termination commission is extremely unreasonable—industry practice is 0-12 months, and usually only applies to termination without cause; (2) It must be paid even if the agent is fired for cause (including breach by Agent)—which is logically absurd; (3) "introduced or serviced" is too broad—the agent only needs to have "serviced" the customer (even if just sending an email) to lock in commissions for life; (4) This clause gives the agent no incentive for a smooth transition after termination.
✅ Recommended Revision
(1) Post-termination commission only applies to termination without cause; (2) Shorten the period from 24 months to 6-12 months; (3) Use a declining scale (50% for the first 6 months, 25% for the next 6 months); (4) Zero commission when terminated due to agent's breach; (5) The definition of "introduced" must be clear (the agent must prove that its primary efforts led to the customer relationship).
'+ '
Clause 2.1 — Exclusivity & Performance'+riskBadge('high')+'
📄 Original Clause"The Principal grants the Agent the exclusive right to sell the Products in the Territory. The Agent shall use reasonable endeavors to promote the Products. No minimum sales targets shall apply during the term. The Principal shall not appoint any other agent or distributor in the Territory."
💡Exclusivity + Zero Performance Obligation = Market Held Hostage: (1) The agent obtains exclusivity for the entire territory but only needs to use "reasonable endeavors" to sell—which has almost no binding force in law; (2) No minimum sales targets—the agent can sell absolutely nothing, and you cannot find another agent; (3) You also cannot sell in the territory yourself (see Clause 5.1). This effectively hands your regional market entirely to the agent without the agent bearing any responsibility.
✅ Recommended Revision
Clause 2.1 — Add minimum sales target
Exclusivity without obligations is the most dangerous combination. A performance evaluation mechanism must be established.
🥊 Must Fix
'+` *(Wait, let me make sure I didn't introduce a typo in ``)* Original: ` '
2
Clause 2.1 — Add Minimum Sales Targets
Exclusive rights without obligations are the most dangerous combination. You must establish a performance review mechanism.
🥊 Must Fix
'+` Correct translation: ` '
2
Clause 2.1 — Add minimum sales target
Exclusivity without obligations is the most dangerous combination. A performance evaluation mechanism must be established.
🥊 Must Fix
'+` Part 10: ` '🤝 Should Fix
'+ '
5
Clause 8.4 — Add basic Non-Compete protection
A complete lack of non-compete is common in Southeast Asia. You can first request disclosure and information firewalls.
✅ Nice to Fix
'; document.getElementById('tipList').innerHTML= '
1
Agency ≠ Distribution — Commission structures are very different
An agent sells on your behalf (you bear inventory and credit risks), while a distributor buys from you and resells. The core of an agency agreement is the commission calculation method, territory definition, and post-termination commissions.
'+ '
2
Post-termination Commission — Huge differences in regulations across Asia-Pacific countries
Countries like Thailand, Indonesia, and the Philippines have different statutory protections for agents. Choosing a neutral governing law (such as Hong Kong law or Singapore law) is key to controlling termination costs.
'+ '
3
Agent Authority — The less, the better
Always limit the authority of the agent to "facilitating sales" rather than "signing contracts". A contract signed by an agent is legally signed by you — including any commitments they make.
'+ '
4
House Accounts — Retain your key accounts
'Set up a house account list for your large existing clients, where sales to these clients pay no commission or a lower commission. This is a common and reasonable arrangement in agency agreements.
'; document.getElementById('results').classList.add('active'); } // ════════════════ DOWNLOAD ════════════════ function downloadReport(){ var contractName=document.getElementById('resultContractName').textContent; var scoreSection=document.getElementById('scoreHero').innerText; var summary=document.getElementById('summaryCard').innerText; var categories=document.getElementById('catGrid').innerText; var clauses=document.getElementById('clauseCards').innerText; var priorities=document.getElementById('priorityList').innerText; var tips=document.getElementById('tipList').innerText; var report='╔══════════════════════════════════════════════╗\n║ ContractScan — AI Contract Risk Scan Report ║\n║ ManuTrade AI ║\n║ Generation Time: '+new Date().toISOString()+' ║\n╚══════════════════════════════════════════════╝\n\n'+contractName+'\n\n══════════════ Overall Risk Rating ══════════════\n'+scoreSection+'\n\n══════════════ Risk Summary ══════════════\n'+summary+'\n\n══════════════ Risk Category Breakdown ══════════════\n'+categories+'\n\n══════════════ Clause-by-Clause Risk Analysis ══════════════\n'+clauses+'\n\n══════════════ Negotiation Priorities ══════════════\n'+priorities+'\n\n══════════════ Common Contract Pitfalls ══════════════\n'+tips+'\n\n---\nThis report was generated by ManuTrade AI ContractScan\nFor reference only, does not constitute legal advice. Please consult a professional lawyer before signing.\nData will be automatically destroyed within 24 hours of generation.\n'; var blob=new Blob([report],{type:'text/plain;charset=utf-8'}); var url=URL.createObjectURL(blob); var a=document.createElement('a'); a.href=url; a.download='ContractScan_Report_'+new Date().toISOString().slice(0,10)+'.txt'; document.body.appendChild(a); a.click(); document.body.removeChild(a); URL.revokeObjectURL(url); toast('📥 Risk report downloaded!'); } // ════════════════ RESET ════════════════ function resetAll(){ document.getElementById('results').classList.remove('active'); document.getElementById('dropZone').classList.remove('loaded'); document.getElementById('fileInput').value=''; document.getElementById('aiStatus').classList.remove('active'); _pendingFile=null; window.scrollTo({top:0,behavior:'smooth'}); toast('🔄 Reset complete, ready for a new scan'); } // ════════════════ DRAG & DROP ════════════════ ['dragenter','dragover','dragleave','drop'].forEach(function(evt){ document.addEventListener(evt,function(e){e.preventDefault();e.stopPropagation();}); }); var dz=document.getElementById('dropZone'); dz.addEventListener('dragover',function(){dz.classList.add('dragover');}); ['dragleave','drop'].forEach(function(evt){dz.addEventListener(evt,function(){dz.classList.remove('dragover');});}); dz.addEventListener('drop',function(e){handleFileUpload(e.dataTransfer.files);}); // ════════════════ INIT ════════════════ if(true || localStorage.getItem('cs_gate')){ document.getElementById('gateOverlay').style.display='none'; document.getElementById('mainApp').classList.add('active'); startCountdown(); } document.getElementById('gateEmail').addEventListener('keydown',function(e){if(e.key==='Enter')enterApp();});