File size: 11,468 Bytes
a86ca18
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bc52030
a86ca18
 
 
 
 
 
 
 
 
1252ede
bc52030
1252ede
 
a86ca18
 
 
 
 
 
 
bc52030
 
 
 
 
 
 
 
 
 
 
926e541
bc52030
 
 
 
 
ccc87e8
bc52030
 
 
 
 
 
 
a86ca18
 
 
 
 
 
 
 
 
bc52030
a86ca18
 
 
 
 
 
 
bc52030
a86ca18
 
bc52030
a86ca18
 
 
bc52030
 
1252ede
bc52030
1252ede
a86ca18
 
 
 
 
 
 
 
bc52030
a86ca18
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6b8b1ef
 
 
 
a86ca18
 
 
 
 
 
 
 
 
 
 
4796f62
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1da7c70
4796f62
6b8b1ef
4796f62
 
 
 
1da7c70
 
4796f62
 
 
 
 
 
 
 
 
 
 
 
 
 
5f43090
 
1da7c70
 
 
 
2cb0f7e
 
 
 
 
 
 
5f43090
 
 
fff70fc
 
 
 
 
 
 
 
 
 
 
 
d7a40ef
926e541
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d7a40ef
 
 
 
 
 
 
 
 
 
 
 
 
 
 
926e541
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
/* style.css */
/* Define colors */
:root {
    --distill-gray: rgb(107, 114, 128);
    --distill-gray-light: rgb(185, 185, 185);
    --distill-gray-lighter: rgb(228, 228, 228);
    --distill-gray-lightest: rgb(245, 245, 245);
    --distill-blue: #007BFF;
}

/* Container for the controls */
[id^="plot-"] {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px; /* Adjust the gap between controls as needed */
}
[id^="plot-"] figure {
    margin-bottom: 0px;
    margin-top: 0px;
    padding: 0px;
}
.plotly_caption {
    font-style: italic;
    margin-top: 10px;
}

.plotly_controls {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    gap: 30px;
}


.plotly_input_container {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 10px;
}

/* Style for the select dropdown */
.plotly_input_container > select {
    padding: 2px 4px;
    /* border: 1px solid #ccc; */
    line-height: 1.5em;
    text-align: center;
    border-radius: 4px;
    font-size: 12px;
    background-color: var(--distill-gray-lightest);
    outline: none;
}

/* Style for the range input */

.plotly_slider {
    display: flex;
    align-items: center;
    gap: 10px;
}

.plotly_slider > input[type="range"] {
    -webkit-appearance: none;
    height: 2px;
    background: var(--distill-gray-light);
    border-radius: 5px;
    outline: none;
}

.plotly_slider > span {
    font-size: 14px;
    line-height: 1.6em;
    min-width: 16px;
}

.plotly_slider > input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--distill-blue);
    cursor: pointer;
}

.plotly_slider > input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--distill-blue);
    cursor: pointer;
}

/* Style for the labels */
.plotly_input_container > label {
    font-size: 14px;
    font-weight: bold;
}

.main-plot-container {
    margin-top: 21px;
    margin-bottom: 35px;
}

.main-plot-container > figure {
    display: block !important;
    /* Let this be handled by graph-container */
    margin-bottom: 0px;
    margin-top: 0px;
}
.main-plot-container > div {
    display: none !important;
}


@media (min-width: 768px) {
    .main-plot-container > figure {
        display: none !important;
    }
    .main-plot-container > div {
        display: flex !important;
    }
}

d-byline .byline {
  grid-template-columns: 1fr;
  grid-column: text;
  font-size: 0.9rem;
  line-height: 1.8em;
}

@media (min-width: 768px) {
  d-byline .byline {
    grid-template-columns: 5fr 1fr 1fr;
  }
}

#title-plot {
    margin-top: 0px;
    margin-bottom: 0px;
}

d-contents > nav a.active {
    text-decoration: underline;
}

@media (max-width: 1199px) {
    d-contents {
        display: none;
        background: white;
        justify-self: start;
        align-self: start;
        padding-bottom: 0.5em;
        margin-bottom: 1em;
        padding-left: 0.25em;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        border-bottom-width: 1px;
        border-bottom-style: solid;
        border-bottom-color: rgba(0, 0, 0, 0.1);
        overflow-y: scroll;
        height: calc(100vh - 40px);
        scrollbar-width: none;
        z-index: -100;
    }
}

d-contents a:hover {
    border-bottom: none;
}

toc-title {
    font-weight: bold;
    font-size: 1.2em;
    color: #333;
}

toggle-icon {
    transition: transform 0.3s;
}

toggle-icon.collapsed {
    transform: rotate(90deg);
}

.toc-content {
    margin-top: 15px;
    overflow: hidden;
    /* max-height: 1000px; */
    transition: max-height 0.3s ease-out;
}

.toc-content.collapsed {
    max-height: 0;
    margin-top: 0;
}

@media (min-width: 1200px) {
    d-article {
        /* Ensure d-article does not prevent sticky positioning */
        overflow: visible;
    }

    d-contents {
        align-self: start;
        background: white;
        grid-column-start: 1 !important;
        grid-column-end: 4 !important;
        grid-row: auto / span 6;
        justify-self: end;
        margin-top: 0em;
        padding-right: 3em;
        padding-left: 2em;
        /* border-right: 1px solid rgba(0, 0, 0, 0.1);
        border-right-width: 1px;
        border-right-style: solid;
        border-right-color: rgba(0, 0, 0, 0.1); */
        position: -webkit-sticky; /* For Safari */
        position: sticky;
        top: 10px; /* Adjust this value if needed */
        overflow-y: auto;
        height: calc(100vh - 40px);
        scrollbar-width: none;
        transition: max-height 0.3s ease-out;
        z-index: -100;
    }
}

d-contents nav h3 {
    margin-top: 0;
    margin-bottom: 1em;
}

d-contents nav div div {
    color: rgba(0, 0, 0, 0.8);
    font-weight: bold;
}

d-contents nav a {
    color: rgba(0, 0, 0, 0.8);
    border-bottom: none;
    text-decoration: none;
}

d-contents li {
    list-style-type: none;
}

d-contents ul, d-article d-contents ul {
    padding-left: 1em;
}

d-contents nav ul li {
    margin-bottom: .25em;
}

d-contents nav a:hover {
    text-decoration: underline solid rgba(0, 0, 0, 0.6);
}

d-contents nav ul {
    margin-top: 0;
    margin-bottom: 6px;
}


d-contents nav > div {
    display: block;
    outline: none;
    margin-bottom: 0.5em;
}

d-contents nav > div > a {
    font-size: 13px;
    font-weight: 600;
}

d-article aside {
    margin-bottom: 1em;
}

d-article img {
    max-width: 100%;
}

@media (min-width: 768px) {
    d-article aside {
        margin-bottom: 0;
    }
}

d-contents nav > div > a:hover,
d-contents nav > ul > li > a:hover {
    text-decoration: none;
}

.note-box {
    background-color: #f6f8fa;
    border-left: 4px solid #444444;
    padding: 1rem;
    margin: 1rem 0;  /* Keep this modest margin */
    border-radius: 6px;
    /* Add this to ensure the box only takes up needed space */
    display: inline-block;
    width: 100%;
}

.note-box-title {
    margin: 0;
    color: #444444;
    font-weight: 600;
    font-size: 1em;
}

.note-box-content {
    margin-top: 0.5rem;
    margin-bottom: 0;  /* Ensure no bottom margin */
    color: #24292f;
    font-size: 0.9em;
    line-height: 1.5em;
}

/* For dark mode support */
@media (prefers-color-scheme: dark) {
    .note-box {
        background-color: #1c1c1c;
        border-left-color: #888888;
    }
    .note-box-title {
        color: #888888;
    }
    .note-box-content {
        color: #d4d4d4;
    }
}

d-article {
    font-size: 1.0em;
}

.figure-legend {
    font-size: 0.9em;
    font-style: italic;
    color: var(--distill-gray);
    line-height: 1.5em;
}

d-code {
    font-size: 12px;
}

.large-image-background {
        width: 100vw;
        padding-top: 10px;
        padding-bottom: 10px;
        margin-left: calc(-50vw + 50%);
        margin-right: calc(-50vw + 50%);
        background: white;
        height: fit-content; /* This will make it match the image height */
        display: flex;
        justify-content: center; /* This will center your image */
}

.large-image-background-transparent {
    /* width: 100vw; */
    padding-top: 10px;
    padding-bottom: 10px;
    /* margin-left: calc(-50vw + 50%); */
    margin-left:-100px;
    margin-right: -100px;
    /* margin-right: calc(-50vw + 50%); */
    /* background: white; */
    height: fit-content; /* This will make it match the image height */
    display: flex;
    justify-content: center; /* This will center your image */
}

.boxed-image {
    padding: 0.5rem;
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

d-article li {
    margin-bottom: 0.0em;
}

d-article ul ul {
    margin-bottom: 0.0em;
}

d-article ol ol {
    margin-bottom: 0.0em;
}

d-article hr {
    grid-column: text;
}

/* Memory visualization */
#graph-all {
    min-width: 500px;
    margin-right: 10px;
    margin-bottom: 2rem;
    padding: 0.5rem;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}


/* Main container styles */
#controls {
    max-width: 1200px;
    /* margin: 2rem auto; */
    margin-bottom: 2rem;
    margin-left: 10px;
    padding: 0.6rem;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Grid layout */
#controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* gap: 2rem; */
}

/* Cell styles */
.cell {
    margin-bottom: 0.2rem;
}

/* Label styles */
label {
    display: block;
    /* margin-bottom: 0.5rem; */
    font-size: 0.8rem;
    font-weight: 500;
    color: #374151;
}

/* Input container for range + number combination */
.input-container {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Range input styling */
input[type="range"] {
    flex: 1;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    appearance: none;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    background: #3b82f6;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.15s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: #2563eb;
}

/* Number input styling */
input[type="number"] {
    width: 80px;
    padding: 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #374151;
}

/* Select styling */
select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: white;
    font-size: 0.9rem;
    color: #374151;
    cursor: pointer;
}

/* Checkbox styling */
input[type="checkbox"] {
    width: 1.2rem;
    height: 1.2rem;
    margin-right: 0.5rem;
    border: 2px solid #e5e7eb;
    border-radius: 4px;
    cursor: pointer;
}

/* Column specific styles */
.column-1 {
    padding-right: 0.5rem;
}

.column-2 {
    padding-left: 0.5rem;
}

/* Checkbox container */
.checkbox-container {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

/* Memory visualization styles */
.memory-block {
    background: #fff;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.memory-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.memory-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: #3b82f6;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #controls {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .column-1, .column-2 {
        padding: 0;
    }
}

/* Hover states and transitions */
input:hover, select:hover {
    border-color: #3b82f6;
}

input:focus, select:focus {
    border-color: #2563eb;
    outline: none;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

/* Add smooth transitions */
input, select, button {
    transition: all 0.15s ease;
}

/* Preset dropdown special styling */
select[name="presets"] {
    background-color: #f3f4f6;
    font-weight: 500;
}

/* Memory graph enhancements */
.activation-memory {
    background: #dbeafe;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.gradient-memory {
    background: #ede9fe;
    padding: 1rem;
    border-radius: 8px;
}