-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
1432 lines (1336 loc) · 83.3 KB
/
Copy pathindex.html
File metadata and controls
1432 lines (1336 loc) · 83.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
<title>Art of Seeing</title>
<meta name="description" content="A small reference library for the natural-vision tradition." />
<link rel="manifest" href="manifest.webmanifest" />
<meta name="theme-color" content="#F6F2EA" />
<link rel="icon" type="image/png" sizes="32x32" href="icons/favicon-32.png" />
<link rel="apple-touch-icon" href="icons/apple-touch-icon.png" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="default" />
<meta name="apple-mobile-web-app-title" content="Seeing" />
<meta name="mobile-web-app-capable" content="yes" />
<meta name="format-detection" content="telephone=no" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;1,6..72,400;1,6..72,500&display=swap" rel="stylesheet" />
<style>
:root {
--paper: oklch(0.965 0.008 75);
--paper-dim: oklch(0.945 0.012 75);
--paper-deep: oklch(0.205 0.018 55);
--ink: oklch(0.235 0.015 60);
--ink-2: oklch(0.45 0.012 65);
--ink-3: oklch(0.65 0.010 70);
--rule: oklch(0.86 0.012 75);
--rule-soft: oklch(0.91 0.010 75);
--rule-dim: oklch(0.36 0.014 60);
--accent: #9C5F3E;
--accent-soft: oklch(0.93 0.025 50);
--dim: oklch(0.78 0.012 70);
--muted: oklch(0.62 0.012 65);
--bright: oklch(0.94 0.012 70);
--serif: "Newsreader", "Iowan Old Style", "Charter", Georgia, serif;
--sans: ui-sans-serif, -apple-system, system-ui, "Helvetica Neue", sans-serif;
--mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
--max-w: 560px;
}
*, *::before, *::after { box-sizing: border-box; }
html, body {
margin: 0; padding: 0;
background: var(--paper);
color: var(--ink);
font-family: var(--serif);
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-rendering: optimizeLegibility;
overscroll-behavior-y: none;
}
body {
min-height: 100vh;
min-height: 100svh;
}
::selection { background: var(--accent-soft); color: var(--ink); }
::-webkit-scrollbar { width: 0; background: transparent; }
button, input, textarea {
font: inherit; color: inherit;
background: transparent; border: none; padding: 0;
-webkit-tap-highlight-color: transparent;
}
button { cursor: pointer; }
a { color: inherit; }
@keyframes aos-fade {
from { opacity: 0; transform: translateY(2px); }
to { opacity: 1; transform: translateY(0); }
}
@keyframes aos-rise {
from { opacity: 0; transform: translateY(6px); }
to { opacity: 1; transform: translateY(0); }
}
/* ── layout ─────────────────────────────────────── */
#root { display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; }
.page { animation: aos-fade 320ms ease both; }
.col {
width: 100%; max-width: var(--max-w);
margin: 0 auto;
padding: 0 28px;
}
.pad-top { padding-top: 56px; }
.pad-bottom { padding-bottom: 60px; }
/* ── primitives ─────────────────────────────────── */
.eyebrow {
font-family: var(--sans);
font-size: 10.5px; font-weight: 500;
letter-spacing: 0.14em; text-transform: uppercase;
color: var(--ink-3);
}
.rule { height: 0.5px; background: var(--rule); margin: 20px 0; }
.rule-soft { background: var(--rule-soft); }
.back-row {
padding: calc(56px + env(safe-area-inset-top)) 0 18px;
display: flex; align-items: center; justify-content: space-between;
}
.back-row .back {
display: flex; align-items: center; gap: 8px;
font-family: var(--sans); font-size: 13px;
color: var(--ink-2); letter-spacing: 0.04em;
}
.back-row .back svg path { stroke: var(--ink-2); }
.title-xl {
font-family: var(--serif);
font-size: 38px; font-weight: 400;
letter-spacing: -0.015em; line-height: 1.05;
color: var(--ink);
}
.title-lg {
font-size: 36px; font-weight: 400;
letter-spacing: -0.018em; line-height: 1.06;
}
.lede {
font-family: var(--serif); font-style: italic;
color: var(--ink-2); line-height: 1.5;
}
.lede-15 { font-size: 15px; margin-top: 6px; }
.lede-16 { font-size: 16px; margin-top: 10px; }
.lede-19 { font-size: 19px; line-height: 1.4; }
.type-lineage { display: flex; flex-wrap: wrap; gap: 0 14px; align-items: baseline; }
.body-p {
font-family: var(--serif);
font-size: 18px; line-height: 1.58;
color: var(--ink);
margin: 0 0 18px;
text-wrap: pretty;
letter-spacing: 0.002em;
}
.chip {
font-family: var(--sans);
font-size: 11.5px; letter-spacing: 0.02em;
padding: 5px 10px; border-radius: 999px;
background: transparent; color: var(--ink-2);
border: 0.5px solid var(--rule);
white-space: nowrap; user-select: none;
transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.home-link {
display: flex; align-items: baseline; gap: 12px;
text-align: left; width: 100%;
font-family: var(--serif); font-size: 20px; color: var(--ink);
letter-spacing: -0.005em;
padding: 4px 0;
}
.home-link .dots {
flex: 1; border-bottom: 0.5px dotted var(--rule);
transform: translateY(-4px);
}
.home-link .arrow { color: var(--ink-3); font-size: 14px; font-style: italic; }
.entry-row {
padding: 18px 28px;
cursor: pointer;
border-top: 0.5px solid var(--rule-soft);
display: flex; gap: 12px; align-items: flex-start;
}
.entry-row .title {
font-family: var(--serif); font-size: 21px; font-weight: 400;
letter-spacing: -0.005em; line-height: 1.15; color: var(--ink);
}
.entry-row .summary {
font-family: var(--serif); font-size: 15px; font-style: italic;
color: var(--ink-2); margin-top: 4px; line-height: 1.4;
}
.search-input {
width: 100%;
border-bottom: 0.5px solid var(--rule);
padding: 8px 0;
font-family: var(--serif); font-style: italic;
font-size: 17px; color: var(--ink);
outline: none;
}
.search-input::placeholder { color: var(--ink-3); }
.footer-bar {
position: sticky; bottom: 0;
background: var(--paper);
border-top: 0.5px solid var(--rule);
padding: 14px 28px calc(28px + env(safe-area-inset-bottom));
display: flex; align-items: center; gap: 22px;
width: 100%; max-width: var(--max-w);
margin: 0 auto;
}
.icon-btn { padding: 6px; display: flex; align-items: center; justify-content: center; }
.pill-btn {
border: 0.5px solid var(--ink);
padding: 10px 18px; border-radius: 999px;
font-family: var(--serif); font-size: 15px; color: var(--ink); font-style: italic;
}
/* ── note sheet ─────────────────────────────────── */
.sheet-scrim {
position: fixed; inset: 0; z-index: 30;
background: rgba(20, 16, 10, 0.18);
display: flex; align-items: flex-end;
animation: aos-fade 200ms ease both;
}
.sheet {
background: var(--paper); width: 100%;
max-width: var(--max-w); margin: 0 auto;
border-top-left-radius: 28px; border-top-right-radius: 28px;
padding: 22px 28px calc(30px + env(safe-area-inset-bottom));
box-shadow: 0 -8px 30px rgba(0,0,0,0.08);
animation: aos-rise 260ms ease both;
}
.sheet-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sheet textarea {
width: 100%; min-height: 110px; resize: none; outline: none;
font-family: var(--serif); font-size: 17px; line-height: 1.5;
color: var(--ink);
}
.sheet-actions { display: flex; justify-content: flex-end; gap: 16px; margin-top: 12px; }
.text-btn {
font-family: var(--serif); font-size: 16px; font-style: italic;
color: var(--ink-2); padding: 6px 4px;
}
.text-btn.accent { color: var(--accent); }
/* ── opening ─────────────────────────────────────── */
.opening {
position: fixed; inset: 0; z-index: 100;
background: var(--paper-deep); color: var(--bright);
display: flex; flex-direction: column;
padding: calc(64px + env(safe-area-inset-top)) 36px calc(50px + env(safe-area-inset-bottom));
cursor: pointer;
transition: opacity 520ms ease;
}
.opening.leaving { opacity: 0; }
.opening .fade { opacity: 0; transform: translateY(6px); transition: opacity 1s ease, transform 1s ease; }
.opening .fade.in { opacity: 1; transform: translateY(0); }
.opening .center { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.opening .masthead-eyebrow {
font-family: var(--sans); font-size: 10.5px; font-weight: 500;
letter-spacing: 0.20em; text-transform: uppercase;
color: var(--muted);
}
.opening .masthead-sub {
font-family: var(--serif); font-style: italic;
font-size: 13px; color: var(--muted);
margin-top: 4px;
}
.opening .quote {
font-family: var(--serif); font-style: italic; font-weight: 400;
font-size: 22px; line-height: 1.38;
color: var(--bright); letter-spacing: -0.008em;
text-wrap: pretty;
}
.opening .byline {
margin-top: 22px;
display: flex; align-items: center; gap: 10px;
font-family: var(--sans); font-size: 10.5px;
letter-spacing: 0.14em; text-transform: uppercase;
color: var(--muted); white-space: nowrap;
}
.opening .byline .ln { width: 22px; height: 0.5px; background: var(--rule-dim); flex-shrink: 0; }
.opening .intro-rule { height: 0.5px; background: var(--rule-dim); margin: 34px 0 26px; }
.opening .intro-p {
font-family: var(--serif); font-size: 17px; line-height: 1.6;
color: var(--dim); margin: 0; text-wrap: pretty;
}
.opening .intro-p strong { color: var(--bright); font-weight: 400; }
.opening .begin {
display: flex; align-items: center; gap: 12px;
font-family: var(--serif); font-style: italic; font-size: 17px;
color: var(--bright);
}
.opening .begin .ln { width: 40px; height: 0.5px; background: var(--rule-dim); }
.opening .begin .hint { color: var(--muted); }
.opening .tap { font-family: var(--serif); font-style: italic; font-size: 14px; color: var(--muted); }
/* ── look up ─────────────────────────────────────── */
.lookup {
position: fixed; inset: 0; z-index: 90;
background: var(--ink); color: var(--paper);
display: flex; flex-direction: column;
align-items: center; justify-content: center;
padding: 0 36px; text-align: center;
animation: aos-fade 600ms ease both;
}
.lookup .h {
font-family: var(--serif); font-size: 44px; font-weight: 400;
letter-spacing: -0.02em; line-height: 1.1;
}
.lookup .sub {
margin-top: 22px; max-width: 320px; line-height: 1.5;
font-family: var(--serif); font-style: italic; font-size: 18px;
color: var(--dim);
opacity: 0; transition: opacity 1.2s ease;
}
.lookup .sub.in { opacity: 1; }
.lookup .escape {
position: absolute; bottom: calc(56px + env(safe-area-inset-bottom));
left: 0; right: 0;
font-family: var(--sans); font-size: 11px;
letter-spacing: 0.16em; text-transform: uppercase;
color: oklch(0.55 0.010 70);
opacity: 0; transition: opacity 1.6s ease;
}
.lookup .escape.in { opacity: 0.7; }
/* ── teacher portrait ───────────────────────────── */
.portrait {
aspect-ratio: 4 / 5;
max-width: 200px; margin: 0 0 24px;
background: repeating-linear-gradient(135deg, var(--paper-dim) 0, var(--paper-dim) 8px, var(--paper) 8px, var(--paper) 16px);
border: 0.5px solid var(--rule);
display: flex; align-items: flex-end; padding: 10px;
}
.portrait span {
font-family: var(--mono); font-size: 10px; color: var(--ink-3);
background: var(--paper); padding: 2px 6px;
}
/* ── settings ────────────────────────────────────── */
.settings-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; gap: 16px; border-top: 0.5px solid var(--rule-soft); }
.settings-row:first-of-type { border-top: 0; }
.settings-row .label { font-family: var(--serif); font-size: 17px; }
.settings-row .help { font-family: var(--serif); font-style: italic; font-size: 13px; color: var(--ink-3); margin-top: 3px; }
.swatches { display: flex; gap: 8px; }
.swatches button {
width: 28px; height: 28px; border-radius: 50%;
border: 0.5px solid var(--rule);
transition: transform 0.15s ease;
}
.swatches button[aria-pressed="true"] {
outline: 0.5px solid var(--ink);
outline-offset: 2px;
}
.seg {
display: inline-flex; padding: 2px;
background: var(--paper-dim);
border: 0.5px solid var(--rule);
border-radius: 8px;
}
.seg button {
font-family: var(--sans); font-size: 12px;
padding: 5px 12px; border-radius: 6px;
color: var(--ink-2);
}
.seg button[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,0.06); }
.danger-btn {
font-family: var(--sans); font-size: 12px;
letter-spacing: 0.06em; text-transform: uppercase;
color: var(--ink-2);
padding: 8px 14px; border: 0.5px solid var(--rule);
border-radius: 999px;
}
/* gear button */
.gear {
position: absolute; top: calc(56px + env(safe-area-inset-top)); right: 28px;
padding: 6px; color: var(--ink-3);
}
</style>
</head>
<body>
<div id="root"></div>
<script>
(function () {
'use strict';
// ════════════════════════════════════════════════════════
// CONTENT
// ════════════════════════════════════════════════════════
const LINEAGES = {
bates: 'Bates', huxley: 'Huxley', goodrich: 'Goodrich',
schneider: 'Schneider', quackenbush: 'Quackenbush', angart: 'Angart',
endmyopia: 'Endmyopia', general: 'General',
};
const TYPES = { practice: 'Practice', concept: 'Concept', anchor: 'Anchor' };
const TEACHERS = [
{ id: 'bates', name: 'William H. Bates', years: '1860–1931', role: 'New York ophthalmologist',
bio: [
"William Horatio Bates was a New York ophthalmologist who, between roughly 1900 and 1931, made himself professionally radioactive by suggesting that refractive errors might be partly functional rather than purely structural. He had been an instructor at the New York Postgraduate Medical School and Hospital; by the end of his career he was running a small practice on West 81st Street and publishing in a magazine he edited himself.",
"His central observation — that the muscles surrounding the eye participate in accommodation, and that habits of strain can therefore degrade vision — has remained out of step with the mainstream optometric model for a hundred years. Some of his specific anatomical claims have not held up. The looser thread of his work — that the eye benefits from movement, light, rest, and the relaxation of trying — has been picked up, again and again, by careful practitioners who quietly use it with their students.",
"Read him in his own words. His writing is uneven and occasionally grandiose, and it is also one of the few books from a working ophthalmologist that treats the eye as a part of a person.",
],
books: [{ title: 'Perfect Sight Without Glasses', year: 1920, note: 'The primary text. Public domain.' }],
site: null,
},
{ id: 'huxley', name: 'Aldous Huxley', years: '1894–1963', role: 'Writer, near-blind student of Bates',
bio: [
"Huxley nearly lost his sight to keratitis as a teenager and spent the rest of his life reading with great difficulty. In the late 1930s, by then a famous novelist, he began working with a teacher of the Bates method named Margaret Corbett in Los Angeles. The Art of Seeing, published in 1942, is his careful, sceptical, first-person account of what changed and what didn't.",
"His contribution to the tradition is less in the techniques themselves than in the framing. He treated seeing as something a person does, not something that happens to them — and as a skill subject to the same disciplines of attention and relaxation that he had spent decades thinking about in other contexts.",
"If you read only one book in the tradition, read his.",
],
books: [{ title: 'The Art of Seeing', year: 1942 }],
site: null,
},
{ id: 'goodrich', name: 'Janet Goodrich', years: '1937–1999', role: 'Vision teacher, author',
bio: [
"Janet Goodrich taught natural vision out of a small studio in Big Sur and later in Australia. Her work brought a playful, embodied sensibility to a tradition that, in its first decades, could be quite austere — she introduced games, art-making, and somatic exercises as ways into the same underlying principles.",
"Her book Natural Vision Improvement remains, for many people, the friendliest door into this work. The drawings alone are worth the time.",
],
books: [
{ title: 'Natural Vision Improvement', year: 1985 },
{ title: 'Perfect Sight the Natural Way', year: 1996, note: 'For children.' },
],
site: null,
},
{ id: 'schneider', name: 'Meir Schneider', years: 'b. 1954', role: 'Founder, School for Self-Healing',
bio: [
"Meir Schneider was born severely visually impaired and was declared legally blind as a child. Beginning in his teens he worked, by his own account, very hard at a synthesis of Bates and other practices, and recovered enough functional vision to drive and to read without correction. He has spent the rest of his life teaching others.",
"His method is more intensive than most in this lineage — long sessions, sustained attention, a strong belief that the work pays back what is put in. The School for Self-Healing in San Francisco continues his teaching.",
],
books: [
{ title: 'Self-Healing: My Life and Vision', year: 1987 },
{ title: 'Movement for Self-Healing', year: 2004 },
],
site: 'self-healing.org',
},
{ id: 'quackenbush', name: 'Thomas Quackenbush', years: 'contemporary', role: 'Teacher, archivist',
bio: [
"Quackenbush is the most careful contemporary reader of Bates. His two-volume work, Relearning to See, brings together a hundred years of natural-vision teaching with the patience of someone who has gone back to the original sources and checked them against the room.",
"If you want one modern book that takes the tradition seriously without overclaiming, this is it.",
],
books: [
{ title: 'Relearning to See', year: 1997 },
{ title: 'Better Eyesight: The Complete Magazines of Wm. H. Bates', year: 2001, note: 'Editor.' },
],
site: null,
},
{ id: 'angart', name: 'Leo Angart', years: 'contemporary', role: 'Workshop teacher',
bio: [
"Leo Angart runs intensive weekend workshops, mostly in Europe and Asia, focused on practical techniques drawn from across the natural-vision tradition. His sensibility is pragmatic — he is less interested in the philosophy than in what people can do with their afternoons.",
"His book Improve Your Eyesight Naturally is a clear, friendly, technique-forward introduction. A good second book in the lineage.",
],
books: [{ title: 'Improve Your Eyesight Naturally', year: 2012 }],
site: 'vision-training.com',
},
];
const ENTRIES = [
// ── Practices ────────────────────────────────
{ id: 'palming', title: 'Palming', type: 'practice', lineage: 'bates',
summary: 'Rest the eyes in darkness, warmth, and the simple absence of demand.',
tags: ['post-screen', 'eyes-closed', 'under-three-minutes', 'before-bed'],
when: 'After long screen time, before sleep, or in any moment of obvious eye fatigue.',
body: [
"Cup the palms gently and place them over closed eyes — fingers crossing on the forehead, the heels of the hands resting lightly on the cheekbones. No pressure on the eyeballs, ever. The goal is darkness, warmth, and the simple removal of light for a minute or two.",
"Bates noticed that real darkness — the deep, even black that comes when the visual cortex has nothing to process — does something that resting with eyes merely closed does not. Some people see swirling colors, slow drifting patterns, afterimages from the last screen they looked at. Let them pass. The instruction is not to chase blackness or to perform relaxation; it is to give the eyes a brief, generous absence of demand.",
"A minute is enough. Three minutes is luxury. You will know when you've had enough — the hands warm against the face, the mind wandering somewhere else, and that's the signal.",
],
related: ['strain-principle', 'long-swing', 'dynamic-relaxation'],
},
{ id: 'long-swing', title: 'The Long Swing', type: 'practice', lineage: 'bates',
summary: 'Move the whole body, let the world swing past the eyes.',
tags: ['post-screen', 'standing', 'outdoors', 'under-three-minutes'],
when: 'After a long focus session, before stepping outside, or any time the visual field has gone narrow.',
body: [
"Stand with the feet shoulder-width apart. Lift the heels alternately as if walking in place, and let the whole torso pivot gently from side to side — head, shoulders, and hips turning as one. Keep the eyes open and soft. Don't try to track anything; the world will swing past on its own.",
"The practice undoes the small, frozen postures that screens build into the neck and the back of the eyes. As the body turns, things near you appear to move quickly past in the opposite direction, while things further away appear to move with you. This is the visual cortex sorting depth in real time, and the eyes get to participate without effort.",
"Bates called this the long swing to distinguish it from a faster version sometimes used to break visual fixation. The version that helps most people is slow — about one full turn every two or three seconds. Twenty turns is plenty.",
],
related: ['central-fixation', 'palming'],
},
{ id: 'nose-pencil', title: 'The Magic Nose Pencil', type: 'practice', lineage: 'goodrich',
summary: 'Write your name in the air with your nose. Yes, really.',
tags: ['post-screen', 'playful', 'under-three-minutes'],
when: 'When the eyes feel fixed or locked, especially after reading.',
body: [
"Imagine a soft pencil extending from the tip of your nose, about an arm's length out. With the eyes open and soft, write your name in the air, slowly, letting the head move the pencil. Then write the alphabet. Then a few words you like.",
"The reason this works is not because the eyes are doing anything in particular. It is because the head moves smoothly with the gaze, the way it is supposed to, instead of staying frozen while the eyes do all the work. Within a few seconds the small holding patterns at the base of the skull begin to release, and the visual field opens up.",
"Janet Goodrich introduced this practice for children, and most adults find it works on them too. The faint embarrassment of writing in the air with one's face is part of the medicine.",
],
related: ['long-swing', 'strain-principle'],
},
{ id: 'sun-on-lids', title: 'Sun on Closed Lids', type: 'practice', lineage: 'bates',
summary: 'A few seconds of warm light on closed eyes, outdoors.',
tags: ['outdoors', 'eyes-closed', 'under-three-minutes', 'morning'],
when: "Mid-morning or late afternoon, outdoors. Skip the noon hour. Skip entirely if the eyes are inflamed or you've taken photosensitising medication.",
body: [
"Stand or sit outside with eyes closed and the face turned toward the sun. Let the warmth fall on the closed lids. After a few breaths, slowly turn the head left and right so the light moves across the face. Twenty or thirty seconds is plenty. A minute is generous.",
"Bates believed that the eye, like the rest of the body, is built to live with the full spectrum of daylight on it, and that the modern habit of life under artificial light leaves it under-stimulated. Whether or not the mechanism is what he thought, the experience of warm light on closed lids is pleasant in a specific way — there is a steady reddish glow behind the eyelids, and the small muscles around the eyes let go.",
"Never open the eyes toward the sun. Skip this in the noon hour. If anything feels uncomfortable, stop. The point is gentleness, not exposure.",
],
related: ['palming', 'outdoor-light'],
},
{ id: 'walking-eye', title: 'The Walking Eye', type: 'practice', lineage: 'bates',
summary: 'Central fixation, taken for a walk.',
tags: ['outdoors', 'standing', 'foundational'],
when: 'Any walk you can take outdoors, at an unhurried pace.',
body: [
"Walking outdoors at a pace that is comfortable, let your gaze find one small detail and then another — a leaf, a doorknob, the corner of a roofline, the bark of a particular tree. Pick one, hold it for half a breath, move to the next. Don't sweep across the scene; don't try to take in everything at once.",
"What you are doing, without performing it, is central fixation as a continuous habit. The eyes return to their natural rhythm of looking. The head and neck come along of their own accord. After a few minutes the world will seem closer than it did when you started, not because anything has moved, but because you have begun to actually look at it.",
"Twenty minutes is generous. Five minutes is enough. The practice is finished when you notice you have stopped doing it on purpose and simply started seeing the walk.",
],
related: ['central-fixation', 'long-swing', 'outdoor-light'],
},
{ id: 'tromboning', title: 'Tromboning', type: 'practice', lineage: 'general',
summary: 'Slowly draw a card toward your face and away again.',
tags: ['under-three-minutes', 'playful'],
when: 'Before or after a long reading session.',
body: [
"Hold a card, a book, or your phone with one paragraph on it at a comfortable reading distance. Slowly bring it toward your face, taking about three seconds to do so, then slowly draw it away again. Repeat ten or twelve times, smoothly, like the slide of a trombone.",
"Don't try to keep the text sharp the whole way. Let it go a little soft at both extremes and pay attention to the moments of clarity passing through. Your accommodation system — the small muscles that change the shape of the lens — is being asked to move through its range of motion instead of holding one fixed position for an hour, which is what reading actually is.",
"The name is silly and the practice does not need to be solemn. The point is range, not virtuosity.",
],
related: ['strain-principle', 'blur-adaptation'],
},
{ id: 'neck-jaw', title: 'Neck and Jaw Release', type: 'practice', lineage: 'schneider',
summary: 'The eyes hang from the back of the skull.',
tags: ['post-screen', 'under-three-minutes'],
when: 'After long stretches at a desk. Any time the head feels heavy or the visual field has narrowed.',
body: [
"Sit upright but soft. Roll the shoulders back and down once, slowly. Drop the jaw a millimeter — just enough that the teeth are not touching — and let the tongue rest on the floor of the mouth instead of the roof. Take one easy breath.",
"Then, slowly, turn the head to look over the right shoulder, then the left. Three or four times in each direction. Then look slowly up toward the ceiling and back down toward the floor, the same number of times. The eyes can come along or stay soft; either is fine.",
"Schneider's work draws on the simple fact that the visual system shares fascia, blood supply, and proprioception with the cervical spine. Small holding patterns at the back of the neck pull on the eyes in ways most of us never notice. The release is what makes the noticing possible.",
],
related: ['palming', 'strain-principle'],
},
{ id: 'figure-eights', title: 'Figure Eights', type: 'practice', lineage: 'angart',
summary: 'Trace a slow figure eight in the air with the gaze.',
tags: ['under-three-minutes', 'playful'],
when: 'Mid-morning, or before a long focus session.',
body: [
"With the head still and the body upright, let the eyes trace a slow horizontal figure eight in front of you — out to the right, around, across the center, out to the left, around, and back. Three full passes. Then reverse direction. Then trace a vertical figure eight, the same way, and reverse that too.",
"Keep it slow. Stop if anything strains; the practice is supposed to relax the eyes, not exercise them in a gym sense. Most people notice a soft widening in the peripheral field afterwards, and a gentler quality to the held gaze when they return to whatever they were doing.",
"Angart's workshops include a number of variations on this. The simple horizontal-then-vertical pair is enough for most days.",
],
related: ['long-swing', 'nose-pencil'],
},
// ── Concepts ─────────────────────────────────
{ id: 'central-fixation', title: 'Central Fixation', type: 'concept', lineage: 'bates',
summary: 'The eye sees one point most clearly. The rest is context.',
tags: ['foundational'],
when: 'As background understanding for almost every other practice in this library.',
body: [
"The fovea — the small pit at the center of the retina where vision is sharpest — is about the size of the head of a pin. It is the only part of the eye that resolves fine detail. Everything else in the visual field is, by design, less sharp.",
"This is not a flaw. It is the architecture of normal seeing. Bates noticed that strained vision often comes from a quiet, unconscious effort to see everything sharply at once — to widen the small bright center of attention into a flat, even field. The eye cannot do this. Trying makes it tired.",
"Central fixation, as a habit, is the opposite. The eyes move constantly, picking out one detail and then another, and the rest of the world stays soft. You are not seeing less; you are seeing the way the eye is built to see. Many of the practices in this library are, underneath, ways to remember this.",
],
related: ['strain-principle', 'dynamic-relaxation', 'walking-eye'],
},
{ id: 'strain-principle', title: 'The Strain Principle', type: 'concept', lineage: 'bates',
summary: 'Trying harder to see makes seeing worse.',
tags: ['foundational'],
when: 'Any moment you notice yourself working to see something.',
body: [
"The eye is not a muscle you flex into clarity. When something is blurry, the impulse is to squint, to lean forward, to try — and every one of those gestures tightens the small muscles around the eye and inside it. The result is more blur, not less.",
"Huxley, who had nearly lost his sight to keratitis, wrote about this with the particular clarity of someone who had spent years failing to read with effort. The practical instruction in this tradition is almost the opposite of what feels intuitive: when vision is unclear, soften the gaze, breathe, blink, let the eyes look without working.",
"Most of what passes for seeing better in the natural-vision lineage is just seeing without straining. This is also why the practices here are short. A practice done with effort is no longer the practice.",
],
related: ['dynamic-relaxation', 'palming', 'central-fixation'],
},
{ id: 'outdoor-light', title: 'Why Outdoor Light Matters', type: 'concept', lineage: 'endmyopia',
summary: 'The eye expects the sun.',
tags: ['foundational', 'outdoors'],
when: 'When deciding whether a walk is a luxury or a necessity.',
body: [
"Indoor light, even bright indoor light, is roughly a hundred times dimmer than overcast daylight, and a thousand times dimmer than full sun. The eye evolved for the second of those numbers and now spends most of its day with the first.",
"There is a small but increasingly robust body of work in pediatric ophthalmology — well outside the Bates tradition — suggesting that childhood time outdoors protects against the development of myopia, and that the dose-response curve is steep. The proposed mechanism is dopamine release in the retina under high-illuminance light, which appears to inhibit axial elongation of the eye. Whatever the mechanism, the effect is real enough that some countries have begun mandating outdoor recess.",
"For adults the picture is less clear. But the experiential evidence is hard to miss: an hour outdoors leaves the eyes feeling different than an hour at a desk, no matter how good the desk lamp.",
],
related: ['sun-on-lids', 'walking-eye', 'active-focus'],
},
{ id: 'blur-adaptation', title: 'Blur Adaptation', type: 'concept', lineage: 'endmyopia',
summary: 'The brain decides how blurry blur looks.',
tags: ['foundational'],
when: 'When wondering why glasses feel so different on day one versus day thirty.',
body: [
"Vision is not a photograph. The image on the retina is processed, deblurred, and sharpened by the visual cortex before it ever reaches awareness, and the amount of sharpening is calibrated to recent experience. Spend a week in slightly under-corrected lenses and the brain will work harder; the same image gradually looks clearer than it did on day one, with no change to the optics.",
"This is uncontroversial in vision science — it goes by names like neural adaptation and contrast adaptation — and it has practical consequences. It is one reason why the same person can see clearly with their glasses one afternoon and feel as though they need a stronger prescription the next morning. It is also why slight under-correction, used carefully, is one of the few interventions in this lineage that mainstream optometry has begun to take seriously.",
"The takeaway is small but real: how clear the world looks is not only about the eye.",
],
related: ['strain-principle', 'central-fixation', 'active-focus'],
},
{ id: 'active-focus', title: 'Active Focus', type: 'concept', lineage: 'endmyopia',
summary: 'Engage softly with the edge of clarity. Do not squint to fix it.',
tags: ['foundational', 'outdoors'],
when: 'When you have a few minutes outside and a sign or a tree at almost-clear distance to look at.',
body: [
"The Endmyopia community's central technique. Standing outdoors, find something at the distance where text or a small detail is almost but not quite sharp — a street sign, the bark of a tree, the lettering on a parked van. Don't lean in. Don't squint. Hold a soft, curious attention on it, the way you'd listen for a quiet sound. For a moment, sometimes, it sharpens.",
"The proposed mechanism is that the brain reads the small amount of hyperopic defocus on the retina as a signal to engage accommodation more carefully — the same signal pathway, in childhood, that calibrates eye growth. The practical experience is more modest than the theory: a small, fleeting clarification, and the slowly developing habit of meeting the world at the edge of your visual range without straining for it.",
"If you wear glasses, this works best in slightly weaker correction than your everyday lenses. There is more on this in the entry on print pushing.",
],
related: ['blur-adaptation', 'print-pushing', 'outdoor-light'],
},
{ id: 'print-pushing', title: 'Print Pushing', type: 'concept', lineage: 'quackenbush',
summary: 'Slight under-correction, used carefully, used outdoors.',
tags: ['foundational'],
when: 'Worth thinking about before your next eye exam, if you wear glasses for distance.',
body: [
"Print pushing is the practice of using slightly weaker glasses than the optometric chart calls for, in conditions where the brain can engage with the resulting soft blur productively — outdoors, in good light, at distance, on terrain that gives you something interesting to look at.",
"Quackenbush has been suggesting variations of this for thirty years. The case for it has recently begun to appear in mainstream optometry under the name active myopia management, in conservative form: small under-corrections, monitored carefully, in clinical settings.",
"This is not a thing to undertake from a book or an app. It is a thing to undertake with an optometrist who is willing to write you a slightly weaker prescription and to check on you. Most are not. A few are. If you find one, that relationship is worth a great deal.",
],
related: ['blur-adaptation', 'active-focus', 'strain-principle'],
},
{ id: 'mental-tiredness', title: 'Mental Tiredness', type: 'concept', lineage: 'huxley',
summary: 'The eyes get tired because the rest of you is.',
tags: ['foundational'],
when: 'At the end of a hard day at the desk, when the world has gone slightly soft.',
body: [
"Huxley argued, following Bates, that visual fatigue is rarely a story about the eye alone. The eye does what the attention asks of it. A person who has been on a difficult call for an hour and looks up to find the room blurry has not damaged their cornea; they have simply been holding their attention so tightly that the small muscles around the eye have come along for the ride.",
"The recovery is not optical. It is attentional. A walk, a stretch, a few minutes of nothing in particular — and the world resharpens of its own accord. The eye was never the problem; it was reporting on a larger weather system.",
"Knowing this changes how you treat your own tired eyes: not as a thing to be exercised back into shape, but as a barometer of the day you have actually been having. The kind reading of blurry vision at five in the afternoon is that you have asked a lot of yourself and your eyes are letting you know.",
],
related: ['strain-principle', 'palming', 'dynamic-relaxation'],
},
// ── Anchors ──────────────────────────────────
{ id: 'dynamic-relaxation', title: 'Dynamic Relaxation', type: 'anchor', lineage: 'huxley',
summary: 'Relaxed and alert, at the same time.',
tags: ['foundational', 'principle'],
when: 'Worth keeping in mind.',
body: [
"“The art of seeing, like the art of living, can only be acquired by those who learn the rare and difficult art of being at the same time relaxed and alert.”",
"— Aldous Huxley, The Art of Seeing, 1942",
"The whole tradition lives inside this sentence. Most of us are alert and tense, or relaxed and dull. The state where the eyes work easily is neither — it is the state of a person watching a bird, or listening to a piece of music they love. Awake, but unhurried. Present, but soft.",
],
related: ['strain-principle', 'central-fixation', 'palming'],
},
{ id: 'bates-on-effort', title: 'Bates on Effort', type: 'anchor', lineage: 'bates',
summary: 'A line to come back to.',
tags: ['principle'],
when: 'Worth keeping in mind.',
body: [
"“When the mind is at rest, nothing can tire the eyes; and when the mind is under a strain, nothing can rest them.”",
"— William H. Bates",
"Most of the practices in this library are, in the end, ways of remembering this.",
],
related: ['strain-principle', 'palming', 'mental-tiredness'],
},
];
const EPIGRAPHS = [
{ line: "“The art of seeing, like the art of living, can only be acquired by those who learn the rare and difficult art of being at the same time relaxed and alert.”", who: "Aldous Huxley · 1942" },
{ line: "“When the mind is at rest, nothing can tire the eyes; and when the mind is under a strain, nothing can rest them.”", who: "William H. Bates" },
{ line: "“The eye is not a camera. It is part of a person.”", who: "after W. H. Bates" },
{ line: "“Most strained vision is the body trying very hard to see.”", who: "after Huxley · The Art of Seeing" },
{ line: "“To see, do less.”", who: "an anchor" },
];
const ACCENTS = [
{ value: '#9C5F3E', label: 'Clay' },
{ value: '#3E5F4F', label: 'Pine' },
{ value: '#4A5A6C', label: 'Slate' },
{ value: '#7A4A52', label: 'Rose' },
];
// ════════════════════════════════════════════════════════
// STATE
// ════════════════════════════════════════════════════════
const LS_KEY = 'artofseeing.v1';
const PREFS_KEY = 'artofseeing.prefs.v1';
const defaultState = () => ({
favs: {}, journal: [], notes: [],
typeFilter: null, lineageFilter: null, search: '',
hasOpened: false,
});
const defaultPrefs = () => ({ openingMode: 'first', accent: '#9C5F3E' });
function load(key, def) {
try { const raw = localStorage.getItem(key); if (raw) return { ...def(), ...JSON.parse(raw) }; }
catch (e) {}
return def();
}
function save(key, val) {
try { localStorage.setItem(key, JSON.stringify(val)); } catch (e) {}
}
let state = load(LS_KEY, defaultState);
let prefs = load(PREFS_KEY, defaultPrefs);
function setState(patch) {
state = { ...state, ...patch };
save(LS_KEY, state);
}
function setPrefs(patch) {
prefs = { ...prefs, ...patch };
save(PREFS_KEY, prefs);
applyAccent();
}
function applyAccent() {
document.documentElement.style.setProperty('--accent', prefs.accent);
}
function dispatch(action) {
switch (action.type) {
case 'toggleFav': {
const favs = { ...state.favs };
if (favs[action.id]) delete favs[action.id]; else favs[action.id] = true;
setState({ favs }); break;
}
case 'markDone':
setState({ journal: [...state.journal, { entryId: action.id, at: Date.now() }] }); break;
case 'addNote':
setState({ notes: [...state.notes, { entryId: action.entryId, ...action.note }] }); break;
case 'search': setState({ search: action.value }); break;
case 'typeFilter': setState({ typeFilter: action.value }); break;
case 'lineageFilter': setState({ lineageFilter: action.value }); break;
case 'markOpened': setState({ hasOpened: true }); break;
case 'resetOpening': setState({ hasOpened: false }); break;
case 'clearAll': setState({ favs: {}, journal: [], notes: [] }); break;
}
render();
}
// ════════════════════════════════════════════════════════
// ROUTER
// ════════════════════════════════════════════════════════
let route;
const history = [];
function initialRoute() {
if (prefs.openingMode === 'always') return { name: 'opening', variant: 'epigraph' };
if (prefs.openingMode === 'first' && !state.hasOpened) return { name: 'opening', variant: 'full' };
return { name: 'home' };
}
function go(next) {
if (next.name === 'surprise') {
const pick = ENTRIES[Math.floor(Math.random() * ENTRIES.length)];
next = { name: 'entry', id: pick.id };
}
history.push(route);
route = next;
window.scrollTo(0, 0);
render();
}
function goBack() {
if (history.length > 0) {
route = history.pop();
} else {
route = { name: 'home' };
}
window.scrollTo(0, 0);
render();
}
// ════════════════════════════════════════════════════════
// HELPERS
// ════════════════════════════════════════════════════════
const esc = (s) => String(s ?? '').replace(/[&<>"']/g, (c) => ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }[c]));
function timeOfDay() {
const h = new Date().getHours();
if (h < 6) return 'night';
if (h < 11) return 'morning';
if (h < 17) return 'afternoon';
if (h < 21) return 'evening';
return 'night';
}
function pickToday(entries) {
const day = Math.floor(Date.now() / 86400000);
const prefer = {
morning: ['sun-on-lids', 'outdoor-light', 'long-swing', 'central-fixation', 'walking-eye', 'figure-eights'],
afternoon: ['long-swing', 'nose-pencil', 'strain-principle', 'central-fixation', 'tromboning', 'active-focus'],
evening: ['palming', 'dynamic-relaxation', 'strain-principle', 'blur-adaptation', 'mental-tiredness', 'neck-jaw'],
night: ['palming', 'dynamic-relaxation', 'bates-on-effort', 'mental-tiredness'],
}[timeOfDay()];
const pool = entries.filter(e => prefer.includes(e.id));
return (pool.length ? pool : entries)[day % (pool.length || entries.length)];
}
function formatDay(at) {
const d = new Date(at);
const today = new Date();
const sameDay = (a, b) => a.toDateString() === b.toDateString();
const yest = new Date(today); yest.setDate(today.getDate() - 1);
if (sameDay(d, today)) return 'Today';
if (sameDay(d, yest)) return 'Yesterday';
return d.toLocaleDateString([], { month: 'long', day: 'numeric' });
}
function typeLineage(type, lineage) {
return `<div class="eyebrow">${esc(TYPES[type])}<span style="opacity:0.5;padding:0 7px">·</span>${esc(LINEAGES[lineage])}</div>`;
}
function heart(filled, size = 18) {
const c = filled ? 'var(--accent)' : 'var(--ink-3)';
return filled
? `<svg width="${size}" height="${size}" viewBox="0 0 18 18"><path d="M9 16s-6.5-4-6.5-9c0-2.2 1.8-4 4-4 1.3 0 2.5.7 3.1 1.7C10.2 3.7 11.4 3 12.7 3c2.2 0 4 1.8 4 4 0 5-7.5 9-7.5 9z" fill="${c}"/></svg>`
: `<svg width="${size}" height="${size}" viewBox="0 0 18 18" fill="none"><path d="M9 15.5s-6-3.5-6-8.5c0-2 1.5-3.5 3.5-3.5 1.2 0 2.3.6 2.9 1.5C10 4.1 11.1 3.5 12.3 3.5c2 0 3.5 1.5 3.5 3.5 0 5-6.8 8.5-6.8 8.5z" stroke="${c}" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/></svg>`;
}
function backRow(label = 'Back') {
return `
<div class="col back-row">
<button class="back" data-back>
<svg width="10" height="14" viewBox="0 0 10 14"><path d="M8 1L2 7l6 6" stroke="" stroke-width="1.4" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>
<span>${esc(label)}</span>
</button>
<div class="eyebrow" style="font-size:10px">Art of Seeing</div>
</div>`;
}
// ════════════════════════════════════════════════════════
// SCREENS
// ════════════════════════════════════════════════════════
const screens = {};
// ── Home ─────────────────────────────────────────────────
screens.home = () => {
const today = pickToday(ENTRIES);
const tod = timeOfDay();
return `
<div class="page col" style="flex:1;display:flex;flex-direction:column;padding-top:calc(64px + env(safe-area-inset-top));padding-bottom:calc(40px + env(safe-area-inset-bottom));position:relative">
<button class="gear" data-go="settings" aria-label="Settings">
<svg width="18" height="18" viewBox="0 0 18 18" fill="none">
<circle cx="9" cy="9" r="2.5" stroke="currentColor" stroke-width="1.2"/>
<path d="M9 1v2M9 15v2M1 9h2M15 9h2M3.3 3.3l1.4 1.4M13.3 13.3l1.4 1.4M3.3 14.7l1.4-1.4M13.3 4.7l1.4-1.4" stroke="currentColor" stroke-width="1.2" stroke-linecap="round"/>
</svg>
</button>
<div>
<div class="eyebrow" style="font-size:10.5px">Art of Seeing</div>
<div class="lede" style="font-size:14px;color:var(--ink-3);margin-top:4px">A reference, not a coach.</div>
</div>
<div style="flex:1;display:flex;flex-direction:column;justify-content:center;padding:12px 0;cursor:pointer" data-go="entry:${today.id}">
<div class="eyebrow" style="margin-bottom:16px">For this ${esc(tod)}</div>
<div>
<div style="font-family:var(--serif);font-size:38px;font-weight:400;letter-spacing:-0.015em;line-height:1.05;color:var(--ink)">${esc(today.title)}</div>
<div class="lede" style="font-size:18px;margin-top:14px;max-width:320px">${esc(today.summary)}</div>
<div style="margin-top:18px">${typeLineage(today.type, today.lineage)}</div>
</div>
</div>
<nav style="display:flex;flex-direction:column;gap:14px;padding-bottom:12px">
<button class="home-link" data-go="library"><span>Browse the library</span><span class="dots"></span><span class="arrow">→</span></button>
<button class="home-link" data-go="surprise"><span>Surprise me</span><span class="dots"></span><span class="arrow">→</span></button>
<button class="home-link" data-go="you"><span>You</span><span class="dots"></span><span class="arrow">→</span></button>
<button class="home-link" data-go="teachers"><span>Teachers</span><span class="dots"></span><span class="arrow">→</span></button>
<button class="home-link" data-go="about"><span>About</span><span class="dots"></span><span class="arrow">→</span></button>
</nav>
<div class="lede" style="font-size:12.5px;color:var(--ink-3);margin-top:22px;max-width:280px">Look briefly. Close the phone. The practice is what happens next.</div>
</div>`;
};
// ── Library ──────────────────────────────────────────────
screens.library = () => {
const { typeFilter, lineageFilter, search, favs } = state;
const q = search.trim().toLowerCase();
const filtered = ENTRIES.filter(e => {
if (typeFilter && e.type !== typeFilter) return false;
if (lineageFilter && e.lineage !== lineageFilter) return false;
if (!q) return true;
const hay = (e.title + ' ' + e.summary + ' ' + e.body.join(' ')).toLowerCase();
return hay.includes(q);
});
const grouped = { practice: [], concept: [], anchor: [] };
filtered.forEach(e => grouped[e.type].push(e));
const typeChips = ['<button class="chip" aria-pressed="' + (!typeFilter) + '" data-filter="type" data-value="">All</button>']
.concat(Object.entries(TYPES).map(([k, v]) =>
`<button class="chip" aria-pressed="${typeFilter === k}" data-filter="type" data-value="${esc(k)}">${esc(v)}</button>`
)).join('');
const usedLineages = Object.entries(LINEAGES).filter(([k]) => ENTRIES.some(e => e.lineage === k));
const lineageChips = usedLineages.map(([k, v]) =>
`<button class="chip" aria-pressed="${lineageFilter === k}" data-filter="lineage" data-value="${esc(k)}">${esc(v)}</button>`
).join('');
const groupsHtml = Object.entries(grouped).filter(([, items]) => items.length > 0).map(([type, items]) => `
<div>
<div class="col" style="padding-top:20px;padding-bottom:6px"><div class="eyebrow">${esc(TYPES[type])}</div></div>
${items.map(e => `
<div class="entry-row" data-go="entry:${e.id}">
<div style="flex:1;min-width:0">
<div class="title">${esc(e.title)}</div>
<div class="summary">${esc(e.summary)}</div>
<div style="margin-top:8px">${typeLineage(e.type, e.lineage)}</div>
</div>
${favs[e.id] ? `<div style="padding-top:6px">${heart(true, 14)}</div>` : ''}
</div>`).join('')}
</div>`).join('');
return `
<div class="page">
${backRow('Home')}
<div class="col" style="padding-bottom:8px">
<div class="title-xl">Library</div>
<div class="lede lede-15">${ENTRIES.length} entries across practice, concept, and anchor.</div>
</div>
<div class="col" style="padding-top:16px;padding-bottom:8px">
<input type="text" class="search-input" placeholder="Search the library" value="${esc(search)}" data-search />
</div>
<div class="col" style="padding-top:14px;padding-bottom:4px"><div class="chip-row">${typeChips}</div></div>
<div class="col" style="padding-top:8px;padding-bottom:12px"><div class="chip-row">${lineageChips}</div></div>
<div style="margin-top:6px">${groupsHtml}</div>
${filtered.length === 0
? `<div class="col" style="padding:40px 28px"><div class="lede" style="font-size:15px;color:var(--ink-3)">Nothing matches that yet. The library is small on purpose.</div></div>`
: ''}
<div style="height:60px"></div>
</div>`;
};
// ── Entry ────────────────────────────────────────────────
screens.entry = (r) => {
const entry = ENTRIES.find(e => e.id === r.id);
if (!entry) return screens.home();
const teacher = TEACHERS.find(t => t.id === entry.lineage);
const faved = !!state.favs[entry.id];
const relatedHtml = entry.related && entry.related.length
? `<div style="margin-top:30px">
<div class="eyebrow" style="margin-bottom:10px">Related</div>
<div style="display:flex;flex-direction:column;gap:8px">
${entry.related.map(rid => {
const r2 = ENTRIES.find(x => x.id === rid);
if (!r2) return '';
return `<button data-go="entry:${r2.id}" style="text-align:left;font-family:var(--serif);font-size:17px;color:var(--ink)">${esc(r2.title)} <span style="color:var(--ink-3);font-style:italic;font-size:14px">· ${esc(TYPES[r2.type].toLowerCase())}</span></button>`;
}).join('')}
</div>
</div>` : '';
return `
<div class="page" style="display:flex;flex-direction:column;min-height:100vh;min-height:100svh;position:relative">
${backRow('Library')}
<article class="col" style="padding-bottom:40px">
${typeLineage(entry.type, entry.lineage)}
<h1 class="title-lg" style="margin:10px 0 14px">${esc(entry.title)}</h1>
<div class="lede lede-19">${esc(entry.summary)}</div>
<div class="rule" style="margin:24px 0 22px"></div>
${entry.body.map(p => `<p class="body-p">${esc(p)}</p>`).join('')}
<div style="margin-top:26px">
<div class="eyebrow" style="margin-bottom:6px">When this helps</div>
<div class="lede" style="font-size:16px">${esc(entry.when)}</div>
</div>
${relatedHtml}
${teacher ? `
<div style="margin-top:32px">
<button data-go="teacher:${teacher.id}" style="text-align:left;font-family:var(--serif);font-style:italic;font-size:14px;color:var(--ink-3)">About ${esc(teacher.name)} →</button>
</div>` : ''}
</article>
<div class="footer-bar">
<button class="icon-btn" data-action="toggleFav" data-id="${entry.id}" aria-label="Favorite">${heart(faved, 20)}</button>
<button class="icon-btn" data-action="openNote" data-id="${entry.id}" aria-label="Note">
<svg width="20" height="20" viewBox="0 0 20 20" fill="none">
<path d="M3.5 5h11M3.5 9h11M3.5 13h7" stroke="var(--ink-2)" stroke-width="1.2" stroke-linecap="round"/>
</svg>
</button>
<div style="flex:1"></div>
<button class="pill-btn" data-action="markDone" data-id="${entry.id}">I did this</button>
</div>
</div>`;
};
// ── Look up ──────────────────────────────────────────────
screens.lookup = () => {
// animate phases via timers after render
setTimeout(() => {
document.querySelectorAll('.lookup .sub, .lookup .escape').forEach(el => el.classList.add('in'));
}, 2400);
return `
<div class="lookup page">
<div class="h">Look up.</div>
<div class="sub">Close the phone when you are ready.</div>
<button class="escape" data-go="home">If you must, return home</button>
</div>`;
};
// ── Teachers list ────────────────────────────────────────
screens.teachers = () => {
return `
<div class="page">
${backRow('Home')}
<div class="col" style="padding-bottom:4px">
<div class="title-xl">Teachers</div>
<div class="lede lede-16" style="max-width:320px">The lineage this library inherits from. None of these people are alive on the internet to thank — read them in their own words instead.</div>
</div>
<div style="margin-top:22px">
${TEACHERS.map(t => `
<div class="col" data-go="teacher:${t.id}" style="padding-top:18px;padding-bottom:18px;cursor:pointer;border-top:0.5px solid var(--rule-soft)">
<div style="font-family:var(--serif);font-size:22px;color:var(--ink);letter-spacing:-0.005em;line-height:1.15">${esc(t.name)}</div>
<div class="lede" style="font-size:14px;margin-top:3px">${esc(t.role)}</div>
<div style="margin-top:6px"><div class="eyebrow">${esc(t.years)}</div></div>
</div>`).join('')}
</div>
<div style="height:60px"></div>
</div>`;
};
// ── Teacher detail ──────────────────────────────────────
screens.teacher = (r) => {
const t = TEACHERS.find(x => x.id === r.id);
if (!t) return screens.teachers();
const theirEntries = ENTRIES.filter(e => e.lineage === t.id);