-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
819 lines (776 loc) · 44.4 KB
/
Copy pathindex.html
File metadata and controls
819 lines (776 loc) · 44.4 KB
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
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Civil Litigation Dynamics Simulator</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div id="app">
<!-- Header -->
<header class="header">
<h1>Civil Litigation Dynamics Simulator</h1>
<div class="header-controls">
<div class="time-display">
<span class="label">Case Day:</span>
<span id="current-day">0</span>
<span class="label">Phase:</span>
<span id="current-phase">Pre-Filing</span>
</div>
<div class="time-controls">
<button id="btn-pause" class="btn-control" title="Pause">⏸</button>
<button id="btn-play" class="btn-control active" title="Play">▶</button>
<button id="btn-fast" class="btn-control" title="Fast Forward">⏩</button>
<div class="speed-slider">
<label>Speed:</label>
<input type="range" id="time-speed" min="1" max="10" value="3">
</div>
</div>
<button id="btn-reset" class="btn-action">Reset Case</button>
</div>
</header>
<!-- Main Layout -->
<div class="main-container">
<!-- Left Panel: Configuration -->
<aside class="panel config-panel">
<div class="panel-header">
<h2>Case Configuration</h2>
<button id="btn-toggle-config" class="btn-collapse">−</button>
</div>
<div class="panel-content" id="config-content">
<!-- Case Characteristics -->
<section class="config-section">
<h3>Case Characteristics</h3>
<div class="config-group">
<label>
<span class="label-text">Liability Strength (P's Win Probability)</span>
<span class="label-value" id="val-liability">65%</span>
</label>
<input type="range" id="cfg-liability" min="10" max="90" value="65">
<div class="hint">True underlying probability plaintiff prevails on liability</div>
</div>
<div class="config-group">
<label>
<span class="label-text">Damages Range ($)</span>
</label>
<div class="dual-input">
<input type="number" id="cfg-damages-low" value="500000" step="50000">
<span>to</span>
<input type="number" id="cfg-damages-high" value="2000000" step="50000">
</div>
<div class="hint">Potential damages if plaintiff prevails</div>
</div>
<div class="config-group">
<label>
<span class="label-text">Claim Complexity</span>
<span class="label-value" id="val-complexity">Medium</span>
</label>
<input type="range" id="cfg-complexity" min="1" max="5" value="3">
<div class="hint">Affects discovery scope, expert needs, trial length</div>
</div>
<div class="config-group">
<label>
<span class="label-text">Number of Claims</span>
<span class="label-value" id="val-claims">3</span>
</label>
<input type="range" id="cfg-claims" min="1" max="8" value="3">
</div>
<div class="config-group">
<label>
<span class="label-text">Forum</span>
</label>
<select id="cfg-forum">
<option value="federal">Federal Court</option>
<option value="state-urban">State Court (Urban)</option>
<option value="state-rural">State Court (Rural)</option>
<option value="arbitration">Arbitration</option>
</select>
</div>
</section>
<!-- Plaintiff Attributes -->
<section class="config-section">
<h3>Plaintiff Attributes</h3>
<div class="config-group">
<label>
<span class="label-text">Litigation Budget ($)</span>
</label>
<input type="number" id="cfg-p-budget" value="300000" step="25000">
</div>
<div class="config-group">
<label>
<span class="label-text">Risk Tolerance</span>
<span class="label-value" id="val-p-risk">Moderate</span>
</label>
<input type="range" id="cfg-p-risk" min="1" max="5" value="3">
<div class="hint">1 = Risk averse, 5 = Risk seeking</div>
</div>
<div class="config-group">
<label>
<span class="label-text">Time Sensitivity</span>
<span class="label-value" id="val-p-time">Medium</span>
</label>
<input type="range" id="cfg-p-time" min="1" max="5" value="3">
<div class="hint">How much delay costs this party</div>
</div>
<div class="config-group">
<label>
<span class="label-text">Reputation Concerns</span>
<span class="label-value" id="val-p-rep">Low</span>
</label>
<input type="range" id="cfg-p-rep" min="1" max="5" value="2">
</div>
<div class="config-group">
<label>
<span class="label-text">Fee Arrangement</span>
</label>
<select id="cfg-p-fee">
<option value="contingency-33">Contingency (33%)</option>
<option value="contingency-40">Contingency (40%)</option>
<option value="hourly">Hourly</option>
<option value="hybrid">Hybrid (reduced hourly + contingency)</option>
</select>
</div>
</section>
<!-- Defendant Attributes -->
<section class="config-section">
<h3>Defendant Attributes</h3>
<div class="config-group">
<label>
<span class="label-text">Litigation Budget ($)</span>
</label>
<input type="number" id="cfg-d-budget" value="500000" step="25000">
</div>
<div class="config-group">
<label>
<span class="label-text">Risk Tolerance</span>
<span class="label-value" id="val-d-risk">Moderate</span>
</label>
<input type="range" id="cfg-d-risk" min="1" max="5" value="3">
</div>
<div class="config-group">
<label>
<span class="label-text">Time Sensitivity</span>
<span class="label-value" id="val-d-time">Low</span>
</label>
<input type="range" id="cfg-d-time" min="1" max="5" value="2">
</div>
<div class="config-group">
<label>
<span class="label-text">Reputation Concerns</span>
<span class="label-value" id="val-d-rep">High</span>
</label>
<input type="range" id="cfg-d-rep" min="1" max="5" value="4">
</div>
<div class="config-group">
<label>
<span class="label-text">Insurance Coverage</span>
</label>
<select id="cfg-d-insurance">
<option value="none">No Insurance</option>
<option value="primary">Primary Only ($1M)</option>
<option value="excess">Primary + Excess ($5M)</option>
<option value="ror">Coverage with Reservation of Rights</option>
</select>
</div>
<div class="config-group" id="policy-limit-group">
<label>
<span class="label-text">Policy Limit ($)</span>
</label>
<input type="number" id="cfg-d-policy-limit" value="1000000" step="100000">
</div>
</section>
<!-- Procedural Parameters -->
<section class="config-section">
<h3>Procedural Parameters</h3>
<div class="config-group">
<label>
<span class="label-text">Discovery Scope</span>
<span class="label-value" id="val-discovery">Standard</span>
</label>
<input type="range" id="cfg-discovery" min="1" max="5" value="3">
<div class="hint">1 = Limited, 5 = Extensive/contentious</div>
</div>
<div class="config-group">
<label>
<span class="label-text">Expert Witnesses Required</span>
<span class="label-value" id="val-experts">2</span>
</label>
<input type="range" id="cfg-experts" min="0" max="6" value="2">
</div>
<div class="config-group">
<label>
<span class="label-text">Fee Shifting Rule</span>
</label>
<select id="cfg-fee-shifting">
<option value="american">American Rule (each pays own)</option>
<option value="english">English Rule (loser pays)</option>
<option value="one-way-p">One-Way Pro-Plaintiff</option>
<option value="offer-judgment">Offer of Judgment (FRCP 68)</option>
</select>
</div>
<div class="config-group">
<label>
<span class="label-text">Estimated Trial Length (days)</span>
<span class="label-value" id="val-trial-length">5</span>
</label>
<input type="range" id="cfg-trial-length" min="1" max="20" value="5">
</div>
</section>
<!-- Information Structure -->
<section class="config-section">
<h3>Information Structure</h3>
<div class="config-group">
<label>
<span class="label-text">Plaintiff's Initial Knowledge</span>
<span class="label-value" id="val-p-info">40%</span>
</label>
<input type="range" id="cfg-p-info" min="10" max="80" value="40">
<div class="hint">% of relevant facts known at filing</div>
</div>
<div class="config-group">
<label>
<span class="label-text">Defendant's Initial Knowledge</span>
<span class="label-value" id="val-d-info">70%</span>
</label>
<input type="range" id="cfg-d-info" min="20" max="90" value="70">
</div>
<div class="config-group">
<label>
<span class="label-text">Hidden "Smoking Gun" Evidence</span>
</label>
<select id="cfg-smoking-gun">
<option value="none">None</option>
<option value="pro-p">Exists (Favors Plaintiff)</option>
<option value="pro-d">Exists (Favors Defendant)</option>
<option value="unknown">Exists (Direction Unknown)</option>
</select>
<div class="hint">Key evidence that discovery may reveal</div>
</div>
</section>
<!-- External Factors -->
<section class="config-section">
<h3>External Factors</h3>
<div class="config-group">
<label>
<span class="label-text">Judicial Temperament</span>
</label>
<select id="cfg-judge">
<option value="neutral">Balanced/Neutral</option>
<option value="pro-defense">Defense-Friendly</option>
<option value="pro-plaintiff">Plaintiff-Friendly</option>
<option value="unpredictable">Unpredictable</option>
<option value="settlement-pusher">Settlement-Oriented</option>
</select>
</div>
<div class="config-group">
<label>
<span class="label-text">Jury Pool Lean</span>
<span class="label-value" id="val-jury">Neutral</span>
</label>
<input type="range" id="cfg-jury" min="1" max="5" value="3">
<div class="hint">1 = Pro-Defense, 5 = Pro-Plaintiff</div>
</div>
<div class="config-group">
<label>
<span class="label-text">Court Backlog</span>
<span class="label-value" id="val-backlog">Moderate</span>
</label>
<input type="range" id="cfg-backlog" min="1" max="5" value="3">
<div class="hint">Affects time to trial</div>
</div>
</section>
<!-- Bonus: Class Action -->
<section class="config-section">
<h3>Special Case Types</h3>
<div class="config-group">
<label class="checkbox-label">
<input type="checkbox" id="cfg-class-action">
<span>Potential Class Action</span>
</label>
<div class="hint">Enables class certification dynamics</div>
</div>
<div id="class-action-options" class="sub-options hidden">
<div class="config-group">
<label>
<span class="label-text">Class Size (potential)</span>
</label>
<input type="number" id="cfg-class-size" value="10000" step="1000">
</div>
<div class="config-group">
<label>
<span class="label-text">Certification Probability</span>
<span class="label-value" id="val-cert-prob">50%</span>
</label>
<input type="range" id="cfg-cert-prob" min="10" max="90" value="50">
</div>
</div>
</section>
</div>
</aside>
<!-- Center: Main Visualization Area -->
<main class="visualization-area">
<!-- Case Value Distributions -->
<section class="viz-section value-distributions">
<h3>Case Value Distributions</h3>
<div class="distribution-container">
<div class="distribution-chart">
<canvas id="canvas-distributions"></canvas>
</div>
<div class="distribution-stats">
<div class="stat-block plaintiff">
<h4>Plaintiff's View</h4>
<div class="stat-row">
<span class="stat-label">Expected Value:</span>
<span class="stat-value" id="stat-p-ev">$845,000</span>
</div>
<div class="stat-row">
<span class="stat-label">Range (90% CI):</span>
<span class="stat-value" id="stat-p-range">$420K - $1.4M</span>
</div>
<div class="stat-row">
<span class="stat-label">Confidence:</span>
<span class="stat-value" id="stat-p-confidence">42%</span>
</div>
</div>
<div class="stat-block defendant">
<h4>Defendant's View</h4>
<div class="stat-row">
<span class="stat-label">Expected Value:</span>
<span class="stat-value" id="stat-d-ev">$680,000</span>
</div>
<div class="stat-row">
<span class="stat-label">Range (90% CI):</span>
<span class="stat-value" id="stat-d-range">$280K - $1.1M</span>
</div>
<div class="stat-row">
<span class="stat-label">Confidence:</span>
<span class="stat-value" id="stat-d-confidence">68%</span>
</div>
</div>
</div>
</div>
</section>
<!-- Settlement Bargaining Zone -->
<section class="viz-section bargaining-zone">
<h3>Settlement Bargaining Zone</h3>
<div class="bargaining-container">
<canvas id="canvas-bargaining"></canvas>
<div class="bargaining-legend">
<div class="legend-item">
<span class="legend-color plaintiff-min"></span>
<span>P's Minimum (reservation price)</span>
</div>
<div class="legend-item">
<span class="legend-color defendant-max"></span>
<span>D's Maximum (walk-away point)</span>
</div>
<div class="legend-item">
<span class="legend-color zopa"></span>
<span>Zone of Possible Agreement</span>
</div>
</div>
<div class="bargaining-metrics">
<div class="metric">
<span class="metric-label">P's Reservation:</span>
<span class="metric-value" id="metric-p-reserve">$520,000</span>
</div>
<div class="metric">
<span class="metric-label">D's Maximum:</span>
<span class="metric-value" id="metric-d-max">$780,000</span>
</div>
<div class="metric">
<span class="metric-label">ZOPA Width:</span>
<span class="metric-value" id="metric-zopa">$260,000</span>
</div>
<div class="metric">
<span class="metric-label">Settlement Probability:</span>
<span class="metric-value" id="metric-settle-prob">72%</span>
</div>
</div>
</div>
</section>
<!-- Timeline and Cost Accumulation -->
<section class="viz-section timeline-section">
<h3>Case Timeline & Costs</h3>
<div class="timeline-container">
<canvas id="canvas-timeline"></canvas>
</div>
<div class="cost-meters">
<div class="cost-meter plaintiff">
<div class="meter-header">
<span>Plaintiff Costs</span>
<span class="meter-value" id="meter-p-cost">$45,000</span>
</div>
<div class="meter-bar">
<div class="meter-fill" id="meter-p-fill" style="width: 15%"></div>
<div class="meter-budget" id="meter-p-budget"></div>
</div>
<div class="meter-footer">
<span>Budget: $300,000</span>
<span class="burn-rate">Burn: $2,500/day</span>
</div>
</div>
<div class="cost-meter defendant">
<div class="meter-header">
<span>Defendant Costs</span>
<span class="meter-value" id="meter-d-cost">$62,000</span>
</div>
<div class="meter-bar">
<div class="meter-fill" id="meter-d-fill" style="width: 12%"></div>
<div class="meter-budget" id="meter-d-budget"></div>
</div>
<div class="meter-footer">
<span>Budget: $500,000</span>
<span class="burn-rate">Burn: $3,200/day</span>
</div>
</div>
</div>
</section>
<!-- Information Asymmetry Visualization -->
<section class="viz-section info-asymmetry">
<h3>Information State</h3>
<div class="info-container">
<div class="info-bars">
<div class="info-bar-group">
<span class="info-label">Plaintiff Knowledge</span>
<div class="info-bar">
<div class="info-known" id="info-p-known" style="width: 40%"></div>
<div class="info-discovered" id="info-p-discovered" style="width: 15%"></div>
</div>
<span class="info-percent" id="info-p-percent">55%</span>
</div>
<div class="info-bar-group">
<span class="info-label">Defendant Knowledge</span>
<div class="info-bar">
<div class="info-known" id="info-d-known" style="width: 70%"></div>
<div class="info-discovered" id="info-d-discovered" style="width: 5%"></div>
</div>
<span class="info-percent" id="info-d-percent">75%</span>
</div>
<div class="info-bar-group">
<span class="info-label">Shared/Common Knowledge</span>
<div class="info-bar shared">
<div class="info-shared" id="info-shared" style="width: 35%"></div>
</div>
<span class="info-percent" id="info-shared-percent">35%</span>
</div>
</div>
<div class="info-gap-indicator">
<span class="gap-label">Information Gap:</span>
<span class="gap-value" id="info-gap">Moderate</span>
<div class="gap-description" id="info-gap-desc">
Significant asymmetry favoring defendant. Discovery likely to shift valuations.
</div>
</div>
</div>
</section>
</main>
<!-- Right Panel: Actions and Events -->
<aside class="panel actions-panel">
<div class="panel-header">
<h2>Actions & Events</h2>
</div>
<!-- Action Buttons -->
<section class="action-section">
<h3>Trigger Events</h3>
<div class="action-buttons">
<button class="btn-action" id="btn-file-complaint" title="File initial complaint">
📋 File Complaint
</button>
<button class="btn-action" id="btn-mtd" title="Defendant files Motion to Dismiss" disabled>
⚖️ Motion to Dismiss
</button>
<button class="btn-action" id="btn-discovery-request" title="Initiate discovery" disabled>
🔍 Discovery Request
</button>
<button class="btn-action" id="btn-deposition" title="Conduct key deposition" disabled>
🎤 Key Deposition
</button>
<button class="btn-action" id="btn-msj" title="File Motion for Summary Judgment" disabled>
📑 Summary Judgment
</button>
<button class="btn-action" id="btn-expert" title="Retain/depose expert witness" disabled>
🔬 Expert Witness
</button>
<button class="btn-action" id="btn-settlement-conf" title="Attend settlement conference" disabled>
🤝 Settlement Conf.
</button>
<button class="btn-action" id="btn-trial" title="Proceed to trial" disabled>
⚔️ Go to Trial
</button>
</div>
</section>
<!-- Procedural Motions -->
<section class="action-section">
<h3>Procedural Motions</h3>
<div class="action-buttons procedural">
<button class="btn-secondary" id="btn-compel" disabled>
Motion to Compel
</button>
<button class="btn-secondary" id="btn-protective" disabled>
Protective Order
</button>
<button class="btn-secondary" id="btn-sanctions" disabled>
Sanctions Motion
</button>
<button class="btn-secondary" id="btn-extend" disabled>
Extend Deadlines
</button>
</div>
</section>
<!-- Settlement Offers -->
<section class="action-section">
<h3>Settlement Offers</h3>
<div class="settlement-controls">
<div class="offer-input">
<label>Plaintiff Demands:</label>
<input type="number" id="input-p-demand" value="1200000" step="25000">
<button class="btn-offer" id="btn-p-demand" disabled>Make Demand</button>
</div>
<div class="offer-input">
<label>Defendant Offers:</label>
<input type="number" id="input-d-offer" value="400000" step="25000">
<button class="btn-offer" id="btn-d-offer" disabled>Make Offer</button>
</div>
<div class="offer-history" id="offer-history">
<div class="offer-placeholder">No offers yet</div>
</div>
</div>
</section>
<!-- Surprise Events -->
<section class="action-section">
<h3>Inject Surprise</h3>
<div class="action-buttons surprises">
<button class="btn-surprise" id="btn-smoking-gun" disabled>
💥 Smoking Gun Found
</button>
<button class="btn-surprise" id="btn-witness-flip" disabled>
🔄 Key Witness Flips
</button>
<button class="btn-surprise" id="btn-new-party" disabled>
👥 Add Third Party
</button>
<button class="btn-surprise" id="btn-media" disabled>
📰 Media Attention
</button>
<button class="btn-surprise" id="btn-budget-cut" disabled>
💸 Budget Crisis
</button>
</div>
</section>
<!-- Event Log -->
<section class="action-section event-log-section">
<h3>Event Log</h3>
<div class="event-log" id="event-log">
<div class="event-item system">
<span class="event-day">Day 0</span>
<span class="event-text">Simulation initialized. Configure case parameters and file complaint to begin.</span>
</div>
</div>
</section>
</aside>
</div>
<!-- Bottom Panel: Cascade Flow Diagram -->
<section class="cascade-panel">
<div class="panel-header">
<h2>Decision Cascade & Strategic Flow</h2>
<button id="btn-toggle-cascade" class="btn-collapse">−</button>
</div>
<div class="cascade-content" id="cascade-content">
<canvas id="canvas-cascade"></canvas>
</div>
</section>
<!-- Modal for Event Details -->
<div class="modal" id="modal-event">
<div class="modal-content">
<div class="modal-header">
<h3 id="modal-title">Event Details</h3>
<button class="modal-close" id="modal-close">×</button>
</div>
<div class="modal-body" id="modal-body">
<!-- Dynamic content -->
</div>
<div class="modal-footer">
<button class="btn-action" id="modal-confirm">Confirm</button>
<button class="btn-secondary" id="modal-cancel">Cancel</button>
</div>
</div>
</div>
<!-- Tooltip -->
<div class="tooltip" id="tooltip"></div>
<!-- Help Panel (Slide-out) -->
<div class="help-panel" id="help-panel">
<div class="help-panel-header">
<h2>How to Use This Simulator</h2>
<button class="help-close" id="help-close">×</button>
</div>
<div class="help-panel-content">
<div class="help-section">
<h3>🎯 What This Simulates</h3>
<p>This simulator models how civil lawsuits unfold over time, focusing on the <strong>strategic dynamics</strong> that drive settlement negotiations. You'll see how information revelation, cost accumulation, and risk preferences interact to create (or destroy) opportunities for settlement.</p>
</div>
<div class="help-section">
<h3>🚀 Quick Start</h3>
<ol>
<li><strong>Configure your case</strong> using the left panel (or use defaults)</li>
<li>Click <strong>"File Complaint"</strong> to start the lawsuit</li>
<li>Use <strong>Play ▶</strong> to watch time advance, or trigger events manually</li>
<li>Watch how the <strong>visualizations update</strong> as the case progresses</li>
<li>Try to <strong>reach settlement</strong> or go to trial</li>
</ol>
</div>
<div class="help-section">
<h3>📊 Understanding the Visualizations</h3>
<div class="help-item">
<h4>Case Value Distributions</h4>
<p>The <span class="help-highlight plaintiff">blue curve</span> shows what the plaintiff believes the case is worth. The <span class="help-highlight defendant">orange curve</span> shows the defendant's view. These start far apart (information asymmetry) and typically converge as discovery reveals facts.</p>
</div>
<div class="help-item">
<h4>Settlement Bargaining Zone</h4>
<p>The <span class="help-highlight plaintiff">blue line</span> is plaintiff's minimum acceptable settlement. The <span class="help-highlight defendant">orange line</span> is defendant's maximum they'd pay. When defendant's max exceeds plaintiff's min, a <span class="help-highlight zopa">green zone (ZOPA)</span> appears—settlement is possible!</p>
</div>
<div class="help-item">
<h4>Timeline & Costs</h4>
<p>Track how much each party has spent. When costs approach budget limits, settlement pressure intensifies. The dashed lines show budget caps.</p>
</div>
<div class="help-item">
<h4>Information State</h4>
<p>Shows what each party knows. The gap between them represents information asymmetry—a key driver of failed negotiations.</p>
</div>
</div>
<div class="help-section">
<h3>⚙️ Key Configuration Options</h3>
<div class="help-item">
<h4>Liability Strength</h4>
<p>The "true" probability plaintiff wins. Neither party knows this exactly—they estimate based on available information.</p>
</div>
<div class="help-item">
<h4>Risk Tolerance</h4>
<p>Risk-averse parties (low values) prefer certain outcomes and settle more readily. Risk-seeking parties (high values) are willing to gamble on trial.</p>
</div>
<div class="help-item">
<h4>Information Levels</h4>
<p>How much each party knows at the start. Defendants often know more (they have the documents). Discovery closes this gap—at a cost.</p>
</div>
<div class="help-item">
<h4>Fee Arrangements</h4>
<p><strong>Contingency:</strong> Plaintiff's lawyer paid from recovery (reduces plaintiff's cost pressure)<br>
<strong>Hourly:</strong> Costs accumulate regardless of outcome<br>
<strong>English Rule:</strong> Loser pays both sides' fees (increases risk)</p>
</div>
</div>
<div class="help-section">
<h3>🎬 Actions You Can Take</h3>
<div class="help-item">
<h4>Motions</h4>
<p><strong>Motion to Dismiss:</strong> Defendant tries to end case early. Usually denied, but partial grants narrow the case.<br>
<strong>Summary Judgment:</strong> Expensive but can win without trial if facts are clear.</p>
</div>
<div class="help-item">
<h4>Discovery</h4>
<p>Reveals information but costs money. Choose intensity: limited (cheap, little info) to scorched-earth (expensive, maximum revelation).</p>
</div>
<div class="help-item">
<h4>Settlement Offers</h4>
<p>Make demands (plaintiff) or offers (defendant). The system will auto-respond based on the opposing party's calculated reservation price.</p>
</div>
<div class="help-item">
<h4>Surprise Events</h4>
<p>Inject chaos: smoking gun evidence, witness changes, media attention, budget crises. See how shocks cascade through the system.</p>
</div>
</div>
<div class="help-section">
<h3>💡 What to Watch For</h3>
<ul>
<li><strong>ZOPA formation:</strong> When does settlement become possible?</li>
<li><strong>Cost pressure:</strong> How does budget exhaustion affect bargaining?</li>
<li><strong>Information effects:</strong> Does discovery help or hurt settlement prospects?</li>
<li><strong>Motion outcomes:</strong> How do rulings cascade through valuations?</li>
<li><strong>Asymmetric resources:</strong> How does a funding mismatch create leverage?</li>
</ul>
</div>
<div class="help-section">
<h3>🔬 The Underlying Model</h3>
<p>Each party maintains probabilistic beliefs about case value. These beliefs update (Bayesian-style) when new information arrives. Settlement decisions compare:</p>
<ul>
<li><strong>Expected trial value</strong> (probability × damages)</li>
<li><strong>Remaining litigation costs</strong></li>
<li><strong>Risk adjustment</strong> (based on tolerance)</li>
<li><strong>Time/reputation factors</strong></li>
</ul>
<p>When defendant's adjusted maximum exceeds plaintiff's adjusted minimum, settlement is economically rational—but it still requires negotiation to find the right number.</p>
</div>
</div>
</div>
<!-- Help Toggle Button -->
<button class="help-toggle" id="help-toggle" title="Help & Guide">
<span class="help-icon">?</span>
</button>
<!-- Welcome/Onboarding Modal -->
<div class="modal onboarding-modal" id="modal-onboarding">
<div class="modal-content onboarding-content">
<div class="onboarding-header">
<h2>Welcome to the Civil Litigation Simulator</h2>
<p class="onboarding-subtitle">Learn how lawsuits really work through interactive simulation</p>
</div>
<div class="onboarding-body">
<div class="onboarding-feature">
<div class="feature-icon">⚖️</div>
<div class="feature-text">
<h4>Model Real Dynamics</h4>
<p>See how information asymmetry, cost pressure, and risk preferences drive settlement negotiations</p>
</div>
</div>
<div class="onboarding-feature">
<div class="feature-icon">📊</div>
<div class="feature-text">
<h4>Watch Values Converge</h4>
<p>Track how each party's case valuation changes as discovery reveals facts</p>
</div>
</div>
<div class="onboarding-feature">
<div class="feature-icon">🎯</div>
<div class="feature-text">
<h4>Find the Settlement Zone</h4>
<p>Understand when and why settlement becomes possible—or impossible</p>
</div>
</div>
<div class="onboarding-feature">
<div class="feature-icon">💥</div>
<div class="feature-text">
<h4>Inject Surprises</h4>
<p>See how smoking gun evidence, witness changes, and budget crises cascade through the case</p>
</div>
</div>
</div>
<div class="onboarding-footer">
<label class="dont-show-again">
<input type="checkbox" id="dont-show-onboarding">
<span>Don't show this again</span>
</label>
<div class="onboarding-buttons">
<button class="btn-secondary" id="btn-show-tour">Take a Tour</button>
<button class="btn-action" id="btn-start-sim">Start Simulating</button>
</div>
</div>
</div>
</div>
<!-- Tour Overlay -->
<div class="tour-overlay" id="tour-overlay"></div>
<div class="tour-tooltip" id="tour-tooltip">
<div class="tour-content" id="tour-content"></div>
<div class="tour-footer">
<span class="tour-progress" id="tour-progress">1 of 8</span>
<div class="tour-buttons">
<button class="btn-secondary tour-btn" id="tour-prev">Previous</button>
<button class="btn-action tour-btn" id="tour-next">Next</button>
</div>
</div>
</div>
</div>
<script src="simulation-engine.js"></script>
<script src="visualization.js"></script>
<script src="app.js"></script>
</body>
</html>