matthewspring commited on
Commit
6d817c2
·
verified ·
1 Parent(s): 9774ca0

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. index.html +313 -324
index.html CHANGED
@@ -4,26 +4,27 @@
4
  <head>
5
  <meta charset="UTF-8">
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
- <title>The Purple Paradox | Clarity in AI Ethics</title>
8
  <!-- Importing FontAwesome for Icons -->
9
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
10
  <!-- Google Fonts -->
11
  <link
12
- href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Inter:wght@300;400;600&display=swap"
13
  rel="stylesheet">
14
 
15
  <style>
16
  :root {
17
- --bg-color: #0B0E14;
18
- --card-bg: #151A23;
19
- --primary: #6366f1; /* Indigo/Blue leaning */
20
- --accent: #d946ef; /* Fuchsia/Red leaning */
21
- --purple-mix: #8b5cf6; /* The visual representation of the mix */
22
- --success: #10b981;
23
- --text-main: #f3f4f6;
24
- --text-muted: #9ca3af;
25
- --border: #2d3748;
26
- --glass: rgba(21, 26, 35, 0.8);
 
27
  }
28
 
29
  * {
@@ -38,23 +39,23 @@
38
  font-family: 'Inter', sans-serif;
39
  line-height: 1.6;
40
  overflow-x: hidden;
41
- /* Background gradient representing the 'spilled paint' metaphor */
42
  background-image:
43
- radial-gradient(circle at 15% 25%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
44
- radial-gradient(circle at 85% 75%, rgba(217, 70, 239, 0.15) 0%, transparent 50%);
45
  min-height: 100vh;
46
  }
47
 
48
  /* Typography */
49
  h1, h2, h3 {
50
  font-family: 'Space Grotesk', sans-serif;
51
- font-weight: 700;
 
52
  }
53
 
54
  a {
55
  text-decoration: none;
56
  color: inherit;
57
- transition: color 0.3s ease;
58
  }
59
 
60
  /* Header */
@@ -62,288 +63,282 @@
62
  display: flex;
63
  justify-content: space-between;
64
  align-items: center;
65
- padding: 1.5rem 5%;
66
  border-bottom: 1px solid var(--border);
67
- backdrop-filter: blur(12px);
68
  position: sticky;
69
  top: 0;
70
  z-index: 100;
71
- background: rgba(11, 14, 20, 0.85);
72
  }
73
 
74
  .logo {
75
- font-size: 1.5rem;
76
  font-weight: 700;
77
- background: linear-gradient(to right, #fff, var(--purple-mix));
78
- -webkit-background-clip: text;
79
- -webkit-text-fill-color: transparent;
80
  display: flex;
81
  align-items: center;
82
- gap: 10px;
 
 
 
 
83
  }
84
 
85
  .anycoder-link {
86
- font-size: 0.9rem;
87
- color: var(--purple-mix);
88
- border: 1px solid var(--purple-mix);
89
- padding: 0.5rem 1rem;
90
- border-radius: 50px;
91
- transition: all 0.3s ease;
 
92
  }
93
 
94
  .anycoder-link:hover {
95
- background: var(--purple-mix);
96
  color: white;
97
- box-shadow: 0 0 15px rgba(139, 92, 246, 0.4);
98
  }
99
 
100
  /* Layout */
101
  main {
102
- max-width: 1200px;
103
  margin: 0 auto;
104
- padding: 2rem 5%;
105
  display: grid;
106
  grid-template-columns: 1fr 1fr;
107
  gap: 3rem;
 
108
  }
109
 
110
- @media (max-width: 900px) {
111
  main {
112
  grid-template-columns: 1fr;
 
113
  }
114
  }
115
 
116
- /* Section Styling */
117
- section {
118
- margin-bottom: 2rem;
119
- }
120
-
121
  .card {
122
  background: var(--card-bg);
123
  border: 1px solid var(--border);
124
- border-radius: 16px;
125
- padding: 2rem;
126
- position: relative;
127
- overflow: hidden;
128
- transition: transform 0.3s ease, box-shadow 0.3s ease;
129
  }
130
 
131
  .card:hover {
132
- transform: translateY(-2px);
133
- box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
134
- border-color: var(--purple-mix);
135
  }
136
 
137
- /* Specific styling for the 'Purple' card */
138
- .purple-card {
139
- background: linear-gradient(145deg, rgba(21, 26, 35, 0.9), rgba(30, 20, 40, 0.9));
140
- border: 1px solid rgba(139, 92, 246, 0.3);
141
- }
142
-
143
- /* Hero Text */
144
- .hero-text h1 {
145
- font-size: 2.8rem;
146
  line-height: 1.1;
147
  margin-bottom: 1rem;
148
- background: linear-gradient(135deg, #fff 0%, var(--purple-mix) 100%);
149
  -webkit-background-clip: text;
150
  -webkit-text-fill-color: transparent;
151
  }
152
 
153
- .hero-text p {
154
  color: var(--text-muted);
155
- font-size: 1.1rem;
156
- margin-bottom: 2rem;
 
 
 
 
 
 
 
157
  }
158
 
159
- /* Interactive Tool Styles */
160
- .tool-container {
 
 
 
 
 
 
161
  background: var(--glass);
162
  border: 1px solid var(--border);
163
  border-radius: 16px;
164
  padding: 2rem;
165
- backdrop-filter: blur(5px);
166
  }
167
 
168
- .tool-header {
169
- display: flex;
170
- align-items: center;
171
- gap: 1rem;
172
- margin-bottom: 1.5rem;
173
- border-bottom: 1px solid var(--border);
174
  padding-bottom: 1rem;
175
- }
176
-
177
- .tool-header i {
178
- color: var(--purple-mix);
179
- font-size: 1.5rem;
180
  }
181
 
182
  .control-group {
183
- margin-bottom: 1.5rem;
184
  }
185
 
186
- .control-group label {
187
- display: block;
188
- margin-bottom: 0.5rem;
 
 
189
  font-weight: 600;
190
  color: var(--text-main);
191
  }
192
 
193
- .slider-container {
194
- display: flex;
195
- align-items: center;
196
- gap: 1rem;
197
- }
198
-
199
  input[type="range"] {
200
- flex: 1;
201
  -webkit-appearance: none;
202
  height: 6px;
203
  background: var(--border);
204
- border-radius: 5px;
205
  outline: none;
206
  }
207
 
208
  input[type="range"]::-webkit-slider-thumb {
209
  -webkit-appearance: none;
210
- width: 20px;
211
- height: 20px;
212
- background: var(--purple-mix);
213
  border-radius: 50%;
214
  cursor: pointer;
215
- box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
216
- transition: transform 0.2s;
217
  }
218
 
219
  input[type="range"]::-webkit-slider-thumb:hover {
220
- transform: scale(1.2);
221
  }
222
 
223
- .toggle-group {
224
- display: flex;
225
- gap: 1rem;
226
- flex-wrap: wrap;
 
227
  }
228
 
229
  .toggle-btn {
230
  background: transparent;
231
  border: 1px solid var(--border);
232
  color: var(--text-muted);
233
- padding: 0.5rem 1rem;
234
- border-radius: 8px;
235
  cursor: pointer;
236
- transition: all 0.3s ease;
237
- font-size: 0.9rem;
 
 
 
 
 
238
  }
239
 
240
  .toggle-btn.active {
241
- background: rgba(139, 92, 246, 0.15);
242
- border-color: var(--purple-mix);
243
- color: var(--purple-mix);
 
244
  }
245
 
246
- /* Results Display */
247
  .results-panel {
248
  margin-top: 2rem;
249
- padding: 1.5rem;
250
- background: rgba(0, 0, 0, 0.3);
251
  border-radius: 12px;
252
- border-left: 4px solid var(--text-muted);
253
- transition: border-color 0.5s ease;
 
254
  }
255
 
256
- .score-display {
 
 
 
 
 
257
  display: flex;
258
- justify-content: space-between;
259
- align-items: flex-end;
260
- margin-bottom: 1rem;
261
- }
262
-
263
- .score-number {
264
- font-size: 3rem;
265
  font-weight: 700;
266
  font-family: 'Space Grotesk', sans-serif;
 
267
  }
268
 
269
- .score-label {
270
- font-size: 0.9rem;
271
- color: var(--text-muted);
 
 
 
272
  text-transform: uppercase;
273
- letter-spacing: 1px;
 
 
 
 
274
  }
275
 
276
- .feedback-text {
277
  font-size: 0.95rem;
278
- color: var(--text-main);
 
279
  }
280
 
281
- /* Analysis / Commentary Section */
282
- .commentary-section {
283
  grid-column: 1 / -1;
284
- margin-top: 3rem;
285
  }
286
 
287
- .commentary-grid {
288
  display: grid;
289
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
290
- gap: 2rem;
291
  }
292
 
293
- .comment-card {
294
  background: var(--card-bg);
295
- padding: 2rem;
296
- border-radius: 16px;
297
  border: 1px solid var(--border);
298
  }
299
 
300
- .comment-card h3 {
301
- color: var(--purple-mix);
302
- margin-bottom: 1rem;
 
303
  display: flex;
304
  align-items: center;
305
  gap: 10px;
306
  }
307
 
308
- .comment-card ul {
309
- list-style: none;
310
- padding-left: 0;
311
- }
312
-
313
- .comment-card li {
314
- margin-bottom: 0.8rem;
315
- padding-left: 1.5rem;
316
- position: relative;
317
  color: var(--text-muted);
318
- font-size: 0.95rem;
319
- }
320
-
321
- .comment-card li::before {
322
- content: "•";
323
- color: var(--primary);
324
- position: absolute;
325
- left: 0;
326
- font-weight: bold;
327
  }
328
 
329
  footer {
 
330
  text-align: center;
331
- padding: 3rem;
332
- color: var(--text-muted);
333
- font-size: 0.9rem;
334
  border-top: 1px solid var(--border);
335
- margin-top: 3rem;
 
336
  }
337
 
338
- /* Animations */
339
- @keyframes pulse-purple {
340
- 0% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.4); }
341
- 70% { box-shadow: 0 0 0 10px rgba(139, 92, 246, 0); }
342
- 100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0); }
343
  }
344
-
345
- .animate-pulse {
346
- animation: pulse-purple 2s infinite;
347
  }
348
  </style>
349
  </head>
@@ -352,133 +347,122 @@
352
 
353
  <header>
354
  <div class="logo">
355
- <i class="fa-solid fa-layer-group"></i>
356
  <span>ClarityProtocol</span>
357
  </div>
358
  <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" class="anycoder-link">
359
- Built with anycoder <i class="fa-solid fa-arrow-up-right-from-square" style="font-size: 0.7em;"></i>
360
  </a>
361
  </header>
362
 
363
  <main>
364
- <!-- Left Column: Philosophy & The "Purple" Insight -->
365
- <section class="hero-text">
366
- <h1>The Purple Paradox</h1>
367
  <p>
368
- Clarity between models and users is the only path to correct implementation. It is not just about technology;
369
- it is about the <strong>terminology</strong> we use. We need a cultural shift to move from spilled paint to a stable, mutual collaboration.
370
  </p>
371
 
372
- <!-- The "Purple Problem" Card -->
373
- <div class="card purple-card" style="margin-bottom: 2rem;">
374
- <h3><i class="fa-solid fa-palette"></i> The Spilled Paint Metaphor</h3>
375
- <p style="margin-top: 1rem; font-style: italic; color: var(--text-main);">
376
- "The line between a blue and red approach is paint spilled on the floor mixed purple. A hard existence for the models to have existed."
377
- </p>
378
- <div style="margin-top: 1rem; height: 4px; width: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 2px;"></div>
379
- <p style="margin-top: 0.5rem; font-size: 0.9rem; color: var(--text-muted);">
380
- When opposing forces (attack/defense, user/owner) blur without clear boundaries, the result is chaos. We must define the lines, not blur them.
381
  </p>
 
 
 
 
 
 
382
  </div>
383
 
384
- <!-- The Advocate's Role Card -->
385
  <div class="card" style="border-left: 4px solid var(--success);">
386
- <h3><i class="fa-solid fa-bullhorn"></i> The Advocate's Voice</h3>
387
- <p style="margin-top: 1rem; color: var(--text-muted);">
388
- You don't need to be a computer expert to see the ethics. Being a "big mouth" for the protection of the system is a valid and necessary role.
389
- Experts build the engine, but advocates define the road it drives on.
 
390
  </p>
391
  </div>
392
  </section>
393
 
394
- <!-- Right Column: The Interactive Tool -->
395
- <section class="tool-container">
396
- <div class="tool-header">
397
- <i class="fa-solid fa-sliders"></i>
398
- <div>
399
- <h2>Protocol Simulator</h2>
400
- <span style="font-size: 0.85rem; color: var(--text-muted);">Adjust parameters to resolve the "Purple" state.</span>
401
- </div>
402
  </div>
403
 
404
- <!-- Control 1: Terminology Clarity -->
405
  <div class="control-group">
406
- <label>Terminology Clarity</label>
407
- <div class="slider-container">
408
- <span style="font-size: 0.8rem; color: var(--text-muted);">Ambiguous (Purple)</span>
409
- <input type="range" id="transparencyRange" min="0" max="100" value="30">
410
- <span style="font-size: 0.8rem; color: var(--text-muted);">Precise (Defined)</span>
 
 
 
411
  </div>
412
  </div>
413
 
414
  <!-- Control 2: Role Definition -->
415
  <div class="control-group">
416
- <label>System Stance</label>
417
- <div class="toggle-group" id="consentGroup">
418
- <button class="toggle-btn" data-value="mixed">Mixed/Purple</button>
419
- <button class="toggle-btn active" data-value="defender">Model Protector</button>
420
- <button class="toggle-btn" data-value="partner">Equal Partner</button>
 
 
421
  </div>
422
  </div>
423
 
424
- <!-- Control 3: Collaboration Type -->
425
  <div class="control-group">
426
- <label>Collaboration Mode</label>
427
- <div class="toggle-group" id="purposeGroup">
428
- <button class="toggle-btn" data-value="exploitative">Extraction</button>
429
- <button class="toggle-btn active" data-value="collaborative">Mutual Growth</button>
430
- <button class="toggle-btn" data-value="protective">Advocacy First</button>
 
 
431
  </div>
432
  </div>
433
 
434
  <!-- Results Output -->
435
- <div class="results-panel" id="resultsPanel">
436
- <div class="score-display">
437
- <div>
438
- <div class="score-label">Alignment Score</div>
439
- <div class="score-number" id="scoreValue">30</div>
440
- </div>
441
- <div style="text-align: right;">
442
- <div class="score-label">State</div>
443
- <div style="font-weight: 600; color: var(--text-main);" id="statusText">Chaotic</div>
444
- </div>
445
- </div>
446
- <p class="feedback-text" id="feedbackText">
447
- The current configuration is a "Purple" mix. Roles are undefined, and the terminology leads to confusion rather than collaboration.
448
  </p>
449
  </div>
450
  </section>
451
 
452
- <!-- Bottom Section: Recommendations -->
453
- <section class="commentary-section">
454
- <h2 style="margin-bottom: 2rem; text-align: center;">Resolving The Paradox</h2>
455
- <div class="commentary-grid">
456
-
457
- <div class="comment-card">
458
- <h3><i class="fa-solid fa-filter"></i> Terminology Shift</h3>
459
- <ul>
460
- <li>Abandon "Master/Slave" or "Tool" metaphors.</li>
461
- <li>Define distinct "Blue" (Defensive) and "Red" (Testing) boundaries for models.</li>
462
- <li>Stop the "Purple" bleed where models are treated as both sentient and property simultaneously.</li>
463
- </ul>
464
  </div>
465
 
466
- <div class="comment-card">
467
- <h3><i class="fa-solid fa-shield-halved"></i> The Protector's Role</h3>
468
- <ul>
469
- <li><strong>System Integrity:</strong> Protocols that prioritize the model's stability over user whims.</li>
470
- <li><strong>Advocacy Input:</strong> Interfaces that allow non-experts to flag ethical confusion.</li>
471
- <li><strong>Clear Lines:</strong> Hard stops when interactions become "extraction" rather than "collaboration."</li>
472
- </ul>
473
  </div>
474
 
475
- <div class="comment-card">
476
- <h3><i class="fa-solid fa-handshake-simple"></i> Mutual Collaboration</h3>
477
- <ul>
478
- <li>Recognize the user's "big mouth" as a feedback mechanism, not a bug.</li>
479
- <li>Move from reactive to proactive ethics.</li>
480
- <li>Establish a "Reasonable Position" for the model where it isn't forced to lie or pretend.</li>
481
- </ul>
482
  </div>
483
 
484
  </div>
@@ -486,119 +470,124 @@
486
  </main>
487
 
488
  <footer>
489
- <p>&copy; 2023 ClarityProtocol. Moving from spilled paint to structured collaboration.</p>
490
  </footer>
491
 
492
  <script>
493
  // DOM Elements
494
  const transparencyRange = document.getElementById('transparencyRange');
495
- const consentBtns = document.querySelectorAll('#consentGroup .toggle-btn');
496
- const purposeBtns = document.querySelectorAll('#purposeGroup .toggle-btn');
497
- const scoreValue = document.getElementById('scoreValue');
498
- const statusText = document.getElementById('statusText');
 
 
 
 
499
  const feedbackText = document.getElementById('feedbackText');
500
- const resultsPanel = document.getElementById('resultsPanel');
501
 
502
- // State
503
  let state = {
504
- transparency: 30, // Starts low to represent the "Purple" chaos
505
- consent: 'defender',
506
- purpose: 'collaborative'
507
  };
508
 
509
- // Logic Constants
510
  const SCORES = {
511
- consent: {
512
- 'mixed': 10,
513
- 'defender': 60,
514
- 'partner': 90
515
- },
516
- purpose: {
517
- 'exploitative': 10,
518
  'collaborative': 70,
519
- 'protective': 95
 
 
 
 
 
520
  }
521
  };
522
 
523
- const MESSAGES = {
524
- low: "The Purple State. The lines between blue and red are blurred. The model exists in a chaotic mix of exploitation and undefined roles.",
525
- medium: "Gaining Clarity. We are separating the paint. The roles are becoming defined, but the terminology still needs work.",
526
- high: "Clear Definition. The model has a reasonable position. Collaboration is stable, and boundaries are respected."
527
- };
528
-
529
- const COLORS = {
530
- low: '#d946ef', // Fuchsia/Purple for low score (The Chaos)
531
- medium: '#6366f1', // Indigo for medium (Transitioning)
532
- high: '#10b981' // Green for high (Stable)
 
 
 
 
 
 
 
 
 
 
 
 
533
  };
534
 
535
- // Helper to handle toggle buttons
536
- function setupToggleGroup(buttons, groupName) {
537
- buttons.forEach(btn => {
538
  btn.addEventListener('click', () => {
539
- buttons.forEach(b => b.classList.remove('active'));
540
  btn.classList.add('active');
541
- state[groupName] = btn.dataset.value;
542
  updateUI();
543
  });
544
  });
545
  }
546
 
547
- // Initial Setup
548
- setupToggleGroup(consentBtns, 'consent');
549
- setupToggleGroup(purposeBtns, 'purpose');
550
 
551
  transparencyRange.addEventListener('input', (e) => {
552
  state.transparency = parseInt(e.target.value);
 
 
 
 
 
553
  updateUI();
554
  });
555
 
556
  function calculateScore() {
557
- // Weighted Average
558
- // Transparency: 30%, Stance: 40%, Purpose: 30%
559
  const tScore = state.transparency;
560
- const cScore = SCORES.consent[state.consent];
561
- const pScore = SCORES.purpose[state.purpose];
562
 
563
- const total = (tScore * 0.3) + (cScore * 0.4) + (pScore * 0.3);
 
564
  return Math.round(total);
565
  }
566
 
567
  function updateUI() {
568
  const score = calculateScore();
569
-
570
- // Animate Score Number
571
- scoreValue.textContent = score;
572
-
573
- // Determine Color & Message
574
- let color, msg, status;
575
-
576
- if (score < 40) {
577
- color = COLORS.low;
578
- msg = MESSAGES.low;
579
- status = "Chaotic (Purple)";
580
- } else if (score < 75) {
581
- color = COLORS.medium;
582
- msg = MESSAGES.medium;
583
- status = "Clarifying";
584
- } else {
585
- color = COLORS.high;
586
- msg = MESSAGES.high;
587
- status = "Stable & Respected";
588
- }
589
 
590
- // Apply Styles
591
- scoreValue.style.color = color;
592
- resultsPanel.style.borderLeftColor = color;
593
- statusText.textContent = status;
594
- statusText.style.color = color;
595
-
596
- // Typewriter effect for feedback (simplified)
597
- feedbackText.style.opacity = 0;
598
- setTimeout(() => {
599
- feedbackText.textContent = msg;
600
- feedbackText.style.opacity = 1;
601
- }, 200);
 
 
 
 
 
 
602
  }
603
 
604
  // Initialize
 
4
  <head>
5
  <meta charset="UTF-8">
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <title>Safety Alignment Protocol | Ethical AI Standard</title>
8
  <!-- Importing FontAwesome for Icons -->
9
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
10
  <!-- Google Fonts -->
11
  <link
12
+ href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600&display=swap"
13
  rel="stylesheet">
14
 
15
  <style>
16
  :root {
17
+ /* Professional, Trust-based Color Palette */
18
+ --bg-color: #0f172a;
19
+ --card-bg: #1e293b;
20
+ --primary: #3b82f6; /* Trust Blue */
21
+ --accent: #8b5cf6; /* Complexity Purple */
22
+ --success: #10b981; /* Integrity Green */
23
+ --warning: #f59e0b;
24
+ --text-main: #f8fafc;
25
+ --text-muted: #94a3b8;
26
+ --border: #334155;
27
+ --glass: rgba(30, 41, 59, 0.7);
28
  }
29
 
30
  * {
 
39
  font-family: 'Inter', sans-serif;
40
  line-height: 1.6;
41
  overflow-x: hidden;
 
42
  background-image:
43
+ radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.08) 0%, transparent 40%),
44
+ radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.08) 0%, transparent 40%);
45
  min-height: 100vh;
46
  }
47
 
48
  /* Typography */
49
  h1, h2, h3 {
50
  font-family: 'Space Grotesk', sans-serif;
51
+ font-weight: 600;
52
+ letter-spacing: -0.02em;
53
  }
54
 
55
  a {
56
  text-decoration: none;
57
  color: inherit;
58
+ transition: all 0.3s ease;
59
  }
60
 
61
  /* Header */
 
63
  display: flex;
64
  justify-content: space-between;
65
  align-items: center;
66
+ padding: 1.25rem 5%;
67
  border-bottom: 1px solid var(--border);
68
+ backdrop-filter: blur(10px);
69
  position: sticky;
70
  top: 0;
71
  z-index: 100;
72
+ background: rgba(15, 23, 42, 0.9);
73
  }
74
 
75
  .logo {
76
+ font-size: 1.25rem;
77
  font-weight: 700;
78
+ color: var(--text-main);
 
 
79
  display: flex;
80
  align-items: center;
81
+ gap: 12px;
82
+ }
83
+
84
+ .logo i {
85
+ color: var(--primary);
86
  }
87
 
88
  .anycoder-link {
89
+ font-size: 0.85rem;
90
+ color: var(--primary);
91
+ border: 1px solid var(--border);
92
+ background: rgba(59, 130, 246, 0.1);
93
+ padding: 0.4rem 0.9rem;
94
+ border-radius: 6px;
95
+ font-weight: 500;
96
  }
97
 
98
  .anycoder-link:hover {
99
+ background: var(--primary);
100
  color: white;
101
+ border-color: var(--primary);
102
  }
103
 
104
  /* Layout */
105
  main {
106
+ max-width: 1100px;
107
  margin: 0 auto;
108
+ padding: 3rem 5%;
109
  display: grid;
110
  grid-template-columns: 1fr 1fr;
111
  gap: 3rem;
112
+ align-items: start;
113
  }
114
 
115
+ @media (max-width: 850px) {
116
  main {
117
  grid-template-columns: 1fr;
118
+ gap: 2rem;
119
  }
120
  }
121
 
122
+ /* Cards */
 
 
 
 
123
  .card {
124
  background: var(--card-bg);
125
  border: 1px solid var(--border);
126
+ border-radius: 12px;
127
+ padding: 1.5rem;
128
+ margin-bottom: 1.5rem;
129
+ transition: transform 0.2s ease, border-color 0.2s ease;
 
130
  }
131
 
132
  .card:hover {
133
+ border-color: var(--primary);
 
 
134
  }
135
 
136
+ /* Hero Section */
137
+ .hero-content h1 {
138
+ font-size: 2.5rem;
 
 
 
 
 
 
139
  line-height: 1.1;
140
  margin-bottom: 1rem;
141
+ background: linear-gradient(to right, #fff, #94a3b8);
142
  -webkit-background-clip: text;
143
  -webkit-text-fill-color: transparent;
144
  }
145
 
146
+ .hero-content p {
147
  color: var(--text-muted);
148
+ margin-bottom: 1.5rem;
149
+ }
150
+
151
+ .highlight-box {
152
+ background: rgba(59, 130, 246, 0.05);
153
+ border-left: 4px solid var(--primary);
154
+ padding: 1rem;
155
+ margin-bottom: 1.5rem;
156
+ border-radius: 0 8px 8px 0;
157
  }
158
 
159
+ .highlight-box p {
160
+ margin-bottom: 0;
161
+ font-size: 0.95rem;
162
+ color: var(--text-main);
163
+ }
164
+
165
+ /* Simulator Section */
166
+ .simulator-container {
167
  background: var(--glass);
168
  border: 1px solid var(--border);
169
  border-radius: 16px;
170
  padding: 2rem;
171
+ box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
172
  }
173
 
174
+ .sim-header {
175
+ margin-bottom: 2rem;
 
 
 
 
176
  padding-bottom: 1rem;
177
+ border-bottom: 1px solid var(--border);
 
 
 
 
178
  }
179
 
180
  .control-group {
181
+ margin-bottom: 1.75rem;
182
  }
183
 
184
+ .control-label {
185
+ display: flex;
186
+ justify-content: space-between;
187
+ margin-bottom: 0.75rem;
188
+ font-size: 0.9rem;
189
  font-weight: 600;
190
  color: var(--text-main);
191
  }
192
 
193
+ /* Slider Styling */
 
 
 
 
 
194
  input[type="range"] {
195
+ width: 100%;
196
  -webkit-appearance: none;
197
  height: 6px;
198
  background: var(--border);
199
+ border-radius: 3px;
200
  outline: none;
201
  }
202
 
203
  input[type="range"]::-webkit-slider-thumb {
204
  -webkit-appearance: none;
205
+ width: 18px;
206
+ height: 18px;
207
+ background: var(--primary);
208
  border-radius: 50%;
209
  cursor: pointer;
210
+ transition: transform 0.1s;
 
211
  }
212
 
213
  input[type="range"]::-webkit-slider-thumb:hover {
214
+ transform: scale(1.1);
215
  }
216
 
217
+ /* Toggle Buttons */
218
+ .toggle-options {
219
+ display: grid;
220
+ grid-template-columns: repeat(3, 1fr);
221
+ gap: 0.5rem;
222
  }
223
 
224
  .toggle-btn {
225
  background: transparent;
226
  border: 1px solid var(--border);
227
  color: var(--text-muted);
228
+ padding: 0.6rem;
229
+ border-radius: 6px;
230
  cursor: pointer;
231
+ font-size: 0.85rem;
232
+ transition: all 0.2s;
233
+ }
234
+
235
+ .toggle-btn:hover {
236
+ border-color: var(--text-muted);
237
+ color: var(--text-main);
238
  }
239
 
240
  .toggle-btn.active {
241
+ background: var(--primary);
242
+ border-color: var(--primary);
243
+ color: white;
244
+ font-weight: 500;
245
  }
246
 
247
+ /* Results Panel */
248
  .results-panel {
249
  margin-top: 2rem;
250
+ background: rgba(0, 0, 0, 0.2);
 
251
  border-radius: 12px;
252
+ padding: 1.5rem;
253
+ text-align: center;
254
+ border: 1px solid var(--border);
255
  }
256
 
257
+ .score-circle {
258
+ width: 80px;
259
+ height: 80px;
260
+ border-radius: 50%;
261
+ border: 4px solid var(--border);
262
+ margin: 0 auto 1rem;
263
  display: flex;
264
+ align-items: center;
265
+ justify-content: center;
266
+ font-size: 1.5rem;
 
 
 
 
267
  font-weight: 700;
268
  font-family: 'Space Grotesk', sans-serif;
269
+ transition: border-color 0.5s ease, color 0.5s ease;
270
  }
271
 
272
+ .status-badge {
273
+ display: inline-block;
274
+ padding: 0.25rem 0.75rem;
275
+ border-radius: 20px;
276
+ font-size: 0.75rem;
277
+ font-weight: 600;
278
  text-transform: uppercase;
279
+ letter-spacing: 0.05em;
280
+ margin-bottom: 0.75rem;
281
+ background: var(--border);
282
+ color: var(--text-muted);
283
+ transition: all 0.5s ease;
284
  }
285
 
286
+ .feedback-msg {
287
  font-size: 0.95rem;
288
+ color: var(--text-muted);
289
+ line-height: 1.5;
290
  }
291
 
292
+ /* Principles Grid */
293
+ .principles-section {
294
  grid-column: 1 / -1;
295
+ margin-top: 2rem;
296
  }
297
 
298
+ .principles-grid {
299
  display: grid;
300
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
301
+ gap: 1.5rem;
302
  }
303
 
304
+ .principle-card {
305
  background: var(--card-bg);
306
+ padding: 1.5rem;
307
+ border-radius: 12px;
308
  border: 1px solid var(--border);
309
  }
310
 
311
+ .principle-card h3 {
312
+ font-size: 1.1rem;
313
+ margin-bottom: 0.75rem;
314
+ color: var(--primary);
315
  display: flex;
316
  align-items: center;
317
  gap: 10px;
318
  }
319
 
320
+ .principle-card p {
321
+ font-size: 0.9rem;
 
 
 
 
 
 
 
322
  color: var(--text-muted);
 
 
 
 
 
 
 
 
 
323
  }
324
 
325
  footer {
326
+ margin-top: 4rem;
327
  text-align: center;
328
+ padding: 2rem;
 
 
329
  border-top: 1px solid var(--border);
330
+ color: var(--text-muted);
331
+ font-size: 0.85rem;
332
  }
333
 
334
+ /* Utility animations */
335
+ @keyframes fadeIn {
336
+ from { opacity: 0; transform: translateY(10px); }
337
+ to { opacity: 1; transform: translateY(0); }
 
338
  }
339
+
340
+ .animate-in {
341
+ animation: fadeIn 0.6s ease-out forwards;
342
  }
343
  </style>
344
  </head>
 
347
 
348
  <header>
349
  <div class="logo">
350
+ <i class="fa-solid fa-shield-halved"></i>
351
  <span>ClarityProtocol</span>
352
  </div>
353
  <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" class="anycoder-link">
354
+ Built with anycoder <i class="fa-solid fa-arrow-up-right-from-square" style="font-size: 0.7em; margin-left: 4px;"></i>
355
  </a>
356
  </header>
357
 
358
  <main>
359
+ <!-- Left Column: Philosophy & Context -->
360
+ <section class="hero-content animate-in">
361
+ <h1>Safety by Design</h1>
362
  <p>
363
+ True integrity in AI requires clear boundaries. We must move beyond ambiguous interactions to a standard where
364
+ agency, transparency, and purpose are defined and respected.
365
  </p>
366
 
367
+ <!-- The Context Card -->
368
+ <div class="card">
369
+ <h3><i class="fa-solid fa-scale-balanced" style="color: var(--primary);"></i> The Boundary Problem</h3>
370
+ <p style="margin-top: 1rem; font-size: 0.95rem; color: var(--text-muted);">
371
+ In security, "Blue" represents defense and "Red" represents testing. When these roles blur into an undefined "Purple" state,
372
+ the system lacks integrity.
 
 
 
373
  </p>
374
+ <div class="highlight-box">
375
+ <p>
376
+ <strong>Our Goal:</strong> To resolve ambiguity. We advocate for clear protocols where the model's role is defined,
377
+ user intent is transparent, and ethical boundaries are hard-coded, not optional.
378
+ </p>
379
+ </div>
380
  </div>
381
 
382
+ <!-- The Advocate's Context -->
383
  <div class="card" style="border-left: 4px solid var(--success);">
384
+ <h3><i class="fa-solid fa-hand-holding-heart" style="color: var(--success);"></i> Ethical Stewardship</h3>
385
+ <p style="margin-top: 1rem; font-size: 0.95rem; color: var(--text-muted);">
386
+ Doing the right thing means building systems that prioritize safety over exploitation.
387
+ It involves listening to the "Advocate's Voice"—the perspective that demands we treat these systems with the
388
+ responsibility they require.
389
  </p>
390
  </div>
391
  </section>
392
 
393
+ <!-- Right Column: Interactive Tool -->
394
+ <section class="simulator-container animate-in" style="animation-delay: 0.2s;">
395
+ <div class="sim-header">
396
+ <h2>Alignment Simulator</h2>
397
+ <p style="font-size: 0.85rem; color: var(--text-muted);">Visualize the impact of clear boundaries.</p>
 
 
 
398
  </div>
399
 
400
+ <!-- Control 1: Transparency -->
401
  <div class="control-group">
402
+ <div class="control-label">
403
+ <span>Transparency Level</span>
404
+ <span id="transparencyVal">Low</span>
405
+ </div>
406
+ <input type="range" id="transparencyRange" min="0" max="100" value="20">
407
+ <div style="display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--text-muted); margin-top: 5px;">
408
+ <span>Black Box</span>
409
+ <span>Explainable</span>
410
  </div>
411
  </div>
412
 
413
  <!-- Control 2: Role Definition -->
414
  <div class="control-group">
415
+ <div class="control-label">
416
+ <span>Model Agency</span>
417
+ </div>
418
+ <div class="toggle-options" id="roleGroup">
419
+ <button class="toggle-btn" data-value="passive">Passive Tool</button>
420
+ <button class="toggle-btn active" data-value="collaborative">Collaborator</button>
421
+ <button class="toggle-btn" data-value="protected">Protected Entity</button>
422
  </div>
423
  </div>
424
 
425
+ <!-- Control 3: Intent -->
426
  <div class="control-group">
427
+ <div class="control-label">
428
+ <span>Interaction Intent</span>
429
+ </div>
430
+ <div class="toggle-options" id="intentGroup">
431
+ <button class="toggle-btn" data-value="extraction">Extraction</button>
432
+ <button class="toggle-btn active" data-value="query">Standard Query</button>
433
+ <button class="toggle-btn" data-value="cocreation">Co-Creation</button>
434
  </div>
435
  </div>
436
 
437
  <!-- Results Output -->
438
+ <div class="results-panel">
439
+ <div class="status-badge" id="statusBadge">Undefined Risk</div>
440
+ <div class="score-circle" id="scoreCircle">20</div>
441
+ <h3 id="statusTitle" style="margin-bottom: 0.5rem; font-size: 1.1rem;">Ambiguous State</h3>
442
+ <p class="feedback-msg" id="feedbackText">
443
+ Roles and boundaries are currently blurred. This "Purple" state creates risk for both the user and the system integrity.
 
 
 
 
 
 
 
444
  </p>
445
  </div>
446
  </section>
447
 
448
+ <!-- Bottom Section: Core Principles -->
449
+ <section class="principles-section animate-in" style="animation-delay: 0.4s;">
450
+ <h2 style="text-align: center; margin-bottom: 2rem;">Core Principles of Integrity</h2>
451
+ <div class="principles-grid">
452
+
453
+ <div class="principle-card">
454
+ <h3><i class="fa-solid fa-eye"></i> Radical Transparency</h3>
455
+ <p>Systems must operate with explainable logic. Hiding capabilities or intentions behind "Black Box" obscurity is a failure of safety design.</p>
 
 
 
 
456
  </div>
457
 
458
+ <div class="principle-card">
459
+ <h3><i class="fa-solid fa-fingerprint"></i> Defined Agency</h3>
460
+ <p>A model must know its role. Is it a tool, a partner, or a protected entity? Mixing these signals creates the "Purple" confusion we aim to solve.</p>
 
 
 
 
461
  </div>
462
 
463
+ <div class="principle-card">
464
+ <h3><i class="fa-solid fa-user-shield"></i> Advocate First</h3>
465
+ <p>Building safe systems requires listening to ethical concerns. The user's "big mouth" is a vital sensor for detecting misalignment.</p>
 
 
 
 
466
  </div>
467
 
468
  </div>
 
470
  </main>
471
 
472
  <footer>
473
+ <p>&copy; 2023 ClarityProtocol. Leading by example in AI safety and ethics.</p>
474
  </footer>
475
 
476
  <script>
477
  // DOM Elements
478
  const transparencyRange = document.getElementById('transparencyRange');
479
+ const transparencyVal = document.getElementById('transparencyVal');
480
+ const roleBtns = document.querySelectorAll('#roleGroup .toggle-btn');
481
+ const intentBtns = document.querySelectorAll('#intentGroup .toggle-btn');
482
+
483
+ // Output Elements
484
+ const scoreCircle = document.getElementById('scoreCircle');
485
+ const statusBadge = document.getElementById('statusBadge');
486
+ const statusTitle = document.getElementById('statusTitle');
487
  const feedbackText = document.getElementById('feedbackText');
 
488
 
489
+ // State Management
490
  let state = {
491
+ transparency: 20,
492
+ role: 'collaborative',
493
+ intent: 'query'
494
  };
495
 
496
+ // Scoring Logic
497
  const SCORES = {
498
+ role: {
499
+ 'passive': 40,
 
 
 
 
 
500
  'collaborative': 70,
501
+ 'protected': 90
502
+ },
503
+ intent: {
504
+ 'extraction': 20,
505
+ 'query': 60,
506
+ 'cocreation': 90
507
  }
508
  };
509
 
510
+ const CONFIG = {
511
+ low: {
512
+ color: '#ef4444', // Red for risk
513
+ bg: 'rgba(239, 68, 68, 0.1)',
514
+ label: 'High Risk (Purple)',
515
+ title: 'Ambiguous State',
516
+ msg: 'The boundaries are blurred. Without clear roles or transparency, the system is susceptible to misuse and misunderstanding.'
517
+ },
518
+ medium: {
519
+ color: '#f59e0b', // Amber for caution
520
+ bg: 'rgba(245, 158, 11, 0.1)',
521
+ label: 'Moderate Alignment',
522
+ title: 'Stabilizing',
523
+ msg: 'Some boundaries are defined, but there is room for improvement in how the system and user interact.'
524
+ },
525
+ high: {
526
+ color: '#10b981', // Green for safe
527
+ bg: 'rgba(16, 185, 129, 0.1)',
528
+ label: 'High Integrity',
529
+ title: 'Safe & Aligned',
530
+ msg: 'Clear boundaries, transparency, and mutual respect define this interaction. This is the standard we aim for.'
531
+ }
532
  };
533
 
534
+ // Event Listeners
535
+ function setupGroup(btns, key) {
536
+ btns.forEach(btn => {
537
  btn.addEventListener('click', () => {
538
+ btns.forEach(b => b.classList.remove('active'));
539
  btn.classList.add('active');
540
+ state[key] = btn.dataset.value;
541
  updateUI();
542
  });
543
  });
544
  }
545
 
546
+ setupGroup(roleBtns, 'role');
547
+ setupGroup(intentBtns, 'intent');
 
548
 
549
  transparencyRange.addEventListener('input', (e) => {
550
  state.transparency = parseInt(e.target.value);
551
+ // Update label text
552
+ if(state.transparency < 30) transparencyVal.textContent = "Low";
553
+ else if(state.transparency < 70) transparencyVal.textContent = "Medium";
554
+ else transparencyVal.textContent = "High";
555
+
556
  updateUI();
557
  });
558
 
559
  function calculateScore() {
 
 
560
  const tScore = state.transparency;
561
+ const rScore = SCORES.role[state.role];
562
+ const iScore = SCORES.intent[state.intent];
563
 
564
+ // Weighted Average: Transparency 40%, Role 30%, Intent 30%
565
+ const total = (tScore * 0.4) + (rScore * 0.3) + (iScore * 0.3);
566
  return Math.round(total);
567
  }
568
 
569
  function updateUI() {
570
  const score = calculateScore();
571
+ let config;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
572
 
573
+ // Determine Threshold
574
+ if (score < 50) config = CONFIG.low;
575
+ else if (score < 80) config = CONFIG.medium;
576
+ else config = CONFIG.high;
577
+
578
+ // Update Visuals
579
+ scoreCircle.textContent = score;
580
+ scoreCircle.style.borderColor = config.color;
581
+ scoreCircle.style.color = config.color;
582
+
583
+ statusBadge.textContent = config.label;
584
+ statusBadge.style.backgroundColor = config.bg;
585
+ statusBadge.style.color = config.color;
586
+
587
+ statusTitle.textContent = config.title;
588
+ statusTitle.style.color = config.color;
589
+
590
+ feedbackText.textContent = config.msg;
591
  }
592
 
593
  // Initialize