edenl14 commited on
Commit
e722212
Β·
verified Β·
1 Parent(s): 7aea1a5

can you add these indexes so there will be one analysis of just the toxins level and one where you can see from what sources. πŸ₯— FOOD & BEVERAGES

Browse files

- Mercury β†’ Tuna, swordfish, king mackerel, shark, marlin β†’ Neurotoxin, brain/kidney damage
- Cadmium β†’ Cacao, rice, shellfish, leafy greens from polluted soils β†’ Kidney damage, bone loss, carcinogen
- Arsenic (inorganic) β†’ Rice, groundwater, some seafood β†’ Carcinogen, skin lesions, vascular issues
- Lead β†’ Root vegetables in contaminated soil, spices, old pipes, imported candies β†’ Neurotoxin, developmental delays
- Glyphosate β†’ Non-organic wheat, oats, soy, corn β†’ Endocrine disruptor, possible carcinogen
- Atrazine β†’ Corn, contaminated water β†’ Hormone disruptor
- Neonicotinoids β†’ Fruits, vegetables β†’ Neurotoxic, endocrine disruption
- Aflatoxin β†’ Peanuts, corn, grains stored humid β†’ Liver carcinogen
- Ochratoxin A β†’ Coffee, dried fruits, cereals, wine β†’ Kidney toxicity, carcinogenic potential
- Patulin β†’ Moldy apples, apple juice β†’ GI issues, possible neurotoxin
- Nitrites/nitrates β†’ Processed meats β†’ Carcinogenic nitrosamines
- PAHs β†’ Smoked or grilled meats β†’ Carcinogen, DNA damage
- Heterocyclic amines β†’ High-heat cooked meats β†’ Carcinogenic
- Acrylamide β†’ Fried/baked starchy foods β†’ Neurotoxic, possible carcinogen
- Artificial colors (Red 40, Yellow 5, Tartrazine) β†’ Candy, soda β†’ Hyperactivity, possible carcinogen
- Preservatives (BHA, BHT, sodium benzoate) β†’ Cereal, chips, drinks β†’ Possible carcinogens, endocrine disruption
- MSG β†’ Fast food, snacks β†’ Excitotoxin, headaches in sensitive people
- Bisphenols (BPA, BPS, BPF) β†’ Canned foods, plastic bottles β†’ Endocrine disruption
- Phthalates β†’ Plastic food packaging, fast food wrappers β†’ Hormone disruption
- Microplastics β†’ Bottled water, sea salt, seafood β†’ Inflammation, oxidative stress

🚰 WATER
- Chlorine byproducts (THMs, HAAs) β†’ Chlorinated tap water β†’ Carcinogenic, liver/kidney toxicity
- Fluoride (excess) β†’ Tea, fluoridated water β†’ Dental/bone fluorosis, thyroid interference
- PFAS (β€œforever chemicals”) β†’ Contaminated water β†’ Bioaccumulative, endocrine disruption
- Lead β†’ Old plumbing β†’ Neurotoxic
- Copper (excess) β†’ Leaching pipes β†’ GI issues, liver/kidney damage
- Nitrates/nitrites β†’ Fertilizer runoff β†’ Blue baby syndrome
- Arsenic β†’ Groundwater β†’ Carcinogen, organ damage
- Microplastics/nanoplastics β†’ Tap & bottled water β†’ Inflammation, endocrine disruption

🌬️ AIR
- Diesel exhaust (PAHs, particulates) β†’ Traffic β†’ Lung cancer, heart disease
- PM2.5 & PM10 β†’ Combustion, dust β†’ Cardiovascular, strokes
- Carbon monoxide β†’ Car exhaust, heaters β†’ Brain damage, death
- Nitrogen oxides (NOx) β†’ Traffic, power plants β†’ Asthma, smog
- Sulfur dioxide (SOβ‚‚) β†’ Coal, diesel β†’ Respiratory irritation
- Ground-level ozone (O₃) β†’ Smog β†’ Lung inflammation
- Formaldehyde β†’ Smoke, building materials β†’ Carcinogen, irritation
- VOCs (benzene, toluene, xylene, styrene) β†’ Fuels, paints β†’ Carcinogens, neurotoxins
- Radon β†’ Soil into homes β†’ Lung cancer
- Cigarette smoke β†’ 7,000+ chemicals incl. benzene, arsenic, cadmium β†’ Carcinogen, cardiovascular/lung disease
- Wildfire smoke β†’ PM2.5, benzene, PAHs β†’ Respiratory/systemic inflammation

🏠 HOUSEHOLD
- Parabens β†’ Lotions, shampoos β†’ Endocrine disruption
- Triclosan β†’ Antibacterial soaps, toothpaste β†’ Hormone disruptor, resistance
- Synthetic fragrances (phthalates, musks) β†’ Perfumes, detergents β†’ Hormone disruption, asthma
- Formaldehyde & releasers β†’ Cosmetics, tissues, cleaners β†’ Carcinogen
- Dioxins/furans β†’ Bleached toilet paper, incineration β†’ Carcinogens
- Ammonia β†’ Cleaners β†’ Respiratory irritant
- Chlorine (bleach) β†’ Disinfectants β†’ Irritant
- Quats (quaternary ammonium compounds) β†’ Disinfectants, softeners β†’ Asthma, irritation
- Optical brighteners β†’ Laundry detergents β†’ Skin/eye irritation
- Nonstick coatings (PTFE, PFOA) β†’ Cookware β†’ Carcinogens, liver toxicity
- Flame retardants (PBDEs, TBBPA) β†’ Furniture, electronics β†’ Neurotoxic, endocrine disruption
- Plastics (BPA, phthalates) β†’ Containers, toys β†’ Hormone disruption

πŸ’„ COSMETICS
- Lead β†’ Lipstick, eyeliner β†’ Neurotoxic
- Cadmium β†’ Makeup pigments β†’ Carcinogen
- Arsenic β†’ Skin creams β†’ Carcinogen
- Mercury β†’ Skin lightening creams β†’ Neurotoxic, kidney damage
- Oxybenzone, octinoxate β†’ Sunscreens β†’ Hormone disruption
- Titanium dioxide (nano) β†’ Sunscreens, powders β†’ Carcinogen if inhaled
- Formaldehyde & releasers β†’ Hair/nail products β†’ Carcinogen
- Toluene β†’ Nail polish/dyes β†’ Neurotoxin
- PPD (p-phenylenediamine) β†’ Hair dye β†’ Allergic reactions, carcinogen

πŸ‘• CLOTHING & FABRICS
- Formaldehyde β†’ Wrinkle-free fabrics β†’ Carcinogen, irritation
- Azo dyes β†’ Cheap textiles β†’ Carcinogenic amines
- Microplastics β†’ Polyester, nylon β†’ Inhaled/ingested β†’ Inflammation
- Flame retardants β†’ Pajamas, upholstery β†’ Endocrine disruption, neurotoxicity

🏭 INDUSTRIAL & ENVIRONMENTAL
- Asbestos β†’ Old insulation, tiles β†’ Mesothelioma, lung cancer
- Styrene β†’ Disposable plastics β†’ Carcinogen, neurotoxin
- VOC solvents (toluene, xylene, benzene) β†’ Paints, glues β†’ Neurotoxic
- Heavy metals (Hg, Pb, Cd, Cr, Ni) β†’ Industrial pollution β†’ Carcinogens
- Pesticide drift (organophosphates, carbamates) β†’ Agriculture β†’ Neurotoxic, endocrine effects

πŸ§ͺ SPECIAL MENTIONS
- Pharmaceutical residues β†’ Drinking water β†’ Hormone disruption, antibiotic resistance
- Nanoparticles (TiOβ‚‚, silver) β†’ Sunscreens, fabrics β†’ Inflammation, unknown long-term effects
- Endocrine disruptors (BPA, phthalates, parabens, PFAS, dioxins, pesticides) β†’ Multiple sources β†’ Fertility issues, metabolic disorders

Files changed (3) hide show
  1. dashboard.html +5 -1
  2. index.html +2 -1
  3. toxins.html +371 -0
dashboard.html CHANGED
@@ -120,7 +120,11 @@
120
  <i data-feather="activity" class="w-5 h-5"></i>
121
  <span>Dashboard</span>
122
  </a>
123
- <a href="#" class="flex items-center space-x-3 p-3 text-gray-600 hover:bg-gray-100 rounded-lg">
 
 
 
 
124
  <i data-feather="camera" class="w-5 h-5"></i>
125
  <span>Food Scanner</span>
126
  </a>
 
120
  <i data-feather="activity" class="w-5 h-5"></i>
121
  <span>Dashboard</span>
122
  </a>
123
+ <a href="toxins.html" class="flex items-center space-x-3 p-3 text-gray-600 hover:bg-gray-100 rounded-lg">
124
+ <i data-feather="alert-triangle" class="w-5 h-5"></i>
125
+ <span>Toxin Index</span>
126
+ </a>
127
+ <a href="#" class="flex items-center space-x-3 p-3 text-gray-600 hover:bg-gray-100 rounded-lg">
128
  <i data-feather="camera" class="w-5 h-5"></i>
129
  <span>Food Scanner</span>
130
  </a>
index.html CHANGED
@@ -38,7 +38,8 @@
38
  <a href="#features" class="text-gray-600 hover:text-emerald-500 transition-all">Features</a>
39
  <a href="#how-it-works" class="text-gray-600 hover:text-emerald-500 transition-all">How It Works</a>
40
  <a href="dashboard.html" class="text-gray-600 hover:text-emerald-500 transition-all">Dashboard</a>
41
- </div>
 
42
  <div class="flex space-x-3">
43
  <a href="#" class="bg-emerald-500 hover:bg-emerald-600 text-white px-4 py-2 rounded-full transition-all flex items-center">
44
  <i data-feather="download" class="mr-2"></i> Download
 
38
  <a href="#features" class="text-gray-600 hover:text-emerald-500 transition-all">Features</a>
39
  <a href="#how-it-works" class="text-gray-600 hover:text-emerald-500 transition-all">How It Works</a>
40
  <a href="dashboard.html" class="text-gray-600 hover:text-emerald-500 transition-all">Dashboard</a>
41
+ <a href="toxins.html" class="text-gray-600 hover:text-emerald-500 transition-all">Toxin Index</a>
42
+ </div>
43
  <div class="flex space-x-3">
44
  <a href="#" class="bg-emerald-500 hover:bg-emerald-600 text-white px-4 py-2 rounded-full transition-all flex items-center">
45
  <i data-feather="download" class="mr-2"></i> Download
toxins.html ADDED
@@ -0,0 +1,371 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>ToxiTrack - Toxin Index</title>
7
+ <link rel="icon" type="image/x-icon" href="/static/favicon.ico">
8
+ <script src="https://cdn.tailwindcss.com"></script>
9
+ <script src="https://unpkg.com/feather-icons"></script>
10
+ <style>
11
+ @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
12
+ body {
13
+ font-family: 'Poppins', sans-serif;
14
+ }
15
+ .toxin-card {
16
+ transition: all 0.3s ease;
17
+ }
18
+ .toxin-card:hover {
19
+ transform: translateY(-3px);
20
+ box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
21
+ }
22
+ .category-badge {
23
+ position: absolute;
24
+ top: -12px;
25
+ right: 20px;
26
+ padding: 4px 12px;
27
+ border-radius: 9999px;
28
+ font-weight: 600;
29
+ text-transform: uppercase;
30
+ font-size: 0.75rem;
31
+ }
32
+ </style>
33
+ </head>
34
+ <body class="bg-gray-50">
35
+ <div class="container mx-auto px-4 py-12">
36
+ <!-- Header -->
37
+ <div class="text-center mb-16">
38
+ <h1 class="text-4xl font-bold text-gray-800 mb-4">ToxiTrack Toxin Index</h1>
39
+ <p class="text-lg text-gray-600 max-w-3xl mx-auto">
40
+ Comprehensive reference guide to common toxins in food, water, air, and household products
41
+ </p>
42
+ </div>
43
+
44
+ <!-- Tabs -->
45
+ <div class="flex justify-center mb-12">
46
+ <div class="inline-flex rounded-lg border border-gray-200 bg-white">
47
+ <button id="allTab" class="px-6 py-3 rounded-l-lg font-medium active-tab">All Toxins</button>
48
+ <button id="foodTab" class="px-6 py-3 font-medium text-gray-600 hover:text-gray-800 border-l border-gray-200">Food & Beverages</button>
49
+ <button id="waterTab" class="px-6 py-3 font-medium text-gray-600 hover:text-gray-800 border-l border-gray-200">Water</button>
50
+ <button id="airTab" class="px-6 py-3 font-medium text-gray-600 hover:text-gray-800 border-l border-gray-200">Air</button>
51
+ <button id="householdTab" class="px-6 py-3 font-medium text-gray-600 hover:text-gray-800 border-l border-gray-200">Household</button>
52
+ <button id="otherTab" class="px-6 py-3 rounded-r-lg font-medium text-gray-600 hover:text-gray-800 border-l border-gray-200">Other Sources</button>
53
+ </div>
54
+ </div>
55
+
56
+ <!-- Toxin Grid -->
57
+ <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8" id="toxinContainer">
58
+ <!-- Toxin cards will be dynamically filtered here -->
59
+ </div>
60
+
61
+ <!-- Sources Section -->
62
+ <div class="mt-16 p-8 bg-white rounded-xl shadow-sm">
63
+ <h2 class="text-2xl font-bold text-gray-800 mb-6">Key Sources of Toxin Exposure</h2>
64
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-8">
65
+ <div>
66
+ <h3 class="text-lg font-semibold text-gray-700 mb-4">Top Food Sources</h3>
67
+ <div class="space-y-4">
68
+ <div class="flex items-start">
69
+ <div class="flex-shrink-0 h-5 w-5 text-emerald-500 mr-3 mt-1">
70
+ <i data-feather="alert-triangle"></i>
71
+ </div>
72
+ <p class="text-gray-600"><span class="font-medium">Tuna/Swordfish:</span> High mercury content</p>
73
+ </div>
74
+ <div class="flex items-start">
75
+ <div class="flex-shrink-0 h-5 w-5 text-emerald-500 mr-3 mt-1">
76
+ <i data-feather="alert-triangle"></i>
77
+ </div>
78
+ <p class="text-gray-600"><span class="font-medium">Rice:</span> Often contains arsenic and cadmium</p>
79
+ </div>
80
+ <div class="flex items-start">
81
+ <div class="flex-shrink-0 h-5 w-5 text-emerald-500 mr-3 mt-1">
82
+ <i data-feather="alert-triangle"></i>
83
+ </div>
84
+ <p class="text-gray-600"><span class="font-medium">Processed Meats:</span> Nitrites/nitrates and PAHs</p>
85
+ </div>
86
+ <div class="flex items-start">
87
+ <div class="flex-shrink-0 h-5 w-5 text-emerald-500 mr-3 mt-1">
88
+ <i data-feather="alert-triangle"></i>
89
+ </div>
90
+ <p class="text-gray-600"><span class="font-medium">Non-organic Produce:</span> Pesticide residues</p>
91
+ </div>
92
+ </div>
93
+ </div>
94
+ <div>
95
+ <h3 class="text-lg font-semibold text-gray-700 mb-4">Top Environmental Sources</h3>
96
+ <div class="space-y-4">
97
+ <div class="flex items-start">
98
+ <div class="flex-shrink-0 h-5 w-5 text-red-500 mr-3 mt-1">
99
+ <i data-feather="alert-circle"></i>
100
+ </div>
101
+ <p class="text-gray-600"><span class="font-medium">Air Pollution:</span> PM2.5, ozone, NOx from traffic</p>
102
+ </div>
103
+ <div class="flex items-start">
104
+ <div class="flex-shrink-0 h-5 w-5 text-red-500 mr-3 mt-1">
105
+ <i data-feather="alert-circle"></i>
106
+ </div>
107
+ <p class="text-gray-600"><span class="font-medium">Tap Water:</span> Lead, chlorine byproducts, PFAS</p>
108
+ </div>
109
+ <div class="flex items-start">
110
+ <div class="flex-shrink-0 h-5 w-5 text-red-500 mr-3 mt-1">
111
+ <i data-feather="alert-circle"></i>
112
+ </div>
113
+ <p class="text-gray-600"><span class="font-medium">Household Products:</span> Cleaning supplies, plastics</p>
114
+ </div>
115
+ <div class="flex items-start">
116
+ <div class="flex-shrink-0 h-5 w-5 text-red-500 mr-3 mt-1">
117
+ <i data-feather="alert-circle"></i>
118
+ </div>
119
+ <p class="text-gray-600"><span class="font-medium">Personal Care Items:</span> Cosmetics with heavy metals</p>
120
+ </div>
121
+ </div>
122
+ </div>
123
+ </div>
124
+ </div>
125
+
126
+ <!-- Reduction Tips -->
127
+ <div class="mt-12 bg-emerald-50 rounded-xl p-8">
128
+ <h2 class="text-2xl font-bold text-gray-800 mb-4">Reducing Your Toxin Exposure</h2>
129
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-6">
130
+ <div class="bg-white p-6 rounded-lg">
131
+ <div class="text-emerald-500 mb-4">
132
+ <i data-feather="shopping-bag" class="w-8 h-8"></i>
133
+ </div>
134
+ <h3 class="font-semibold text-gray-800 mb-2">Smart Shopping</h3>
135
+ <p class="text-gray-600 text-sm">Choose organic when possible, especially for the Dirty Dozen. Avoid processed foods and plastic packaging.</p>
136
+ </div>
137
+ <div class="bg-white p-6 rounded-lg">
138
+ <div class="text-emerald-500 mb-4">
139
+ <i data-feather="home" class="w-8 h-8"></i>
140
+ </div>
141
+ <h3 class="font-semibold text-gray-800 mb-2">Home Improvements</h3>
142
+ <p class="text-gray-600 text-sm">Use HEPA air filters, water filters, and replace nonstick cookware with ceramic or stainless steel.</p>
143
+ </div>
144
+ <div class="bg-white p-6 rounded-lg">
145
+ <div class="text-emerald-500 mb-4">
146
+ <i data-feather="activity" class="w-8 h-8"></i>
147
+ </div>
148
+ <h3 class="font-semibold text-gray-800 mb-2">Regular Monitoring</h3>
149
+ <p class="text-gray-600 text-sm">Track your toxin exposure with ToxiTrack and get personalized recommendations for reduction.</p>
150
+ </div>
151
+ </div>
152
+ </div>
153
+ </div>
154
+
155
+ <script>
156
+ feather.replace();
157
+
158
+ // Toxin data
159
+ const toxins = [
160
+ // Food & Beverages
161
+ {
162
+ name: "Mercury",
163
+ category: "food",
164
+ sources: "Tuna, swordfish, king mackerel, shark, marlin",
165
+ effects: "Neurotoxin, brain/kidney damage",
166
+ severity: "high"
167
+ },
168
+ {
169
+ name: "Cadmium",
170
+ category: "food",
171
+ sources: "Cacao, rice, shellfish, leafy greens from polluted soils",
172
+ effects: "Kidney damage, bone loss, carcinogen",
173
+ severity: "medium"
174
+ },
175
+ {
176
+ name: "Arsenic (inorganic)",
177
+ category: "food",
178
+ sources: "Rice, groundwater, some seafood",
179
+ effects: "Carcinogen, skin lesions, vascular issues",
180
+ severity: "high"
181
+ },
182
+ {
183
+ name: "Lead",
184
+ category: "food",
185
+ sources: "Root vegetables in contaminated soil, spices, old pipes, imported candies",
186
+ effects: "Neurotoxin, developmental delays",
187
+ severity: "high"
188
+ },
189
+ {
190
+ name: "Glyphosate",
191
+ category: "food",
192
+ sources: "Non-organic wheat, oats, soy, corn",
193
+ effects: "Endocrine disruptor, possible carcinogen",
194
+ severity: "medium"
195
+ },
196
+ // Water
197
+ {
198
+ name: "PFAS (forever chemicals)",
199
+ category: "water",
200
+ sources: "Contaminated water",
201
+ effects: "Bioaccumulative, endocrine disruption",
202
+ severity: "high"
203
+ },
204
+ {
205
+ name: "Chlorine byproducts",
206
+ category: "water",
207
+ sources: "Chlorinated tap water",
208
+ effects: "Carcinogenic, liver/kidney toxicity",
209
+ severity: "medium"
210
+ },
211
+ // Air
212
+ {
213
+ name: "PM2.5 & PM10",
214
+ category: "air",
215
+ sources: "Combustion, dust",
216
+ effects: "Cardiovascular, strokes",
217
+ severity: "high"
218
+ },
219
+ {
220
+ name: "VOCs",
221
+ category: "air",
222
+ sources: "Fuels, paints",
223
+ effects: "Carcinogens, neurotoxins",
224
+ severity: "medium"
225
+ },
226
+ // Household
227
+ {
228
+ name: "Bisphenols (BPA, BPS)",
229
+ category: "household",
230
+ sources: "Plastic containers, receipts",
231
+ effects: "Endocrine disruption",
232
+ severity: "medium"
233
+ },
234
+ {
235
+ name: "Phthalates",
236
+ category: "household",
237
+ sources: "Vinyl flooring, plastic products",
238
+ effects: "Hormone disruption",
239
+ severity: "medium"
240
+ },
241
+ // Other
242
+ {
243
+ name: "Endocrine disruptors",
244
+ category: "other",
245
+ sources: "Multiple sources",
246
+ effects: "Fertility issues, metabolic disorders",
247
+ severity: "high"
248
+ }
249
+ ];
250
+
251
+ // Render toxin cards
252
+ function renderToxins(filter = 'all') {
253
+ const container = document.getElementById('toxinContainer');
254
+ container.innerHTML = '';
255
+
256
+ const filteredToxins = filter === 'all' ? toxins : toxins.filter(t => t.category === filter);
257
+
258
+ filteredToxins.forEach(toxin => {
259
+ const card = document.createElement('div');
260
+ card.className = `bg-white rounded-xl p-6 shadow-sm toxin-card relative`;
261
+
262
+ // Category badge with color
263
+ let categoryColor = 'bg-gray-200 text-gray-800';
264
+ let categoryName = 'Other';
265
+
266
+ if (toxin.category === 'food') {
267
+ categoryColor = 'bg-emerald-100 text-emerald-800';
268
+ categoryName = 'Food';
269
+ } else if (toxin.category === 'water') {
270
+ categoryColor = 'bg-blue-100 text-blue-800';
271
+ categoryName = 'Water';
272
+ } else if (toxin.category === 'air') {
273
+ categoryColor = 'bg-purple-100 text-purple-800';
274
+ categoryName = 'Air';
275
+ } else if (toxin.category === 'household') {
276
+ categoryColor = 'bg-yellow-100 text-yellow-800';
277
+ categoryName = 'Household';
278
+ }
279
+
280
+ // Severity indicator
281
+ let severityColor = 'bg-red-500';
282
+ if (toxin.severity === 'medium') severityColor = 'bg-yellow-500';
283
+ if (toxin.severity === 'low') severityColor = 'bg-green-500';
284
+
285
+ card.innerHTML = `
286
+ <div class="category-badge ${categoryColor}">${categoryName}</div>
287
+ <h3 class="text-xl font-bold text-gray-800 mb-2">${toxin.name}</h3>
288
+ <div class="flex items-center mb-4">
289
+ <div class="text-sm font-medium text-gray-600 mr-2">Severity:</div>
290
+ <div class="flex space-x-1">
291
+ <div class="w-3 h-3 rounded-full ${severityColor}"></div>
292
+ <div class="text-xs font-medium text-gray-500">${toxin.severity}</div>
293
+ </div>
294
+ </div>
295
+ <div class="mb-4">
296
+ <p class="text-sm font-medium text-gray-600">Common Sources:</p>
297
+ <p class="text-gray-700">${toxin.sources}</p>
298
+ </div>
299
+ <div>
300
+ <p class="text-sm font-medium text-gray-600">Health Effects:</p>
301
+ <p class="text-gray-700">${toxin.effects}</p>
302
+ </div>
303
+ `;
304
+
305
+ container.appendChild(card);
306
+ });
307
+
308
+ feather.replace();
309
+ }
310
+
311
+ // Tab functionality
312
+ document.getElementById('allTab').addEventListener('click', () => {
313
+ document.querySelectorAll('[id$="Tab"]').forEach(tab => {
314
+ tab.classList.remove('active-tab', 'text-emerald-600');
315
+ tab.classList.add('text-gray-600');
316
+ });
317
+ document.getElementById('allTab').classList.add('active-tab', 'text-emerald-600');
318
+ renderToxins('all');
319
+ });
320
+
321
+ document.getElementById('foodTab').addEventListener('click', () => {
322
+ document.querySelectorAll('[id$="Tab"]').forEach(tab => {
323
+ tab.classList.remove('active-tab', 'text-emerald-600');
324
+ tab.classList.add('text-gray-600');
325
+ });
326
+ document.getElementById('foodTab').classList.add('active-tab', 'text-emerald-600');
327
+ renderToxins('food');
328
+ });
329
+
330
+ document.getElementById('waterTab').addEventListener('click', () => {
331
+ document.querySelectorAll('[id$="Tab"]').forEach(tab => {
332
+ tab.classList.remove('active-tab', 'text-emerald-600');
333
+ tab.classList.add('text-gray-600');
334
+ });
335
+ document.getElementById('waterTab').classList.add('active-tab', 'text-emerald-600');
336
+ renderToxins('water');
337
+ });
338
+
339
+ document.getElementById('airTab').addEventListener('click', () => {
340
+ document.querySelectorAll('[id$="Tab"]').forEach(tab => {
341
+ tab.classList.remove('active-tab', 'text-emerald-600');
342
+ tab.classList.add('text-gray-600');
343
+ });
344
+ document.getElementById('airTab').classList.add('active-tab', 'text-emerald-600');
345
+ renderToxins('air');
346
+ });
347
+
348
+ document.getElementById('householdTab').addEventListener('click', () => {
349
+ document.querySelectorAll('[id$="Tab"]').forEach(tab => {
350
+ tab.classList.remove('active-tab', 'text-emerald-600');
351
+ tab.classList.add('text-gray-600');
352
+ });
353
+ document.getElementById('householdTab').classList.add('active-tab', 'text-emerald-600');
354
+ renderToxins('household');
355
+ });
356
+
357
+ document.getElementById('otherTab').addEventListener('click', () => {
358
+ document.querySelectorAll('[id$="Tab"]').forEach(tab => {
359
+ tab.classList.remove('active-tab', 'text-emerald-600');
360
+ tab.classList.add('text-gray-600');
361
+ });
362
+ document.getElementById('otherTab').classList.add('active-tab', 'text-emerald-600');
363
+ renderToxins('other');
364
+ });
365
+
366
+ // Initial render
367
+ document.getElementById('allTab').classList.add('text-emerald-600');
368
+ renderToxins();
369
+ </script>
370
+ </body>
371
+ </html>