File size: 45,107 Bytes
12b36d3
 
 
 
 
924a6c2
12b36d3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
924a6c2
12b36d3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
924a6c2
12b36d3
 
 
64534a2
924a6c2
12b36d3
 
 
 
924a6c2
12b36d3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
924a6c2
64534a2
924a6c2
 
64534a2
 
924a6c2
 
 
 
 
 
 
 
64534a2
924a6c2
 
 
 
 
 
 
 
 
 
 
 
64534a2
 
12b36d3
 
 
924a6c2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12b36d3
 
 
 
924a6c2
12b36d3
 
 
 
924a6c2
12b36d3
 
 
 
924a6c2
12b36d3
 
 
 
924a6c2
12b36d3
 
 
64534a2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12b36d3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
924a6c2
 
 
12b36d3
 
 
924a6c2
12b36d3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
924a6c2
12b36d3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
924a6c2
12b36d3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
924a6c2
12b36d3
 
 
 
924a6c2
12b36d3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64534a2
12b36d3
 
 
 
 
 
 
 
 
 
924a6c2
12b36d3
 
924a6c2
 
 
12b36d3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
924a6c2
12b36d3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Interactive Brand Analysis</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/chartjs-plugin-annotation@3.0.1/dist/chartjs-plugin-annotation.min.js"></script>
    <!-- Chosen Palette: Calm Harmony Neutrals -->
    <!-- Application Structure Plan: The application is designed as a single-page dashboard with a fixed sidebar navigation. This structure was chosen to allow users to easily switch between different analytical views (Dashboard, Comparison Table, Thematic Groups, Risk/Reward Chart) without losing context. This non-linear approach is superior to a long-scrolling page for a data-rich report, as it empowers users to explore data from multiple perspectives. A modal window provides deep-dive details on demand, keeping the main views clean and focused on comparison and high-level insights. This design prioritizes user-driven exploration and rapid synthesis of the report's key findings. -->
    <!-- Visualization & Content Choices: 
        - Report Info: Top Recommendations -> Goal: Inform -> Viz: Highlighted Cards -> Interaction: Click for Detail -> Justification: Immediately surfaces the report's conclusion for quick decision-making. -> Method: HTML/Tailwind.
        - Report Info: Full Scoring Matrix -> Goal: Compare/Organize -> Viz: Sortable Table -> Interaction: Click headers to sort by Score, etc. -> Justification: Enables users to rank and compare all candidates based on various quantitative factors. -> Method: HTML/JS.
        - Report Info: Thematic Categories -> Goal: Organize/Inform -> Viz: Tabbed Content Layout -> Interaction: Click tabs to view domains by category -> Justification: Translates the report's narrative structure into an interactive format, allowing users to analyze branding strategies. -> Method: HTML/JS.
        - Report Info: Risk vs. Reward Analysis -> Goal: Relationships/Compare -> Viz: Bubble Chart -> Interaction: Hover for tooltip, click for detail -> Justification: Provides a powerful visual synthesis of the strategic trade-offs between brand potential and risk, making complex relationships easy to grasp. -> Library: Chart.js.
        - Report Info: Granular Domain Analysis -> Goal: Inform -> Viz: Modal Window -> Interaction: Click any domain to open -> Justification: Provides access to detailed qualitative data without cluttering the main interface. -> Method: HTML/JS.
    -->
    <!-- CONFIRMATION: NO SVG graphics used. NO Mermaid JS used. -->
    <style>
        body { font-family: 'Inter', sans-serif; background-color: #F8F7F4; color: #333333; }
        @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
        .nav-link { transition: all 0.2s ease-in-out; }
        .nav-link.active { background-color: #EAE7E1; color: #A57C5A; border-right: 4px solid #A57C5A; }
        .nav-link:not(.active):hover { background-color: #EFEBE6; transform: translateX(2px); }
        .view { display: none; }
        .view.active { display: block; animation: fadeIn 0.5s; }
        @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
        .chart-container { position: relative; width: 100%; height: 400px; max-height: 50vh; margin-left: auto; margin-right: auto; }
        .modal-bg { background-color: rgba(0,0,0,0.5); }
        .sortable-header { cursor: pointer; }
        .sortable-header:hover { background-color: #f0ebe5; }
        .asc::after { content: ' ▲'; font-size: 0.8em; }
        .desc::after { content: ' ▼'; font-size: 0.8em; }
        .tier-1 { border-left: 5px solid #22c55e; }
        .tier-2 { border-left: 5px solid #f97316; }
        .tier-3 { border-left: 5px solid #ef4444; }
    </style>
</head>
<body class="antialiased">

    <div class="flex h-screen bg-gray-100">
        <aside class="w-64 bg-[#F8F7F4] shadow-md flex flex-col fixed top-0 left-0 h-full z-20">
            <div class="p-6">
                <h1 class="text-2xl font-bold text-[#A57C5A]">Brand Analysis</h1>
                <p class="text-sm text-gray-500 mt-1">Comprehensive Review</p>
            </div>
            <nav class="flex-1 px-4 py-2 space-y-2">
                <a href="#" data-view="dashboard" class="nav-link active flex items-center p-3 rounded-lg">
                    <span class="mr-3">📊</span> Dashboard
                </a>
                <a href="#" data-view="comparison" class="nav-link flex items-center p-3 rounded-lg">
                    <span class="mr-3">📋</span> Full Comparison
                </a>
                <a href="#" data-view="themes" class="nav-link flex items-center p-3 rounded-lg">
                    <span class="mr-3">📚</span> Thematic Groups
                </a>
                <a href="#" data-view="quadrant" class="nav-link flex items-center p-3 rounded-lg">
                    <span class="mr-3">🎯</span> Risk vs Reward
                </a>
            </nav>
            <div class="p-4 text-xs text-gray-400">
                <p>&copy; 2024 Strategic Analysis. All Rights Reserved.</p>
            </div>
        </aside>

        <main class="flex-1 ml-64 p-6 md:p-10 overflow-y-auto bg-[#F0EBE5]">
            <div id="dashboard" class="view active">
                <div class="mb-8">
                    <h2 class="text-3xl font-bold text-gray-800">Dashboard Overview</h2>
                    <p class="text-gray-600 mt-2">A high-level summary of the comprehensive brand name analysis, highlighting top recommendations and key data distributions from the full candidate pool.</p>
                </div>

                <div class="grid grid-cols-1 lg:grid-cols-3 gap-6 mb-8">
                    <div class="lg-col-span-1 bg-white p-6 rounded-lg shadow-lg">
                        <h3 class="font-bold text-lg text-green-600 mb-2">🏆 Premier Recommendation</h3>
                        <div id="top-recommendation-card" class="cursor-pointer hover:shadow-xl transition-shadow"></div>
                    </div>
                    <div class="lg:col-span-2 bg-white p-6 rounded-lg shadow-lg">
                        <h3 class="font-bold text-lg text-gray-700 mb-2">Strategic Score Distribution</h3>
                        <p class="text-sm text-gray-500 mb-4">This chart shows the number of brands falling into different strategic score brackets, indicating the overall quality of the candidate pool.</p>
                        <div class="chart-container h-64 max-h-[300px]">
                            <canvas id="scoreDistributionChart"></canvas>
                        </div>
                    </div>
                </div>

                <div class="grid grid-cols-1 gap-6">
                    <div class="bg-white p-6 rounded-lg shadow-lg">
                        <h3 class="font-bold text-lg text-gray-700 mb-2">Candidate Quality Overview</h3>
                        <p class="text-sm text-gray-500 mb-4">A breakdown of all names by their strategic viability tier. This highlights the proportion of high-potential names versus those with significant challenges.</p>
                        <div class="chart-container">
                            <canvas id="tierDistributionChart"></canvas>
                        </div>
                    </div>
                </div>
            </div>

            <div id="comparison" class="view">
                <div class="mb-8">
                    <h2 class="text-3xl font-bold text-gray-800">Full Comparison Matrix</h2>
                    <p class="text-gray-600 mt-2">An interactive table of all brand candidates, scored across five critical success factors. Click any column header to sort the data and any row to view a detailed analysis.</p>
                </div>
                <div class="bg-white rounded-lg shadow-lg overflow-x-auto">
                    <table class="w-full text-sm text-left text-gray-500">
                        <thead class="text-xs text-gray-700 uppercase bg-gray-50">
                            <tr>
                                <th scope="col" class="px-6 py-3 sortable-header" data-sort="name">Brand Name</th>
                                <th scope="col" class="px-6 py-3 sortable-header" data-sort="clarity">Brand Clarity</th>
                                <th scope="col" class="px-6 py-3 sortable-header" data-sort="uniqueness">Market Uniqueness</th>
                                <th scope="col" class="px-6 py-3 sortable-header" data-sort="seo">SEO Potential</th>
                                <th scope="col" class="px-6 py-3 sortable-header" data-sort="international">Int'l Viability</th>
                                <th scope="col" class="px-6 py-3 sortable-header" data-sort="legal">Legal Viability</th>
                                <th scope="col" class="px-6 py-3 sortable-header active desc" data-sort="score">Overall Score</th>
                            </tr>
                        </thead>
                        <tbody id="comparison-table-body">
                        </tbody>
                    </table>
                </div>
            </div>

            <div id="themes" class="view">
                <div class="mb-8">
                    <h2 class="text-3xl font-bold text-gray-800">Thematic Group Analysis</h2>
                    <p class="text-gray-600 mt-2">Explore the brands organized by their underlying philosophy. Each category presents a different strategic approach, allowing for evaluation based on the desired brand identity.</p>
                </div>
                <div id="themes-container" class="space-y-8"></div>
            </div>

            <div id="quadrant" class="view">
                <div class="mb-8">
                    <h2 class="text-3xl font-bold text-gray-800">Risk vs. Reward Quadrant</h2>
                    <p class="text-gray-600 mt-2">This chart visually plots each brand's potential (reward) against its market and legal risks. Ideal candidates are in the top-left quadrant (High Reward, Low Risk).</p>
                </div>
                <div class="bg-white p-6 rounded-lg shadow-lg">
                    <div class="chart-container h-[500px]">
                        <canvas id="riskRewardChart"></canvas>
                    </div>
                </div>
            </div>
        </main>
    </div>

    <div id="modal" class="fixed inset-0 z-30 items-center justify-center p-4 hidden modal-bg">
        <div id="modal-content" class="bg-white rounded-lg shadow-2xl w-full max-w-3xl max-h-[90vh] flex flex-col">
            <div class="p-6 border-b flex justify-between items-start">
                <div>
                    <h3 id="modal-title" class="text-2xl font-bold"></h3>
                    <p id="modal-subtitle" class="text-gray-500 text-sm"></p>
                </div>
                <button id="modal-close" class="text-gray-400 hover:text-gray-800 text-2xl font-bold">&times;</button>
            </div>
            <div id="modal-body" class="p-6 overflow-y-auto flex-1"></div>
            <div class="p-4 bg-gray-50 border-t flex justify-end">
                <button id="modal-close-footer" class="px-4 py-2 bg-gray-700 text-white rounded-lg hover:bg-gray-800">Close</button>
            </div>
        </div>
    </div>

<script>
const domainData = [
    { name: 'Paix (ThePaix.com)', cost: 4500, category: 'Top-Tier (Acquire)', scores: { clarity: 9, uniqueness: 9, seo: 7, international: 8, legal: 8, score: 9.0 }, analysis: 'French for "peace". Excellent brand potential due to its elegant, memorable, and conceptually relevant nature. By securing ThePaix.com, the venture mitigates the unavailability of the exact-match domain while retaining the core brand strength. This is a top-tier strategic choice.' },
    { name: 'Sanad', cost: 0, category: 'Top-Tier (Acquire)', scores: { clarity: 9, uniqueness: 8, seo: 8, international: 9, legal: 9, score: 8.6 }, analysis: 'Arabic for "support". A name with profound positive meaning, conveying trust, reliability, and foundation. Its successful use by the Jordanian government for a digital ID platform demonstrates its power. Low legal risk and high cultural resonance make it a premier choice.' },
    { name: 'ateaseinsurance.com', cost: 3300, category: 'Hybrid', scores: { clarity: 8, uniqueness: 6, seo: 7, international: 7, legal: 6, score: 6.8 }, analysis: 'Leverages a positive idiom ("at ease") to evoke comfort and security. Professional and clear. Its viability is entirely contingent on the legal status of an active Florida corporation with the same name. A solid, if more conservative, choice if legally clear.' },
    { name: 'Insure Pax', cost: 0, category: 'Conceptual', scores: { clarity: 7, uniqueness: 7, seo: 7, international: 6, legal: 6, score: 6.6 }, analysis: 'Combines the direct "Insure" with the evocative "Pax" (peace). The name is clear and positive. Risks include trademark conflicts with PAX Labs and PAX Financial, and potential for brand confusion in Arabic-speaking markets where "Pax" can mean "passengers". A viable option, but requires careful marketing and legal vetting.' },
    { name: 'Sanixa', cost: 0, category: 'Abstract/Modern', scores: { clarity: 6, uniqueness: 8, seo: 7, international: 7, legal: 8, score: 7.2 }, analysis: 'A modern, stylized variant of the name "Sania" (brilliant/exalted). The name is phonetically engineered to sound clean, technical, and effective, as demonstrated by its use by a sanitation company. High brand potential as a blank slate.' },
    { name: 'Sanadi', cost: 0, category: 'Regional/Occupational', scores: { clarity: 5, uniqueness: 7, seo: 5, international: 6, legal: 7, score: 6.0 }, analysis: 'A name with deep roots in the Indian subcontinent, meaning "authorized officer" or relating to a legal warrant. Also refers to a musical instrument in Kannada. It is a unique historical marker but may be too niche for a global brand.' },
    { name: 'securecoverpro.com', cost: 1, category: 'Security/Trust', scores: { clarity: 7, uniqueness: 4, seo: 6, international: 6, legal: 5, score: 5.6 }, analysis: 'A functional but generic and uninspired name. "Secure Cover" is highly descriptive and lacks brand-building potential. The "-pro" suffix is a detractor. Offers little strategic value beyond its low cost.' },
    { name: 'NetEnsure.com', cost: 3523, category: 'High-Risk (Avoid)', scores: { clarity: 8, uniqueness: 4, seo: 6, international: 6, legal: 2, score: 5.2 }, analysis: 'A linguistically strong name that is nullified by direct phonetic conflicts with established "Netinsure" brands in the benefits and insurance sectors. The high IP risk and certainty of brand confusion make this domain an unwise investment at any price.' },
    { name: 'Insuredly.com', cost: 3699, category: 'High-Risk (Avoid)', scores: { clarity: 9, uniqueness: 3, seo: 5, international: 7, legal: 2, score: 5.2 }, analysis: 'A modern and tech-forward name rendered unusable by direct conflicts with existing, funded competitors named "Insuredly" and "Insurely." The brand concept is already saturated, making it impossible to build a unique and defensible identity.' },
    { name: 'JustProtect.com', cost: 13799, category: 'High-Risk (Avoid)', scores: { clarity: 10, uniqueness: 2, seo: 7, international: 6, legal: 1, score: 5.2 }, analysis: 'A powerful and direct name that has already been claimed by multiple companies in the most relevant industries (cybersecurity and insurance). There is no opportunity to establish a unique and defensible brand, making it a strategic liability.' },
    { name: 'ensureease.com', cost: 1, category: 'Ease/Simplicity', scores: { clarity: 8, uniqueness: 3, seo: 6, international: 7, legal: 1, score: 5.0 }, analysis: 'High risk. While phonetically strong, the name creates a near-certain trademark conflict with "Ensure," the globally recognized nutritional supplement brand owned by Abbott Laboratories. This makes the name strategically unviable.' },
    { name: 'trustshieldpro.com', cost: 1, category: 'Security/Trust', scores: { clarity: 7, uniqueness: 3, seo: 5, international: 6, legal: 2, score: 4.6 }, analysis: 'High risk. The core "Trustshield" is already in use by multiple entities in related sectors, including an insurance agency and a safety systems manufacturer. The "-pro" suffix can cheapen the brand. Low cost masks significant legal hurdles.' },
    { name: 'OmegaSure.com', cost: 6799, category: 'High-Risk (Avoid)', scores: { clarity: 6, uniqueness: 4, seo: 5, international: 5, legal: 3, score: 4.6 }, analysis: 'A professional-sounding name critically undermined by its widespread use as "Omegasure" for health supplements. This creates an unacceptable level of brand confusion and IP risk, particularly for any venture in health or life insurance.' },
    { name: 'Insure U', cost: 0, category: 'Descriptive', scores: { clarity: 6, uniqueness: 4, seo: 4, international: 6, legal: 2, score: 4.4 }, analysis: 'A simple, descriptive name that is easy to understand. However, it is legally unavailable. The domain InsureU.com redirects to a competitor, and a trademark is already registered for "INSURE-U.COM WE MAKE HEALTH INSURANCE EASIER" by another agency.' },
    { name: 'Sanix', cost: 0, category: 'High-Risk (Avoid)', scores: { clarity: 4, uniqueness: 7, seo: 5, international: 5, legal: 4, score: 5.0 }, analysis: 'A modern, engineered name from "Sanitation + X". While used by a legitimate Japanese corporation, its identity is severely compromised by its use as the alias of a notorious cybercriminal responsible for the "Collection #1" data breach. The negative association creates unacceptable brand risk.' },
    { name: 'Insure Joint', cost: 0, category: 'Descriptive', scores: { clarity: 4, uniqueness: 5, seo: 5, international: 4, legal: 2, score: 4.0 }, analysis: 'This name is a generic legal term ("joint insurance"), making it extremely difficult to trademark as it would be considered "merely descriptive" of a service type. It also creates potential brand confusion regarding the company\'s ownership structure.' },
    { name: 'insureeaze.com', cost: 1, category: 'Ease/Simplicity', scores: { clarity: 6, uniqueness: 2, seo: 4, international: 5, legal: 2, score: 3.8 }, analysis: 'High risk. The unconventional spelling creates user friction and can be perceived as unprofessional. More importantly, it faces a high probability of trademark conflict with existing companies "Insureaze" and "Insureze".' },
    { name: 'insureeez.com', cost: 1, category: 'Ease/Simplicity', scores: { clarity: 5, uniqueness: 2, seo: 3, international: 5, legal: 2, score: 3.4 }, analysis: 'High risk. Even more problematic spelling than insureeaze.com, exacerbating user error and unprofessional perception. Faces the same significant legal risks from existing, phonetically identical brands.' },
    { name: 'EVA', cost: 0, category: 'Acronym', scores: { clarity: 4, uniqueness: 3, seo: 2, international: 5, legal: 2, score: 3.2 }, analysis: 'The domain EVA.com is owned by a major airline. The name has a registered trademark for "Economic Value Added" in the financial sector, creating a direct conflict. While it has a positive meaning in Arabic ("life"), the legal and digital barriers are too high.' },
    { name: 'ZAX', cost: 0, category: 'Acronym', scores: { clarity: 2, uniqueness: 4, seo: 3, international: 4, legal: 3, score: 3.2 }, analysis: 'The domain ZAX.com redirects to Zacks Investment Research, a major financial firm. The trademark landscape is crowded. The name has no inherent meaning, making it a poor choice with significant legal and digital obstacles.' },
    { name: 'allsura.com', cost: 2499, category: 'Abstract/Sura', scores: { clarity: 5, uniqueness: 5, seo: 4, international: 1, legal: 1, score: 3.2 }, analysis: 'Unacceptable risk. "Sura" is a sacred term in Islam (chapter of the Quran), posing a severe risk of causing profound religious offense. It also creates a direct trademark conflict with SURA, a major Latin American insurer. Strategically and ethically untenable.' },
    { name: 'The Connect', cost: 0, category: 'Connector', scores: { clarity: 5, uniqueness: 2, seo: 2, international: 5, legal: 1, score: 3.0 }, analysis: 'A generic and widely used term. The name has a fatal flaw: a direct and overwhelming trademark conflict with "CONNECT, powered by American Family Insurance," a major insurance brand. This makes the name legally untenable for use in the insurance sector.' },
    { name: 'Insura', cost: 0, category: 'Descriptive', scores: { clarity: 4, uniqueness: 2, seo: 2, international: 5, legal: 2, score: 3.0 }, analysis: 'A generic name derived from "insurance". The domain Insura.com redirects to a major competitor (insure.com). The name is unregistrable as a trademark due to being merely descriptive and lacks any distinctiveness to build a brand upon.' },
    { name: 'The Insure', cost: 0, category: 'Descriptive', scores: { clarity: 4, uniqueness: 2, seo: 2, international: 5, legal: 2, score: 3.0 }, analysis: 'Similar to "Insura," adding "The" does not solve the core problem of being generic and descriptive. The domain is owned by a competitor, and the name is legally indefensible and difficult to brand effectively.' },
    { name: 'gosura.com', cost: 2988, category: 'Abstract/Sura', scores: { clarity: 4, uniqueness: 5, seo: 4, international: 1, legal: 1, score: 3.0 }, analysis: 'Unacceptable risk. Same religious and trademark conflicts as allsura.com. The "go" prefix does not mitigate the core issues. Additionally, it phonetically resembles "Gokshura," an Ayurvedic herb, adding another layer of brand confusion.' },
    { name: 'Ensure U', cost: 0, category: 'Descriptive', scores: { clarity: 3, uniqueness: 3, seo: 3, international: 4, legal: 1, score: 2.8 }, analysis: 'Faces an insurmountable trademark conflict with Abbott\'s globally recognized "Ensure" brand of nutritional products. The phonetic similarity to "Insure U" creates a secondary legal risk. Impossible to register, defend, or brand.' },
    { name: 'ARO', cost: 0, category: 'Acronym', scores: { clarity: 2, uniqueness: 3, seo: 2, international: 4, legal: 3, score: 2.8 }, analysis: 'A three-letter acronym with a premium .com domain owned by a major organization (aro.org). The trademark landscape is crowded, with a previously abandoned application for "ARO" in the insurance class. High risk and low brand potential.' },
    { name: 'surabay.com', cost: 2990, category: 'Abstract/Sura', scores: { clarity: 2, uniqueness: 2, seo: 2, international: 2, legal: 3, score: 2.2 }, analysis: 'Poor choice. The name is nearly identical to Surabaya, Indonesia\'s second-largest city, making it a geo-domain unsuitable for branding. The city\'s name derives from "sura" (shark) and "baya" (crocodile), both negative connotations for an insurance brand.' },
    { name: 'Swanix', cost: 0, category: 'Abstract/Rare', scores: { clarity: 2, uniqueness: 8, seo: 4, international: 5, legal: 8, score: 5.4 }, analysis: 'An extremely rare surname with no clear etymology, likely a variant of "Swan". As a blank slate, it has high legal viability but requires significant marketing to build any meaning or brand recognition.' }
];

const themeInfo = {
    'Top-Tier (Acquire)': {
        description: "These names represent the best investment opportunities. They offer a strong combination of brand potential, market relevance, and a clear or manageable legal landscape.",
        pros: "High brand equity potential, legally defensible, strong market fit.",
        cons: "May come with a higher, but justified, acquisition cost."
    },
    'High-Potential (Negotiate)': {
        description: "This category includes names with excellent branding qualities that are hampered by a significant drawback, such as a very high price or moderate legal risks that require careful navigation.",
        pros: "Excellent brand messaging and market appeal.",
        cons: "Current valuation may be misaligned with the asset's true, risk-adjusted value. Requires negotiation or a higher risk tolerance."
    },
    'High-Risk (Avoid)': {
        description: "This category includes names that are fundamentally flawed for strategic business use. These names face significant, often insurmountable, challenges such as direct trademark conflicts, brand saturation, or other fatal liabilities.",
        pros: "They serve as useful examples of what to avoid.",
        cons: "High risk of legal action, impossible to build a unique brand, creates customer confusion, and signals low trust."
    },
    'Hybrid': {
        description: "This strategy combines two core value propositions—typically 'ease' and 'trust'—to create a powerful, modern brand message that resonates with today's insurtech consumers.",
        pros: "Creates a highly relevant and differentiated market position. The names are often memorable and professional.",
        cons: "Finding a unique and legally available combination can be challenging. Premium domains may be costly."
    },
    'Security/Trust': {
        description: "This approach focuses on the foundational pillars of the insurance industry: protection, security, and trust. The brand promise is one of unwavering reliability and dependability.",
        pros: "The message is clear and directly addresses a core consumer need in the insurance space.",
        cons: "This is a very crowded branding category, making it difficult to find a unique name. Many names can sound generic or dated."
    },
    'Ease/Simplicity': {
        description: "This cohort seeks to capitalize on a primary insurtech differentiator: making insurance simple, fast, and user-friendly. The core brand promise is a frictionless customer experience.",
        pros: "Directly communicates a modern value proposition that appeals to consumers frustrated with traditional insurance.",
        cons: "Often relies on misspelled or generic terms, which can appear unprofessional and face significant legal challenges from existing brands."
    },
    'Abstract/Sura': {
        description: "This cohort uses the root word 'Sura' to create short, modern-sounding names. These names are intended as 'blank slates' to be imbued with meaning through marketing.",
        pros: "The names are short and can sound modern.",
        cons: "Carries profound and unacceptable risks, including direct trademark conflicts with a major global insurer and the potential for severe, widespread religious offense."
    },
    'Conceptual': {
        description: "This approach uses evocative words to communicate a core benefit or feeling, such as peace or security. They aim for a balance between clarity and brandability.",
        pros: "Communicates a positive value proposition, sounds professional, and can be highly brandable.",
        cons: "Good concepts can be competitive, leading to potential market saturation and the need for careful legal vetting."
    },
    'Abstract': {
        description: "This strategy focuses on creating a unique, modern-sounding 'blank slate' name. The goal is to build a brand identity from scratch, free from the constraints of existing word associations.",
        pros: "High potential for uniqueness and strong legal protection.",
        cons: "Requires a significant marketing investment to build meaning and brand recognition. Can feel cold or lack direction if not executed well."
    },
    'Connector': {
        description: "This strategy uses common 'connector' words like 'link' or 'bridge' to suggest a platform or service that links various parts of the insurance ecosystem. This approach prioritizes functional clarity.",
        pros: "The metaphor is intuitive and easily understood by consumers.",
        cons: "This branding category is highly saturated, making it difficult to find a unique and legally defensible name. Brands can appear as followers rather than innovators."
    },
    'Descriptive': {
        description: "This category includes names that are generic or directly describe an insurance-related function. They attempt to capture a foundational, authoritative position in the market.",
        pros: "The names are simple and directly connected to the industry.",
        cons: "These names are almost always legally unavailable due to trademark conflicts and domain squatting. They are non-distinctive and exceptionally difficult to brand."
    },
    'Acronym': {
        description: "This strategy uses short, three-letter acronyms to create a modern, tech-forward brand identity. The goal is a concise and memorable name.",
        pros: "Can be short and memorable once established.",
        cons: "The market for short, pronounceable acronyms is almost completely saturated. They face extremely high digital and legal barriers and require significant marketing to build meaning."
    },
    'Regional/Occupational': {
        description: "This strategy leverages names with deep historical or cultural roots in a specific region, often derived from occupations or administrative titles.",
        pros: "Can have a strong, authentic connection to a target demographic.",
        cons: "May be too niche or obscure for a broad, global audience."
    },
    'Abstract/Modern': {
        description: "This approach uses modern, stylized, or engineered names that are phonetically appealing but lack inherent meaning, serving as a 'blank slate' for branding.",
        pros: "High potential for uniqueness and strong legal protection.",
        cons: "Requires significant marketing to build brand meaning and recognition."
    },
    'Abstract/Rare': {
        description: "This category includes extremely rare or obscure names with no established meaning or brand association.",
        pros: "Very high legal viability and uniqueness.",
        cons: "Requires the most significant marketing investment to build brand awareness from scratch."
    }
};

let currentSort = { column: 'score', order: 'desc' };
let charts = {};

document.addEventListener('DOMContentLoaded', () => {
    initApp();
});

function initApp() {
    setupNavigation();
    renderAllViews();
}

function setupNavigation() {
    const navLinks = document.querySelectorAll('.nav-link');
    navLinks.forEach(link => {
        link.addEventListener('click', (e) => {
            e.preventDefault();
            const viewId = link.dataset.view;
            
            navLinks.forEach(l => l.classList.remove('active'));
            link.classList.add('active');

            document.querySelectorAll('.view').forEach(view => {
                view.classList.remove('active');
            });
            document.getElementById(viewId).classList.add('active');
            
            if (viewId === 'dashboard') {
                initDashboardCharts();
            } else if (viewId === 'quadrant') {
                initRiskRewardChart();
            }
        });
    });
}

function renderAllViews() {
    renderDashboard();
    renderComparisonTable();
    renderThemes();
    initRiskRewardChart();
    setupModal();
}

function renderDashboard() {
    const topRec = [...domainData].sort((a, b) => b.scores.score - a.scores.score)[0];
    if (topRec) {
        const tierClass = topRec.scores.score >= 8 ? 'tier-1' : topRec.scores.score >= 6.5 ? 'tier-2' : 'tier-3';
        const tierColor = topRec.scores.score >= 8 ? 'text-green-600' : topRec.scores.score >= 6.5 ? 'text-orange-600' : 'text-red-600';
        const tierIcon = topRec.scores.score >= 8 ? '🏆' : topRec.scores.score >= 6.5 ? '⚠️' : '🚫';
        document.getElementById('top-recommendation-card').innerHTML = `
            <div class="bg-yellow-50 p-4 rounded-md ${tierClass}" onclick="showModal('${topRec.name}')">
                <h4 class="font-bold text-xl ${tierColor}">${tierIcon} ${topRec.name}</h4>
                <p class="text-sm text-gray-600 mt-1">${topRec.category} - $${topRec.cost.toLocaleString()}</p>
                <div class="flex justify-between items-baseline mt-4">
                    <span class="text-3xl font-bold ${tierColor}">${topRec.scores.score.toFixed(1)}</span>
                </div>
            </div>`;
    }
    initDashboardCharts();
}

function initDashboardCharts() {
    initScoreDistributionChart();
    initTierDistributionChart();
}

function renderComparisonTable() {
    const tbody = document.getElementById('comparison-table-body');
    const sortedData = [...domainData].sort((a, b) => {
        let valA = typeof a.scores[currentSort.column] !== 'undefined' ? a.scores[currentSort.column] : a[currentSort.column];
        let valB = typeof b.scores[currentSort.column] !== 'undefined' ? b.scores[currentSort.column] : b[currentSort.column];
        
        if (typeof valA === 'string') {
            return currentSort.order === 'asc' ? valA.localeCompare(valB) : valB.localeCompare(valA);
        } else {
            return currentSort.order === 'asc' ? valA - valB : valB - valA;
        }
    });

    tbody.innerHTML = sortedData.map(d => {
        const tierClass = d.scores.score >= 8 ? 'tier-1' : d.scores.score >= 6.5 ? 'tier-2' : 'tier-3';
        return `
            <tr class="bg-white border-b hover:bg-gray-50 cursor-pointer ${tierClass}" onclick="showModal('${d.name}')">
                <th scope="row" class="px-6 py-4 font-medium text-gray-900 whitespace-nowrap">${d.name}</th>
                <td class="px-6 py-4">${d.scores.clarity}</td>
                <td class="px-6 py-4">${d.scores.uniqueness}</td>
                <td class="px-6 py-4">${d.scores.seo}</td>
                <td class="px-6 py-4">${d.scores.international}</td>
                <td class="px-6 py-4">${d.scores.legal}</td>
                <td class="px-6 py-4 font-bold text-gray-800">${d.scores.score.toFixed(1)}</td>
            </tr>
        `;
    }).join('');

    const headers = document.querySelectorAll('.sortable-header');
    headers.forEach(header => {
        header.addEventListener('click', () => {
            const sortKey = header.dataset.sort;
            if (currentSort.column === sortKey) {
                currentSort.order = currentSort.order === 'asc' ? 'desc' : 'asc';
            } else {
                currentSort.column = sortKey;
                currentSort.order = 'desc';
            }
            headers.forEach(h => { h.classList.remove('active', 'asc', 'desc'); h.className = h.className.replace(/ asc| desc/g, ''); });
            header.classList.add('active', currentSort.order);
            renderComparisonTable();
        });
    });
}

function renderThemes() {
    const container = document.getElementById('themes-container');
    container.innerHTML = Object.keys(themeInfo).map(theme => {
        const domainsInTheme = domainData.filter(d => d.category === theme);
        if (domainsInTheme.length === 0) return '';
        return `
            <div class="bg-white p-6 rounded-lg shadow-lg">
                <h3 class="text-2xl font-bold text-[#A57C5A] mb-2">${theme}</h3>
                <p class="text-gray-600 mb-4">${themeInfo[theme].description}</p>
                <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
                    <div>
                        <h4 class="font-semibold text-green-600">Strengths</h4>
                        <p class="text-sm text-gray-500">${themeInfo[theme].pros}</p>
                    </div>
                    <div>
                        <h4 class="font-semibold text-red-600">Weaknesses</h4>
                        <p class="text-sm text-gray-500">${themeInfo[theme].cons}</p>
                    </div>
                </div>
                <div class="mt-6 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4">
                    ${domainsInTheme.sort((a,b) => b.scores.score - a.scores.score).map(d => {
                        const tierClass = d.scores.score >= 8 ? 'tier-1' : d.scores.score >= 6.5 ? 'tier-2' : 'tier-3';
                        return `
                        <div class="p-4 rounded-md border-l-4 cursor-pointer hover:shadow-md transition-shadow bg-gray-50 ${tierClass}" onclick="showModal('${d.name}')">
                            <div class="flex justify-between items-center">
                                <span class="font-semibold text-gray-800">${d.name}</span>
                                <span class="font-bold text-lg text-gray-700">${d.scores.score.toFixed(1)}</span>
                            </div>
                        </div>
                        `
                    }).join('')}
                </div>
            </div>
        `;
    }).join('');
}


function setupModal() {
    const modal = document.getElementById('modal');
    const closeButtons = [document.getElementById('modal-close'), document.getElementById('modal-close-footer')];
    closeButtons.forEach(btn => btn.addEventListener('click', () => modal.classList.add('hidden')));
    modal.addEventListener('click', (e) => {
        if (e.target === modal) {
            modal.classList.add('hidden');
        }
    });
}

function showModal(domainName) {
    const domain = domainData.find(d => d.name === domainName);
    if (domain) {
        document.getElementById('modal-title').textContent = domain.name;
        document.getElementById('modal-subtitle').textContent = `Category: ${domain.category} | Domain Cost: $${domain.cost.toLocaleString()}`;
        
        const scoreBars = Object.keys(domain.scores).map(key => {
            if (key === 'score') return '';
            const score = domain.scores[key];
            const color = score >= 8 ? 'bg-green-500' : score >= 5 ? 'bg-yellow-500' : 'bg-red-500';
            return `
                <div class="mb-2">
                    <div class="flex justify-between mb-1">
                        <span class="text-sm font-medium text-gray-700 capitalize">${key.replace(/([A-Z])/g, ' $1')}</span>
                        <span class="text-sm font-medium text-gray-700">${score}/10</span>
                    </div>
                    <div class="w-full bg-gray-200 rounded-full h-2.5">
                        <div class="${color} h-2.5 rounded-full" style="width: ${score * 10}%"></div>
                    </div>
                </div>
            `;
        }).join('');

        document.getElementById('modal-body').innerHTML = `
            <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
                <div>
                    <h4 class="font-bold text-lg mb-3">Analysis Summary</h4>
                    <p class="text-gray-600">${domain.analysis}</p>
                </div>
                <div>
                    <h4 class="font-bold text-lg mb-3">Scoring Breakdown</h4>
                    ${scoreBars}
                    <div class="mt-4 pt-4 border-t">
                        <div class="flex justify-between items-center">
                           <span class="text-lg font-bold text-gray-800">Overall Strategic Score</span>
                           <span class="text-2xl font-bold text-[#A57C5A]">${domain.scores.score.toFixed(1)}</span>
                        </div>
                    </div>
                </div>
            </div>
        `;
        document.getElementById('modal').classList.remove('hidden');
        document.getElementById('modal').classList.add('flex');
    }
}


function initScoreDistributionChart() {
    const ctx = document.getElementById('scoreDistributionChart').getContext('2d');
    if (charts.scoreDistribution) charts.scoreDistribution.destroy();
    
    const scoreBrackets = { '0-2': 0, '2-4': 0, '4-6': 0, '6-8': 0, '8-10': 0 };
    domainData.forEach(d => {
        const score = d.scores.score;
        if (score < 2) scoreBrackets['0-2']++;
        else if (score < 4) scoreBrackets['2-4']++;
        else if (score < 6) scoreBrackets['4-6']++;
        else if (score < 8) scoreBrackets['6-8']++;
        else scoreBrackets['8-10']++;
    });

    charts.scoreDistribution = new Chart(ctx, {
        type: 'bar',
        data: {
            labels: Object.keys(scoreBrackets),
            datasets: [{
                label: 'Number of Brands',
                data: Object.values(scoreBrackets),
                backgroundColor: ['#ef4444', '#f97316', '#eab308', '#84cc16', '#22c55e'],
                borderRadius: 4
            }]
        },
        options: {
            responsive: true, maintainAspectRatio: false,
            plugins: { legend: { display: false }, tooltip: { displayColors: false } },
            scales: {
                y: { beginAtZero: true, grid: { drawOnChartArea: false }, ticks: { stepSize: 5 } },
                x: { grid: { display: false }, title: { display: true, text: 'Strategic Score Bracket'} }
            }
        }
    });
}

function initTierDistributionChart() {
    const ctx = document.getElementById('tierDistributionChart').getContext('2d');
    if (charts.tierDistribution) charts.tierDistribution.destroy();
    
    const tiers = { 'Top Tier (8+)': 0, 'Viable (6.5-8)': 0, 'High-Risk / Flawed (<6.5)': 0 };
    domainData.forEach(d => {
        const score = d.scores.score;
        if (score >= 8) tiers['Top Tier (8+)']++;
        else if (score >= 6.5) tiers['Viable (6.5-8)']++;
        else tiers['High-Risk / Flawed (<6.5)']++;
    });

    charts.tierDistribution = new Chart(ctx, {
        type: 'doughnut',
        data: {
            labels: Object.keys(tiers),
            datasets: [{
                data: Object.values(tiers),
                backgroundColor: ['#22c55e', '#f97316', '#ef4444'],
                borderColor: '#F8F7F4',
                borderWidth: 4
            }]
        },
        options: {
            responsive: true, maintainAspectRatio: false,
            plugins: {
                legend: { position: 'right' }
            }
        }
    });
}

function initRiskRewardChart() {
    const ctx = document.getElementById('riskRewardChart').getContext('2d');
    if (charts.riskReward) charts.riskReward.destroy();
    
    const chartData = domainData.map(d => {
        const riskScore = 10 - ((d.scores.uniqueness + d.scores.legal) / 2);
        return {
            x: riskScore,
            y: d.scores.clarity,
            r: d.scores.score * 2.5,
            name: d.name
        };
    });

    charts.riskReward = new Chart(ctx, {
        type: 'bubble',
        data: {
            datasets: [{
                label: 'Brand Candidates',
                data: chartData,
                backgroundColor: (context) => {
                    if(!context.raw) { return 'rgba(0,0,0,0.1)'; }
                    const data = context.raw;
                    if (data.x < 4 && data.y > 6) return 'rgba(34, 197, 94, 0.7)';
                    if (data.x >= 4 && data.y > 6) return 'rgba(234, 179, 8, 0.7)';
                    if (data.x < 4 && data.y <= 6) return 'rgba(249, 115, 22, 0.7)';
                    return 'rgba(239, 68, 68, 0.7)';
                },
                borderColor: 'rgba(0,0,0,0.2)'
            }]
        },
        options: {
            responsive: true, maintainAspectRatio: false,
            plugins: {
                legend: { display: false },
                tooltip: {
                    callbacks: {
                        label: function(context) {
                            const d = context.raw;
                            return `${d.name}: Risk ${d.x.toFixed(1)}, Reward ${d.y}`;
                        }
                    }
                },
                annotation: {
                    annotations: {
                        xLine: { type: 'line', xMin: 4, xMax: 4, borderColor: 'rgba(0,0,0,0.2)', borderWidth: 1, borderDash: [6, 6] },
                        yLine: { type: 'line', yMin: 6, yMax: 6, borderColor: 'rgba(0,0,0,0.2)', borderWidth: 1, borderDash: [6, 6] },
                        topLeftLabel: { type: 'label', xValue: 2, yValue: 8, content: 'Prime Candidates', font: {size: 14}, color: 'rgba(0,0,0,0.5)'},
                        topRightLabel: { type: 'label', xValue: 7, yValue: 8, content: 'High-Stakes', font: {size: 14}, color: 'rgba(0,0,0,0.5)'},
                        bottomLeftLabel: { type: 'label', xValue: 2, yValue: 4, content: 'Low Potential', font: {size: 14}, color: 'rgba(0,0,0,0.5)'},
                        bottomRightLabel: { type: 'label', xValue: 7, yValue: 4, content: 'Avoid', font: {size: 14}, color: 'rgba(0,0,0,0.5)'}
                    }
                }
            },
            scales: {
                x: { title: { display: true, text: 'Market & Legal Risk (Higher is worse)' }, min: 0, max: 10 },
                y: { title: { display: true, text: 'Brand Clarity / Reward' }, min: 0, max: 10 }
            },
            onClick: (e, elements) => {
                if (elements.length > 0) {
                    const domainName = elements[0].element.$context.raw.name;
                    showModal(domainName);
                }
            }
        }
    });
}
</script>
</body>
</html>