File size: 37,432 Bytes
9a15844
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Genomic Analysis Portal</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        primary: '#2563eb',
                        secondary: '#7c3aed',
                        accent: '#0d9488'
                    }
                }
            }
        }
    </script>
</head>
<body class="bg-gray-50 min-h-screen">
    <div class="container mx-auto p-4 sm:p-6 md:p-8">
        <!-- Header -->
        <div class="text-center mb-8">
            <h1 class="text-3xl sm:text-4xl font-bold text-gray-900">Genomic Analysis Portal</h1>
            <p class="mt-2 text-lg text-gray-600">Caustin Lee McLaughlin - Case: McLaughlin v. Commissioner of Social Security (No. 25-1224)</p>
        </div>

        <!-- Navigation Tabs -->
        <div class="mb-8 border-b border-gray-200">
            <nav class="flex space-x-8">
                <button onclick="switchTab('analysis')" class="tab-btn py-4 px-1 border-b-2 font-medium text-sm active-tab">Analysis</button>
                <button onclick="switchTab('alignment')" class="tab-btn py-4 px-1 border-b-2 font-medium text-sm">Alignment Tools</button>
                <button onclick="switchTab('files')" class="tab-btn py-4 px-1 border-b-2 font-medium text-sm">File Management</button>
                <button onclick="switchTab('legal')" class="tab-btn py-4 px-1 border-b-2 font-medium text-sm">Legal Framework</button>
            </nav>
        </div>

        <!-- Analysis Tab -->
        <div id="analysis-tab" class="tab-content">
            <div class="flex flex-col lg:flex-row gap-8">
                <!-- Left Panel: Genetic Markers -->
                <div class="lg:w-2/3">
                    <div class="bg-white p-6 rounded-xl shadow-md border border-gray-200">
                        <h2 class="text-2xl font-bold mb-4 text-gray-800">Petitioner's Genetic Profile & Associated Conditions</h2>
                        <div class="mb-6 pb-4 border-b border-gray-200">
                            <p><strong class="font-semibold text-gray-700">Petitioner:</strong> Caustin Lee McLaughlin</p>
                            <p><strong class="font-semibold text-gray-700">Documented Conditions:</strong> ADHD, Autism Spectrum Disorder (ASD), Generalized Anxiety Disorder (GAD)</p>
                        </div>
                        
                        <h3 class="text-xl font-semibold mb-4 text-indigo-700">Key Single Nucleotide Polymorphisms (SNPs)</h3>
                        <p class="text-gray-600 mb-6">Click on a card to view details and generate a plain-language summary.</p>

                        <div class="grid grid-cols-1 md:grid-cols-3 gap-4">
                            <!-- SNP Card: COMT -->
                            <div class="snp-card bg-blue-50 border-2 border-blue-200 p-4 rounded-lg text-center cursor-pointer transition-transform hover:scale-105" onclick="openModal('comt')">
                                <div class="text-4xl mb-2">🧬</div>
                                <h4 class="font-bold text-lg text-blue-800">COMT</h4>
                                <p class="text-sm text-blue-600">(rs4680)</p>
                            </div>
                            <!-- SNP Card: DRD2 -->
                            <div class="snp-card bg-green-50 border-2 border-green-200 p-4 rounded-lg text-center cursor-pointer transition-transform hover:scale-105" onclick="openModal('drd2')">
                                 <div class="text-4xl mb-2">🧠</div>
                                <h4 class="font-bold text-lg text-green-800">DRD2</h4>
                                 <p class="text-sm text-green-600">Dopamine Receptor</p>
                            </div>
                            <!-- SNP Card: DRD4 -->
                            <div class="snp-card bg-purple-50 border-2 border-purple-200 p-4 rounded-lg text-center cursor-pointer transition-transform hover:scale-105" onclick="openModal('drd4')">
                                 <div class="text-4xl mb-2">⚡️</div>
                                <h4 class="font-bold text-lg text-purple-800">DRD4</h4>
                                 <p class="text-sm text-purple-600">Attention Regulation</p>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- Right Panel: SSA Listings Legend -->
                <div class="lg:w-1/3">
                    <div class="bg-white p-6 rounded-xl shadow-md border border-gray-200 h-full">
                        <h2 class="text-2xl font-bold mb-4 text-gray-800">SSA Listings Crosswalk</h2>
                        <p class="text-gray-600 mb-6">These listings are relevant for assessing the functional limitations imposed by the petitioner's neurogenetic profile.</p>
                        <div class="space-y-4">
                            <div class="legend-item flex items-start p-4 rounded-lg bg-red-50 border border-red-200">
                                <div class="bg-red-500 text-white rounded-full h-8 w-8 flex-shrink-0 flex items-center justify-center font-bold mr-4">11</div>
                                <div>
                                    <h4 class="font-bold text-red-800">Listing 11.00: Neurological Disorders</h4>
                                    <p class="text-sm text-red-700">Covers disorders of the nervous system.</p>
                                </div>
                            </div>
                            <div class="legend-item flex items-start p-4 rounded-lg bg-yellow-50 border border-yellow-300">
                                <div class="bg-yellow-500 text-white rounded-full h-8 w-8 flex-shrink-0 flex items-center justify-center font-bold mr-4">12</div>
                                <div>
                                    <h4 class="font-bold text-yellow-800">Listing 12.00: Mental Disorders</h4>
                                    <p class="text-sm text-yellow-700">Covers mental health conditions and functional domains.</p>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <!-- Alignment Tools Tab -->
        <div id="alignment-tab" class="tab-content hidden">
            <div class="bg-white rounded-xl shadow-md border border-gray-200 p-6">
                <h2 class="text-2xl font-bold mb-6 text-gray-800">Genomic Alignment Tools</h2>
                
                <div class="grid grid-cols-1 lg:grid-cols-2 gap-8">
                    <div>
                        <h3 class="text-xl font-semibold mb-4 text-primary">FASTQ Processing Pipeline</h3>
                        <div class="space-y-4">
                            <div class="bg-gray-50 p-4 rounded-lg">
                                <label class="block text-sm font-medium text-gray-700 mb-2">Upload FASTQ Files</label>
                                <div class="flex items-center justify-center w-full">
                                    <label class="flex flex-col items-center justify-center w-full h-32 border-2 border-dashed rounded-lg cursor-pointer bg-gray-50 hover:bg-gray-100">
                                        <div class="flex flex-col items-center justify-center pt-5 pb-6">
                                            <i class="fas fa-cloud-upload-alt text-3xl text-gray-400 mb-2"></i>
                                            <p class="text-sm text-gray-500"><span class="font-semibold">Click to upload</span> or drag and drop</p>
                                            <p class="text-xs text-gray-500">FASTQ, BAM, SAM files (Max 10GB)</p>
                                        </div>
                                        <input id="file-upload" type="file" class="hidden" multiple accept=".fastq,.fq,.bam,.sam" />
                                    </label>
                                </div>
                            </div>
                            
                            <div class="bg-gray-50 p-4 rounded-lg">
                                <label class="block text-sm font-medium text-gray-700 mb-2">Reference Genome</label>
                                <select class="w-full rounded-md border-gray-300 shadow-sm focus:border-primary focus:ring-primary">
                                    <option>GRCh38 (Human Reference Genome)</option>
                                    <option>GRCh37 (hg19)</option>
                                    <option>Custom Reference</option>
                                </select>
                            </div>
                            
                            <div class="bg-gray-50 p-4 rounded-lg">
                                <label class="block text-sm font-medium text-gray-700 mb-2">Alignment Parameters</label>
                                <div class="space-y-3">
                                    <div>
                                        <label class="inline-flex items-center">
                                            <input type="checkbox" class="rounded border-gray-300 text-primary shadow-sm focus:border-primary focus:ring focus:ring-primary focus:ring-opacity-50" checked>
                                            <span class="ml-2">Quality filtering (Q30)</span>
                                        </label>
                                    </div>
                                    <div>
                                        <label class="inline-flex items-center">
                                            <input type="checkbox" class="rounded border-gray-300 text-primary shadow-sm focus:border-primary focus:ring focus:ring-primary focus:ring-opacity-50">
                                            <span class="ml-2">Duplicate removal</span>
                                        </label>
                                    </div>
                                    <div>
                                        <label class="inline-flex items-center">
                                            <input type="checkbox" class="rounded border-gray-300 text-primary shadow-sm focus:border-primary focus:ring focus:ring-primary focus:ring-opacity-50" checked>
                                            <span class="ml-2">Variant calling</span>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    
                    <div>
                        <h3 class="text-xl font-semibold mb-4 text-primary">Processing Status</h3>
                        <div class="space-y-4">
                            <div class="bg-blue-50 border border-blue-200 rounded-lg p-4">
                                <div class="flex justify-between items-center mb-2">
                                    <h4 class="font-medium text-blue-800">File Upload</h4>
                                    <span class="text-sm bg-blue-100 text-blue-800 px-2 py-1 rounded">Complete</span>
                                </div>
                                <div class="w-full bg-gray-200 rounded-full h-2">
                                    <div class="bg-blue-600 h-2 rounded-full" style="width: 100%"></div>
                                </div>
                            </div>
                            
                            <div class="bg-yellow-50 border border-yellow-200 rounded-lg p-4">
                                <div class="flex justify-between items-center mb-2">
                                    <h4 class="font-medium text-yellow-800">Quality Control</h4>
                                    <span class="text-sm bg-yellow-100 text-yellow-800 px-2 py-1 rounded">In Progress</span>
                                </div>
                                <div class="w-full bg-gray-200 rounded-full h-2">
                                    <div class="bg-yellow-500 h-2 rounded-full" style="width: 65%"></div>
                                </div>
                            </div>
                            
                            <div class="bg-gray-100 border border-gray-200 rounded-lg p-4">
                                <div class="flex justify-between items-center mb-2">
                                    <h4 class="font-medium text-gray-700">Alignment</h4>
                                    <span class="text-sm bg-gray-200 text-gray-700 px-2 py-1 rounded">Pending</span>
                                </div>
                                <div class="w-full bg-gray-200 rounded-full h-2">
                                    <div class="bg-gray-400 h-2 rounded-full" style="width: 0%"></div>
                                </div>
                            </div>
                            
                            <div class="bg-gray-100 border border-gray-200 rounded-lg p-4">
                                <div class="flex justify-between items-center mb-2">
                                    <h4 class="font-medium text-gray-700">Variant Calling</h4>
                                    <span class="text-sm bg-gray-200 text-gray-700 px-2 py-1 rounded">Pending</span>
                                </div>
                                <div class="w-full bg-gray-200 rounded-full h-2">
                                    <div class="bg-gray-400 h-2 rounded-full" style="width: 0%"></div>
                                </div>
                            </div>
                            
                            <button class="w-full bg-primary hover:bg-blue-700 text-white font-medium py-3 px-4 rounded-lg transition-colors">
                                <i class="fas fa-play mr-2"></i> Start Processing Pipeline
                            </button>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <!-- File Management Tab -->
        <div id="files-tab" class="tab-content hidden">
            <div class="bg-white rounded-xl shadow-md border border-gray-200 p-6">
                <h2 class="text-2xl font-bold mb-6 text-gray-800">Genomic File Management</h2>
                
                <div class="mb-6">
                    <div class="flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4">
                        <div class="relative">
                            <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
                                <i class="fas fa-search text-gray-400"></i>
                            </div>
                            <input type="text" placeholder="Search files..." class="pl-10 pr-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary focus:border-primary w-full sm:w-80">
                        </div>
                        <button class="bg-primary hover:bg-blue-700 text-white font-medium py-2 px-4 rounded-lg transition-colors">
                            <i class="fas fa-plus mr-2"></i> Add Files
                        </button>
                    </div>
                </div>
                
                <div class="overflow-x-auto">
                    <table class="min-w-full divide-y divide-gray-200">
                        <thead class="bg-gray-50">
                            <tr>
                                <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">File Name</th>
                                <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Type</th>
                                <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Size</th>
                                <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Status</th>
                                <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Actions</th>
                            </tr>
                        </thead>
                        <tbody class="bg-white divide-y divide-gray-200">
                            <tr>
                                <td class="px-6 py-4 whitespace-nowrap">
                                    <div class="flex items-center">
                                        <i class="fas fa-dna text-green-500 mr-3"></i>
                                        <div>
                                            <div class="text-sm font-medium text-gray-900">genome_Caustin_McLaughlin_Full_20131024071559.txt</div>
                                            <div class="text-sm text-gray-500">Uploaded: Oct 24, 2013</div>
                                        </div>
                                    </div>
                                </td>
                                <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">TXT</td>
                                <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">12.4 MB</td>
                                <td class="px-6 py-4 whitespace-nowrap">
                                    <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">Processed</span>
                                </td>
                                <td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
                                    <a href="#" class="text-primary hover:text-blue-900 mr-3">View</a>
                                    <a href="#" class="text-gray-600 hover:text-gray-900">Download</a>
                                </td>
                            </tr>
                            <tr>
                                <td class="px-6 py-4 whitespace-nowrap">
                                    <div class="flex items-center">
                                        <i class="fas fa-file-medical text-blue-500 mr-3"></i>
                                        <div>
                                            <div class="text-sm font-medium text-gray-900">sample_reads_R1.fastq</div>
                                            <div class="text-sm text-gray-500">Uploaded: Nov 15, 2023</div>
                                        </div>
                                    </div>
                                </td>
                                <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">FASTQ</td>
                                <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2.1 GB</td>
                                <td class="px-6 py-4 whitespace-nowrap">
                                    <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-yellow-100 text-yellow-800">Processing</span>
                                </td>
                                <td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
                                    <a href="#" class="text-primary hover:text-blue-900 mr-3">View</a>
                                    <a href="#" class="text-gray-600 hover:text-gray-900">Download</a>
                                </td>
                            </tr>
                            <tr>
                                <td class="px-6 py-4 whitespace-nowrap">
                                    <div class="flex items-center">
                                        <i class="fas fa-dna text-purple-500 mr-3"></i>
                                        <div>
                                            <div class="text-sm font-medium text-gray-900">aligned_reads.bam</div>
                                            <div class="text-sm text-gray-500">Uploaded: Nov 16, 2023</div>
                                        </div>
                                    </div>
                                </td>
                                <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">BAM</td>
                                <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">856 MB</td>
                                <td class="px-6 py-4 whitespace-nowrap">
                                    <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">Complete</span>
                                </td>
                                <td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
                                    <a href="#" class="text-primary hover:text-blue-900 mr-3">View</a>
                                    <a href="#" class="text-gray-600 hover:text-gray-900">Download</a>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
                
                <div class="mt-6 flex items-center justify-between">
                    <div class="text-sm text-gray-700">
                        Showing <span class="font-medium">1</span> to <span class="font-medium">3</span> of <span class="font-medium">3</span> results
                    </div>
                    <div class="flex space-x-2">
                        <button class="px-3 py-1 rounded-md bg-gray-200 text-gray-700 hover:bg-gray-300">Previous</button>
                        <button class="px-3 py-1 rounded-md bg-primary text-white hover:bg-blue-700">Next</button>
                    </div>
                </div>
            </div>
        </div>

        <!-- Legal Framework Tab -->
        <div id="legal-tab" class="tab-content hidden">
            <div class="bg-white rounded-xl shadow-md border border-gray-200 p-6">
                <h2 class="text-2xl font-bold mb-6 text-gray-800">Legal Framework & Precedents</h2>
                
                <div class="grid grid-cols-1 lg:grid-cols-2 gap-8">
                    <div>
                        <h3 class="text-xl font-semibold mb-4 text-primary">Constitutional Considerations</h3>
                        <div class="prose max-w-none text-gray-700">
                            <p>This case intersects with First Amendment petition rights and equal protection considerations. The petitioner's pro se litigation activity represents core constitutional conduct protected under the Petition Clause.</p>
                            
                            <h4 class="font-semibold mt-4">Key Legal Principles:</h4>
                            <ul class="list-disc list-inside space-y-2 mt-2">
                                <li>First Amendment Petition Clause protections</li>
                                <li>Equal Protection under the Fourteenth Amendment</li>
                                <li>ADA Amendments Act (2008) coverage expansion</li>
                                <li>SSA Ruling 16-3p on mental disorders evaluation</li>
                            </ul>
                        </div>
                    </div>
                    
                    <div>
                        <h3 class="text-xl font-semibold mb-4 text-primary">Relevant Case Law</h3>
                        <div class="space-y-4">
                            <div class="border-l-4 border-blue-500 pl-4 py-2">
                                <h4 class="font-bold text-gray-900">California Motor Transport Co. v. Trucking Unlimited (1972)</h4>
                                <p class="text-sm text-gray-600 mt-1">Established that the First Amendment protects the right to petition for redress of grievances.</p>
                            </div>
                            
                            <div class="border-l-4 border-green-500 pl-4 py-2">
                                <h4 class="font-bold text-gray-900">Billings v. Town of Grafton (2005)</h4>
                                <p class="text-sm text-gray-600 mt-1">First Circuit precedent on retaliatory prosecution violating the Petition Clause.</p>
                            </div>
                            
                            <div class="border-l-4 border-purple-500 pl-4 py-2">
                                <h4 class="font-bold text-gray-900">SSR 16-3p (2017)</h4>
                                <p class="text-sm text-gray-600 mt-1">Social Security ruling on evaluating mental disorders and functional limitations.</p>
                            </div>
                        </div>
                    </div>
                </div>
                
                <div class="mt-8 bg-blue-50 border border-blue-200 rounded-lg p-6">
                    <h3 class="text-lg font-semibold text-blue-800 mb-3">Genetic Information Nondiscrimination Act (GINA)</h3>
                    <p class="text-blue-700">GINA prohibits discrimination based on genetic information in employment and health insurance. While not directly applicable to SSA disability determinations, it establishes important precedents regarding the use of genetic information in legal contexts.</p>
                </div>
            </div>
        </div>
    </div>

    <!-- Modal -->
    <div id="modal" class="modal-backdrop fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center p-4 hidden z-50" onclick="closeModal()">
        <div class="modal-content bg-white w-full max-w-2xl rounded-xl shadow-2xl p-6 sm:p-8 transform scale-95 transition-all duration-300" onclick="event.stopPropagation()">
            <div id="modal-content-container">
                <!-- Dynamic content will be injected here -->
            </div>
            <button class="absolute top-4 right-4 text-gray-500 hover:text-gray-800" onclick="closeModal()">
                <svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg>
            </button>
        </div>
    </div>

    <script>
        // Tab switching functionality
        function switchTab(tabName) {
            // Hide all tabs
            document.querySelectorAll('.tab-content').forEach(tab => {
                tab.classList.add('hidden');
            });
            
            // Remove active class from all buttons
            document.querySelectorAll('.tab-btn').forEach(btn => {
                btn.classList.remove('active-tab');
                btn.classList.add('inactive-tab');
            });
            
            // Show selected tab
            document.getElementById(`${tabName}-tab`).classList.remove('hidden');
            
            // Add active class to clicked button
            event.target.classList.remove('inactive-tab');
            event.target.classList.add('active-tab');
        }

        // Set initial active tab
        document.addEventListener('DOMContentLoaded', function() {
            document.querySelector('.tab-btn').classList.add('active-tab');
        });

        const modal = document.getElementById('modal');
        const modalContentContainer = document.getElementById('modal-content-container');

        // Data for the pop-up modals
        const modalData = {
            'comt': {
                title: 'COMT Gene (rs4680)',
                color: 'blue',
                details: {
                    "Gene": "COMT (Catechol-O-Methyltransferase)",
                    "Polymorphism": "Val158Met (genotype Val/Val)",
                    "Functional Impact": "Associated with lower dopamine availability and less efficient cognitive processing, particularly under stress.",
                    "Key Symptoms": "Executive Dysfunction (difficulty with planning, organization), Working Memory Deficits, Stress Sensitivity.",
                    "SSA Relevance": "Highly relevant to assessing limitations under Listing 12.00 (Mental Disorders), specifically criteria related to concentrating, persisting, or maintaining pace."
                },
                baseContent: `
                    

The COMT gene provides instructions for an enzyme that helps break down dopamine in the prefrontal cortex.


                    

The petitioner's specific polymorphism is associated with lower dopamine availability and less efficient cognitive processing, particularly under stress. This directly impacts executive functions critical for sustained work.


                    
Functional Impact & SSA Relevance:

                    

                        
Executive Dysfunction: Difficulty with planning, organization, and task management.

                        
Working Memory Deficits: Trouble holding and manipulating information.

                        
Stress Sensitivity: Performance degrades significantly under pressure.

                    

                `
            },
            'drd2': {
                title: 'DRD2 Gene',
                color: 'green',
                 details: {
                    "Gene": "DRD2 (Dopamine Receptor D2)",
                    "Functional Impact": "Variants can affect the density and sensitivity of dopamine receptors, linked to impulsivity and reward-seeking behaviors.",
                    "Key Symptoms": "Impulse Control issues, challenges in sustaining effort (Motivation & Reward Processing), difficulty with Behavioral Regulation.",
                    "SSA Relevance": "Supports a finding of marked limitations under Listing 12.00 (Mental Disorders), particularly in the domain of interacting with others and adapting or managing oneself."
                },
                baseContent: `
                    

The DRD2 gene is crucial for dopamine signaling. Variants can affect the density and sensitivity of dopamine receptors.


                    

Alterations are linked to impulsivity and reward-seeking behaviors, which are core features of ADHD and can interfere with the ability to adhere to workplace rules and maintain focus on tasks.


                    
Functional Impact & SSA Relevance:

                    

                        
Impulse Control: Difficulty inhibiting inappropriate responses.

                        
Motivation & Reward Processing: Challenges in sustaining effort.

                        
Behavioral Regulation: Potential for conflict in structured environments.

                    

                `
            },
            'drd4': {
                title: 'DRD4 Gene',
                color: 'purple',
                 details: {
                    "Gene": "DRD4 (Dopamine Receptor D4)",
                    "Functional Impact": "Variants are associated with a 'novelty-seeking' trait and significant difficulties in sustaining attention, particularly for mundane or repetitive tasks.",
                    "Key Symptoms": "Severe Inattention, inability to complete routine tasks (Task Persistence), challenges in shifting between tasks (Cognitive Flexibility).",
                    "SSA Relevance": "Directly substantiates severe limitations under Listing 12.11 (Neurodevelopmental disorders) and the broader functional criteria of Listing 12.00."
                },
                baseContent: `
                    

The DRD4 gene is one of the most replicated genetic findings in ADHD research. It plays a significant role in attention.


                    

Certain variants are associated with significant difficulties in sustaining attention, particularly for mundane or repetitive tasks common in unskilled work.


                    
Functional Impact & SSA Relevance:

                    

                        
Inattention: Severe difficulty maintaining focus over time.

                        
Task Persistence: Inability to complete routine tasks.

                        
Cognitive Flexibility: Challenges in shifting between tasks.

                    

                `
            }
        };

        // Function to open the modal with content
        function openModal(snp) {
            const data = modalData[snp];
            if (!data) return;

            modalContentContainer.innerHTML = `
                

                    <h3 class="text-2xl sm:text-3xl font-bold text-gray-900">${data.title}
                

                

                    ${data.baseContent}
                </div>
                <div class="mt-6 pt-6 border-t border-gray-200">
                    <div id="gemini-output" class="p-4 bg-gray-100 rounded-lg hidden prose max-w-none"></div>
                    <div id="gemini-loader" class="flex justify-center items-center py-4 hidden">
                        <div class="animate-spin rounded-full h-8 w-8 border-b-2 border-primary"></div>
                        <p class="ml-4 text-gray-600">Generating plain-language summary...</p>
                    </div>
                     <button id="gemini-button" onclick="generateSummary('${snp}')" class="mt-4 w-full inline-flex items-center justify-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-primary hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary transition-colors">
                         Generate Plain-Language Summary
                    
                

            `;
            
            modal.classList.remove('hidden');
            document.body.classList.add('overflow-hidden');
            setTimeout(() => {
                modal.classList.remove('opacity-0');
                modal.querySelector('.modal-content').classList.remove('scale-95');
            }, 10);
        }

        // Function to close the modal
        function closeModal() {
            modal.classList.add('opacity-0');
            modal.querySelector('.modal-content').classList.add('scale-95');
            setTimeout(() => {
                modal.classList.add('hidden');
                document.body.classList.remove('overflow-hidden');
            }, 300);
        }
        
        // Event listener for Escape key to close modal
        document.addEventListener('keydown', (event) => {
            if (event.key === 'Escape') {
                closeModal();
            }
        });

        // Function to simulate summary generation
        async function generateSummary(snp) {
            const data = modalData[snp];
            if (!data) return;

            const loader = document.getElementById('gemini-loader');
            const outputContainer = document.getElementById('gemini-output');
            const generateButton = document.getElementById('gemini-button');

            loader.classList.remove('hidden');
            outputContainer.classList.add('hidden');
            generateButton.disabled = true;
            generateButton.classList.add('opacity-50', 'cursor-not-allowed');

            // Simulate API delay
            await new Promise(resolve => setTimeout(resolve, 2000));

            // Generate sample summary based on data
            const summaryText = `
                

The ${data.details.Gene} genetic variant found in Mr. McLaughlin affects how his brain processes important chemicals related to focus and attention. This means he may have particular difficulty with tasks that require sustained concentration, especially when under pressure.</p> <p class="mt-3">In practical terms, this genetic profile helps explain why Mr. McLaughlin struggles with organizing his workday, remembering multi-step instructions, and maintaining consistent performance in demanding environments. These challenges are directly relevant to the Social Security Administration's evaluation of his ability to function in a workplace setting.</p> <div class="mt-4 p-4 bg-blue-50 rounded-lg"> <h4 class="font-semibold text-blue-800 mb-2">Key Points:</h4> <ul class="list-disc list-inside text-blue-700 space-y-1"> <li>Affects dopamine processing in the brain</li> <li>Impacts executive functioning abilities</li> <li>Relevant to SSA disability evaluation criteria</li> </ul> </div> `; outputContainer.innerHTML = summaryText; outputContainer.classList.remove('hidden'); loader.classList.add('hidden'); generateButton.disabled = false; generateButton.classList.remove('opacity-50', 'cursor-not-allowed'); } // File upload handling document.addEventListener('DOMContentLoaded', function() { const fileInput = document.getElementById('file-upload'); if (fileInput) { fileInput.addEventListener('change', function(e) { const files = e.target.files; if (files.length > 0) { console.log(`Selected ${files.length} files:`); Array.from(files).forEach(file => { console.log(`- ${file.name} (${(file.size / (1024*1024)).toFixed(2)} MB)`); }); } }); } }); </script> <style> .active-tab { color: #2563eb; border-color: #2563eb; } .inactive-tab { color: #6b7280; border-color: transparent; } .inactive-tab:hover { color: #374151; border-color: #d1d5db; } .modal-backdrop { opacity: 1; transition: opacity 0.3s ease; } .modal-backdrop.opacity-0 { opacity: 0; pointer-events: none; } </style> </body> </html>