Repository navigation
Expand file tree
/
Copy pathstyles.css
More file actions
1178 lines (1093 loc) · 35.3 KB
/
Copy pathstyles.css
File metadata and controls
1178 lines (1093 loc) · 35.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
/* styles.css — Daylight Paper. Tokens and rules from docs/redesign-plan.md.
Light-first, warm, editorial: paper that happens to be in a browser.
Mobile-first: base styles are the <768px single-pane shell; wider
layouts are added in min-width queries (redesign-plan §4). */
/* ---- Writing face ---------------------------------------------------------
Self-hosted (redesign-plan §3): the writing surface must not depend on a
third-party request — offline is exactly when a local-first notepad is
most likely to be open. latin-ext carries Turkish (ğ ş İ ı). */
@font-face {
font-family: "Source Serif 4";
font-style: normal;
font-weight: 400;
font-display: swap;
src: url("fonts/source-serif-4-latin.woff2") format("woff2");
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
font-family: "Source Serif 4";
font-style: normal;
font-weight: 400;
font-display: swap;
src: url("fonts/source-serif-4-latin-ext.woff2") format("woff2");
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Available to assistive technology, absent from the page. Used by the status
bar's announcer (#status-a11y): the visible status text carries a timestamp
that changes on every save, so announcing it verbatim would repeat the same
fact on every flush. The announcer carries the state phrase alone. */
.sr-only {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip-path: inset(50%);
white-space: nowrap;
border: 0;
}
/* The no-JavaScript fallback (index.html). Styled from literals, not tokens:
it sits above #app in the document and must stay legible even if the token
layer below ever changes shape. */
#noscript-note {
max-width: 34rem;
margin: 0 auto;
padding: 3rem 1.5rem;
font-family: "Source Serif 4", Charter, Georgia, serif;
font-size: 18px;
line-height: 1.7;
color: #1C1917;
}
#noscript-note h1 { font-size: 24px; font-weight: 400; margin: 0 0 1rem; }
#noscript-note a { color: #B45309; }
/* ---- Tokens ---------------------------------------------------------------
Light is the default scheme. Every value here was contrast-measured on
2026-08-19 (see redesign-plan §2/§5 and the implementation notes):
- --text-secondary is #716B66, NOT the plan's #78716C: the plan measured
that one only on --bg (4.59:1); on --panel-bg it is 4.44:1 and fails.
#716B66 measures 4.86:1 on panel, 5.07:1 on bg.
- --accent (#B45309, 4.84:1 on bg) is for text, links and focus;
--accent-surface (#D97706, 3.07:1 vs bg) is for fills and icons ONLY.
Do not collapse them (redesign-plan §2).
- The functional set (--ok/--info/--warn/--danger) is deliberately not
the brand accent; every use pairs with a label or icon, never color
alone (redesign-plan §5 — the two-fact honesty rule). */
:root {
color-scheme: light;
--bg: #FFFBEB;
--panel-bg: #F6F6F6;
--elevated-bg: #FFFFFF;
--text: #0F172A;
--text-secondary: #716B66;
/* Meta text that sits on a *tinted* row rather than the flat panel. The
selected note's translucent overlay composites the panel down to ~#E2E2E2,
where --text-secondary measures only 4.06:1 at 12px — a real 1.4.3 failure
on the one row the reader is looking at. Measured 2026-08-22: this value
is 4.86:1 on the selected row, 5.82:1 on the plain panel. */
--text-meta: #655F5A;
--border: #EEEDED;
--accent: #B45309;
--accent-surface: #D97706;
--on-accent: #1C1917; /* 5.49:1 on --accent-surface */
--hover-bg: rgba(28, 25, 23, 0.05);
--active-bg: rgba(28, 25, 23, 0.09);
--selection: rgba(217, 119, 6, 0.22);
--sheet-shadow: 0 1px 2px rgba(28, 25, 23, 0.04), 0 8px 24px rgba(28, 25, 23, 0.05);
/* Functional states — measured on both --bg and --panel-bg (4.5:1+). */
--ok: #15803D;
--info: #1D4ED8;
--warn: #92400E;
--danger: #B91C1C;
--font-ui: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
--font-writing: "Source Serif 4", Charter, "Bitstream Charter", "Iowan Old Style", Georgia, serif;
/* The alternate writing face, for notes where column alignment carries
meaning: ASCII/box-drawing diagrams, tables, code, log excerpts. System
faces only — the same offline reasoning that made the serif self-hosted
rules out downloading a second family for an opt-in mode. */
--font-code: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "DejaVu Sans Mono", "Liberation Mono", monospace;
/* Spacing scale (density 5 / standard): 16 / 24 / 32 / 48 / 64. */
--space-1: 16px;
--space-2: 24px;
--space-3: 32px;
--space-4: 48px;
--space-5: 64px;
--radius-control: 6px;
--radius-panel: 8px;
--radius-dialog: 10px;
--motion-control: 150ms;
--motion-panel: 210ms;
}
/* Dark — the warm counterpart (redesign-plan §2), secondary mode.
Measured 2026-08-19: all text/functional values clear 4.5:1 on every
surface they appear on. --warn is #F97316, NOT the light value: on dark
panels #92400E is illegible, and #F97316 is the most separable orange
from the #FBBF24 accent that still passes (they remain close in
luminance — one more reason warning states always carry a label). */
:root[data-theme="dark"] {
color-scheme: dark;
--bg: #1C1917;
--panel-bg: #262220;
--elevated-bg: #2E2A27;
--text: #FAF9F6;
--text-secondary: #A8A29E;
/* Dark counterpart: --text-secondary measured 4.49:1 on the selected row's
composited surface — a hairline miss. This is 4.93:1 there, 6.87:1 plain. */
--text-meta: #B0AAA6;
--border: #3A3532;
--accent: #FBBF24;
--accent-surface: #D97706;
--hover-bg: rgba(250, 249, 246, 0.06);
--active-bg: rgba(250, 249, 246, 0.11);
--selection: rgba(251, 191, 36, 0.30);
--sheet-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 8px 24px rgba(0, 0, 0, 0.25);
--ok: #4ADE80;
--info: #60A5FA;
--warn: #F97316;
--danger: #F87171;
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) {
color-scheme: dark;
--bg: #1C1917;
--panel-bg: #262220;
--elevated-bg: #2E2A27;
--text: #FAF9F6;
--text-secondary: #A8A29E;
--text-meta: #B0AAA6;
--border: #3A3532;
--accent: #FBBF24;
--accent-surface: #D97706;
--hover-bg: rgba(250, 249, 246, 0.06);
--active-bg: rgba(250, 249, 246, 0.11);
--selection: rgba(251, 191, 36, 0.30);
--sheet-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 8px 24px rgba(0, 0, 0, 0.25);
--ok: #4ADE80;
--info: #60A5FA;
--warn: #F97316;
--danger: #F87171;
}
}
@media (prefers-reduced-motion: reduce) {
:root { --motion-control: 0ms; --motion-panel: 0ms; }
}
* { box-sizing: border-box; }
body {
margin: 0;
background: var(--bg);
color: var(--text);
font-family: var(--font-ui);
font-size: 14px;
line-height: 1.45;
}
::selection { background: var(--selection); }
button {
font: inherit;
color: inherit;
background: none;
border: none;
border-radius: var(--radius-control);
cursor: pointer;
transition: background var(--motion-control) ease, border-color var(--motion-control) ease, color var(--motion-control) ease;
}
button svg { flex: none; }
button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible, a:focus-visible {
/* Focus uses --accent, never --accent-surface (redesign-plan §10). */
outline: 2px solid var(--accent);
outline-offset: 2px;
}
/* ---- Frame ----------------------------------------------------------------
Base = mobile: one pane at a time. #app carries data-view="list"|"editor";
app.js owns it (including real back behavior via history state). */
#app {
display: flex;
flex-direction: column;
height: 100vh;
height: 100dvh;
}
#app-notices:empty { display: none; }
#app-notices .app-notice {
padding: 0.55rem 1rem;
border-bottom: 1px solid var(--border);
background: var(--elevated-bg);
color: var(--danger);
font-size: 13px;
}
/* Browser-retention information (e.g. the standing Safari notice) is never
colored like a save failure — the two-fact honesty rule keeps those
truths visually separate everywhere in this app (redesign-plan §5). */
#app-notices .app-notice.tone-info { color: var(--info); }
/* Single-pane switching. No data-view attribute behaves as the list view,
so the pre-boot frame never flashes an empty editor. */
#app:not([data-view="editor"]) #editor-panel { display: none; }
#app[data-view="editor"] #notes-panel { display: none; }
/* ---- Sidebar / notes list ------------------------------------------------ */
#notes-panel {
flex: 1;
min-height: 0;
display: flex;
flex-direction: column;
background: var(--panel-bg);
position: relative; /* anchors the undo-banner overlay */
/* The panel itself scrolls on small screens; the action row is sticky. */
overflow-y: auto;
}
#brand {
display: flex;
align-items: center;
gap: 0.6rem;
padding: 0.9rem var(--space-1) 0.75rem;
}
#brand svg { flex: none; display: block; }
#brand .wordmark {
font-family: var(--font-writing);
font-size: 19px;
font-weight: 400;
letter-spacing: 0.01em;
color: var(--text);
}
#brand .brand-spacer { flex: 1; }
#theme-toggle {
padding: 0.35rem 0.45rem;
color: var(--text-secondary);
line-height: 0;
}
#theme-toggle:hover { background: var(--hover-bg); color: var(--text); }
/* Temporary home for the language control (product-maturity-plan.md §3.1 moves
it into Settings). A native select, styled down to match the header chrome
but keeping its own popup — the platform control is the accessible one. */
#language-select {
font-family: var(--font-ui);
font-size: 12px;
color: var(--text-secondary);
background: transparent;
border: 1px solid transparent;
border-radius: var(--radius-control, 6px);
padding: 0.2rem 0.15rem;
min-height: 24px;
cursor: pointer;
}
#language-select:hover { background: var(--hover-bg); color: var(--text); border-color: var(--border); }
/* The popup itself is painted by the platform, so its options need an explicit
background — a transparent one inherits the page and can render unreadably. */
#language-select option { background: var(--elevated-bg); color: var(--text); }
.sidebar-actions {
display: flex;
flex-direction: column;
gap: 0.5rem;
padding: 0 0.75rem 0.75rem;
/* New note + Search stay reachable while the panel scrolls. */
position: sticky;
top: 0;
z-index: 3;
background: var(--panel-bg);
padding-top: 0.5rem;
}
#new-note {
padding: 0.55rem 0.75rem;
font-weight: 600;
text-align: center;
color: var(--on-accent);
background: var(--accent-surface);
border: 1px solid transparent;
}
#new-note:hover { filter: brightness(1.06); }
#new-note:active { filter: brightness(0.95); }
#search {
font: inherit;
width: 100%;
padding: 0.45rem 0.65rem;
color: var(--text);
background: var(--elevated-bg);
border: 1px solid var(--border);
border-radius: var(--radius-control);
}
#search::placeholder { color: var(--text-secondary); }
#note-list {
list-style: none;
margin: 0;
padding: 0 0.5rem;
/* Mobile: the panel is the scroll container and the list flows in it.
>=768px flips this: the list scrolls internally, the footer stays put. */
flex: none;
min-height: 0;
scrollbar-width: thin;
scrollbar-color: var(--border) transparent;
}
#note-list::-webkit-scrollbar { width: 8px; }
#note-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
#note-list .list-heading {
font-size: 12px;
font-weight: 600;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--text-secondary);
padding: 0.7rem 0.5rem 0.25rem;
}
/* Empty states are invitations to act: message + action (redesign-plan §6). */
#note-list .list-empty {
padding: 0.75rem 0.5rem;
color: var(--text-secondary);
font-size: 13px;
}
#note-list .list-empty .empty-query {
display: block;
color: var(--text);
margin-top: 2px;
word-break: break-word;
}
#note-list .list-empty .empty-action {
display: inline-block;
margin-top: 0.5rem;
padding: 0.3rem 0.6rem;
font-size: 12.5px;
border: 1px solid var(--border);
background: var(--elevated-bg);
color: var(--text);
}
#note-list .list-empty .empty-action:hover { background: var(--hover-bg); }
.note-item {
position: relative;
border-radius: var(--radius-control);
margin-bottom: 2px;
}
.note-item:hover { background: var(--hover-bg); }
.note-item.is-active {
background: var(--active-bg);
box-shadow: inset 2px 0 0 var(--accent-surface);
}
.note-item .note-open {
display: block;
width: 100%;
text-align: left;
padding: 0.45rem 0.55rem;
/* Clears the pin + duplicate + trash action cluster. */
padding-right: 6rem;
}
.note-item .note-title {
display: block;
font-weight: 500;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.note-item .note-time {
display: block;
font-size: 12px;
color: var(--text-meta);
margin-top: 1px;
}
.note-item .note-actions {
position: absolute;
top: 50%;
transform: translateY(-50%);
right: 0.35rem;
display: flex;
gap: 2px;
opacity: 0;
transition: opacity var(--motion-control) ease;
}
.note-item:hover .note-actions,
.note-item:focus-within .note-actions { opacity: 1; }
.note-item.is-pinned .note-actions .action-pin { opacity: 1; color: var(--accent); }
.icon-button {
padding: 0.4rem 0.45rem;
line-height: 0;
color: var(--text-secondary);
}
/* No hover on touch devices — the actions must simply be there. */
@media (hover: none) {
.note-item .note-actions { opacity: 1; }
}
.icon-button:hover { background: var(--active-bg); color: var(--text); }
.icon-button.action-trash:hover { color: var(--danger); }
/* Trash rows keep visible text buttons — restore/delete must not hide.
The title gets its own full-width line: on one line the two button labels
consume the entire sidebar width and flex collapses the title to 0px,
leaving two anonymous buttons — one of them permanent deletion. */
.note-item.trash-row {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0.3rem 0.4rem;
padding: 0.45rem 0.55rem;
}
.note-item.trash-row .note-title { flex: 1 0 100%; min-width: 0; font-weight: 500; }
.note-item.trash-row button {
flex: none;
font-size: 12px;
padding: 0.25rem 0.5rem;
border: 1px solid var(--border);
background: var(--elevated-bg);
}
.note-item.trash-row button:hover { background: var(--hover-bg); }
.note-item.trash-row .trash-purge:hover { border-color: var(--danger); color: var(--danger); }
/* The title-as-disclosure. It must not pick up the pill styling the two action
buttons share above — it is the row's heading, and reading as a third button
beside "Delete permanently" is exactly the ambiguity to avoid. */
.note-item.trash-row .trash-title {
flex: 1 0 100%;
min-width: 0;
text-align: left;
font-weight: 500;
font-size: 14px;
border: none;
background: none;
padding: 0.1rem 0;
min-height: 24px;
color: var(--text);
cursor: pointer;
}
.note-item.trash-row .trash-title:hover { color: var(--accent); background: none; }
.note-item.trash-row .trash-title::before {
content: "\203A";
display: inline-block;
width: 0.85em;
color: var(--text-meta);
transition: transform 120ms ease;
}
.note-item.trash-row .trash-title[aria-expanded="true"]::before { transform: rotate(90deg); }
.trash-preview[hidden] { display: none; }
.trash-preview {
flex: 1 0 100%;
border-top: 1px solid var(--border);
margin-top: 0.15rem;
padding-top: 0.4rem;
}
.trash-preview-text {
/* Monospace and pre-wrap: a trashed note may well be a diagram, and this is
the last chance to see it before it is destroyed. Capped because the trash
is a list, not a reading surface. */
font-family: var(--font-code);
font-size: 12px;
line-height: 1.5;
white-space: pre-wrap;
overflow-wrap: anywhere;
max-height: 11rem;
overflow: auto;
margin: 0;
color: var(--text);
}
.trash-preview-text.is-empty { color: var(--text-meta); font-style: italic; }
.trash-preview-meta {
margin: 0.35rem 0 0;
font-size: 11px;
color: var(--text-meta);
}
#undo-banner[hidden] { display: none; }
/* Kept out of the list's flow: an in-flow banner shifted the note rows under
the cursor exactly while the user reached for Undo, and stole list height.
Mobile (scrolling panel): sticky pins it above the footer while scrolled.
Desktop (non-scrolling panel): absolute overlay — see the 768px block. */
#undo-banner {
position: sticky;
bottom: 0.6rem;
margin: 0 0.6rem;
z-index: 5;
padding: 0.5rem 0.65rem;
display: flex;
align-items: center;
gap: 0.5rem;
font-size: 13px;
background: var(--elevated-bg);
border: 1px solid var(--border);
border-radius: var(--radius-control);
box-shadow: var(--sheet-shadow);
}
#undo-banner button {
border: 1px solid var(--border);
padding: 0.2rem 0.5rem;
font-size: 12px;
}
#undo-banner button:hover { background: var(--hover-bg); }
.sidebar-footer {
border-top: 1px solid var(--border);
padding: 0.5rem 0.75rem 0.65rem;
}
#toggle-trash {
width: 100%;
text-align: left;
padding: 0.4rem 0.5rem;
color: var(--text-secondary);
font-size: 13px;
}
#toggle-trash:hover { background: var(--hover-bg); color: var(--text); }
#backup-panel { margin-top: 0.25rem; }
#backup-panel summary {
cursor: pointer;
display: flex;
align-items: center;
gap: 0.35rem;
padding: 0.4rem 0.5rem;
border-radius: var(--radius-control);
color: var(--text-secondary);
font-size: 13px;
list-style: none;
}
#backup-panel summary::-webkit-details-marker { display: none; }
#backup-panel summary .summary-chevron {
transition: transform var(--motion-control) ease;
}
#backup-panel[open] summary .summary-chevron { transform: rotate(90deg); }
#backup-panel summary:hover { background: var(--hover-bg); color: var(--text); }
#backup-panel .backup-actions {
display: flex;
flex-direction: column;
gap: 0.35rem;
padding: 0.35rem 0.5rem 0.1rem;
}
#backup-panel .backup-actions button {
text-align: left;
font-size: 13px;
padding: 0.35rem 0.5rem;
border: 1px solid var(--border);
background: var(--elevated-bg);
}
/* 13px text with 0.35rem padding lands at 22.3px — just under the 24px
target-size floor. Applies to the Drive buttons too, which share the row. */
.backup-actions button { min-height: 24px; }
#backup-panel .backup-actions button:hover { background: var(--hover-bg); }
#backup-status { font-size: 12px; color: var(--text-secondary); min-height: 1em; padding: 0.25rem 0.5rem; }
#drive-section[hidden] { display: none; }
#drive-section {
margin-top: 0.4rem;
padding-top: 0.5rem;
border-top: 1px solid var(--border);
}
#drive-section .backup-actions { padding: 0 0.5rem; }
.drive-primary {
display: flex;
align-items: center;
justify-content: center;
gap: 0.45rem;
font-weight: 600;
}
.drive-primary svg { flex: none; }
.drive-status { font-size: 12px; color: var(--text-secondary); min-height: 1em; padding: 0.3rem 0.5rem 0; }
#drive-section .backup-actions button[hidden] { display: none; }
/* ---- Editor: the sheet -----------------------------------------------------
The signature surface of Daylight Paper: the writing column is a sheet of
paper on the cream desk. Full-bleed on mobile; edged, raised and centered
from 768px up. The measure never exceeds ~68ch even as the pane widens. */
#editor-panel {
flex: 1;
min-width: 0;
min-height: 0;
display: flex;
flex-direction: column;
background: var(--bg);
}
.editor-sheet {
flex: 1;
min-height: 0;
display: flex;
flex-direction: column;
width: 100%;
background: var(--elevated-bg);
}
.editor-header {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 0.3rem 0.6rem;
width: 100%;
padding: 0.75rem var(--space-1) 0.4rem;
}
.editor-header .note-heading {
font-family: var(--font-writing);
font-size: 20px;
font-weight: 400;
margin: 0;
min-width: 0;
flex: 1;
}
/* The filename control (docs/filename-plan.md §1.2): an always-editable input
that reads as the note heading. The dotted underline is the at-rest
editability cue — it must be visible without hover, because hover does not
exist on touch devices. */
#note-name {
font: inherit;
display: block;
width: 100%;
min-width: 0;
color: var(--text);
background: transparent;
border: none;
border-bottom: 1px dotted var(--border);
border-bottom-color: color-mix(in srgb, var(--text-secondary) 45%, transparent);
border-radius: 0;
padding: 0 0 2px;
text-overflow: ellipsis;
}
#note-name:hover { border-bottom-color: var(--text-secondary); }
#note-name:focus-visible {
outline: 2px solid var(--accent);
outline-offset: 3px;
border-bottom-color: transparent;
}
/* Mobile back control — hidden at >=768px where the list is always visible. */
#editor-back {
display: flex;
align-items: center;
gap: 0.2rem;
flex: none;
margin-left: -0.4rem;
padding: 0.35rem 0.55rem 0.35rem 0.3rem;
font-size: 13px;
color: var(--accent);
}
#editor-back:hover { background: var(--hover-bg); }
.editor-tools {
display: flex;
align-items: center;
/* 0.2rem, not 0.25: at 360px the row measured exactly as wide as the space
available, so it wrapped on a rounding hair and cost 30px of header height
on the commonest Android width. Trimming ~5px keeps 360px on one row while
the wrap below still catches 320px. */
gap: 0.2rem;
/* Mobile: the tools take their own full row under back + title; a single
row of nine controls would overflow a 375px sheet. Reset at >=768px. */
flex: 1 0 100%;
/* One row of tools still overflows at 320px — the WCAG 1.4.10 reflow width,
measured at 328px of content in a 320px viewport. Wrapping costs a second
row only on the narrowest screens; horizontal scroll would cost it on
every interaction. */
flex-wrap: wrap;
}
.editor-tools button {
font-size: 13px;
line-height: 1;
padding: 0.35rem 0.5rem;
color: var(--text-secondary);
border: 1px solid transparent;
}
.editor-tools button:hover { background: var(--hover-bg); color: var(--text); }
.editor-tools button[aria-pressed="true"] { color: var(--accent); }
.editor-tools #toggle-history { border: 1px solid var(--border); margin-left: 0.35rem; }
.editor-tools #toggle-history[aria-pressed="true"] {
color: var(--accent);
border-color: currentColor;
}
textarea#editor {
flex: 1;
min-height: 0;
width: 100%;
font-family: var(--font-writing);
font-size: 18px;
/* Reading rhythm, not form-field rhythm (redesign-plan §3). */
line-height: 1.7;
background: transparent;
color: var(--text);
/* The sheet is the box; the amber caret is the focus. */
border: none;
resize: none;
caret-color: var(--accent);
padding: 0.4rem var(--space-1) var(--space-2);
}
textarea#editor:focus-visible { outline: none; }
textarea#editor::selection { background: var(--selection); }
/* Monospace writing mode. Only the writing surface swaps face — the filename
heading and the rest of the chrome stay serif, so the app still reads as
itself while a diagram keeps its columns. Source Serif 4's subsets carry no
box-drawing glyphs (U+2500–257F), so those characters were already falling
back to a system face at a different advance width; that mismatch is the
misalignment this mode removes. The font-size here is deliberately below
the serif's 18px: monospace faces set optically larger at equal px.
editor.js sets the attribute and drives zoom off the same two values. */
:root[data-editor-font="mono"] textarea#editor {
font-family: var(--font-code);
font-size: 16px;
line-height: 1.6;
}
#find-bar[hidden] { display: none; }
#find-bar {
display: flex;
align-items: center;
/* 8px, not 5.6px: the minimum spacing between adjacent pointer targets. */
gap: 0.5rem;
flex-wrap: wrap;
width: 100%;
padding: 0.35rem var(--space-1) 0.5rem;
font-size: 13px;
}
#find-bar input[type="text"] {
font: inherit;
color: var(--text);
background: var(--bg);
border: 1px solid var(--border);
border-radius: var(--radius-control);
padding: 0.3rem 0.5rem;
min-width: 0;
}
#find-input { flex: 2 1 8rem; }
#replace-input { flex: 2 1 8rem; }
#find-count { color: var(--text-secondary); min-width: 2.5rem; text-align: center; font-variant-numeric: tabular-nums; }
#find-bar button {
padding: 0.3rem 0.5rem;
border: 1px solid var(--border);
background: var(--bg);
color: var(--text-secondary);
}
#find-bar button:hover { background: var(--hover-bg); color: var(--text); }
.find-flag {
display: flex;
align-items: center;
gap: 0.2rem;
color: var(--text-secondary);
font-size: 12px;
cursor: pointer;
user-select: none;
/* The label is the real hit area — the 13px checkbox inside it is not.
Measured at 19px tall, under the 24px WCAG 2.2 target-size minimum, and
the find bar's gaps were too tight for the spacing exception to apply. */
min-height: 24px;
padding-inline: 0.15rem;
}
.find-flag input { accent-color: var(--accent-surface); }
/* The confirmation HUD (150ms in, 2s out, pointer-events none — it can
confirm but never interrupt). */
#hud {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%) scale(0.95);
background: rgba(28, 25, 23, 0.55);
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
border-radius: 22px;
padding: 26px 38px 22px;
min-width: 150px;
text-align: center;
opacity: 0;
pointer-events: none;
z-index: 100;
transition: opacity 0.15s ease-out, transform 0.15s ease-out;
}
#hud.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
#hud.out { opacity: 0; transform: translate(-50%, -50%) scale(0.95); transition: opacity 2s, transform 2s; }
#hud .hud-mark {
width: 84px;
height: 84px;
margin: 0 auto 10px;
border-radius: 50%;
background: rgba(255, 255, 255, 0.14);
color: #fff;
display: flex;
align-items: center;
justify-content: center;
}
#hud .hud-label { color: #fff; font-size: 18px; font-weight: 700; }
/* Empty state — an invitation to act, not a blank void. */
.editor-empty {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 0.4rem;
text-align: center;
padding: var(--space-3);
}
.editor-empty svg { margin-bottom: 0.75rem; opacity: 0.9; }
.editor-empty h2 {
font-family: var(--font-writing);
font-size: 26px;
font-weight: 400;
margin: 0;
}
.editor-empty p { margin: 0; color: var(--text-secondary); max-width: 34ch; }
.editor-empty button {
margin-top: var(--space-1);
padding: 0.5rem 1.1rem;
font-weight: 600;
color: var(--on-accent);
background: var(--accent-surface);
}
.editor-empty button:hover { filter: brightness(1.06); }
/* ---- History panel ---------------------------------------------------------
Mobile: a full-height sheet over the editor, with its own close control
(the toggle underneath may be covered — redesign-plan §4). */
#history-panel {
position: fixed;
left: 0;
right: 0;
bottom: 0;
top: max(3rem, 8dvh);
overflow-y: auto;
background: var(--panel-bg);
border-top: 1px solid var(--border);
border-radius: var(--radius-dialog) var(--radius-dialog) 0 0;
box-shadow: 0 -8px 32px rgba(28, 25, 23, 0.18);
padding: 0.75rem var(--space-1);
z-index: 10;
transition: opacity var(--motion-panel) ease;
}
#history-panel[hidden] { display: none; }
.history-head {
display: flex;
align-items: center;
justify-content: space-between;
gap: 0.5rem;
margin: 0.1rem 0 0.6rem;
}
.history-head h2 {
font-size: 14px;
font-weight: 600;
margin: 0;
}
#history-close {
padding: 0.35rem 0.45rem;
line-height: 0;
color: var(--text-secondary);
}
#history-close:hover { background: var(--hover-bg); color: var(--text); }
#version-list { list-style: none; margin: 0; padding: 0; }
#version-list li { margin-bottom: 2px; }
#version-list > li > button {
width: 100%;
text-align: left;
padding: 0.4rem 0.55rem;
font-size: 13px;
color: var(--text-secondary);
}
#version-list > li > button:hover { background: var(--hover-bg); color: var(--text); }
#version-list .version-empty { color: var(--text-secondary); font-size: 13px; padding: 0.4rem 0.55rem; }
#version-list .version-when { display: block; font-variant-numeric: tabular-nums; }
#version-list .version-snippet {
display: block;
margin-top: 1px;
font-family: var(--font-writing);
font-size: 12.5px;
color: var(--text);
opacity: 0.8;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
#version-preview { margin-top: 0.75rem; }
#version-preview pre {
font-family: var(--font-writing);
font-size: 13px;
line-height: 1.6;
background: var(--elevated-bg);
border: 1px solid var(--border);
border-radius: var(--radius-control);
padding: 0.6rem 0.7rem;
max-height: 40vh;
overflow: auto;
white-space: pre-wrap;
word-break: break-word;
}
#version-preview .restore-version {
margin-top: 0.5rem;
width: 100%;
padding: 0.5rem 0.6rem;
font-size: 13px;
font-weight: 600;
color: var(--on-accent);
background: var(--accent-surface);
}
#version-preview .restore-version:hover { filter: brightness(1.06); }
#version-preview .restore-version:disabled { opacity: 0.6; filter: none; cursor: default; }
#version-preview .restore-caption {
margin: 0.4rem 0 0;
font-size: 12px;
color: var(--text-secondary);
}
#history-notice { margin-top: 0.6rem; font-size: 13px; color: var(--danger); }
/* ---- Status bar -------------------------------------------------------------
Two separate facts, always: what Heldnote stored, and what the browser
promises about keeping it. They never merge and never share a color
(redesign-plan §5). None of the functional colors is the brand accent. */
#status-bar {
flex: none;
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 0.4rem 1.25rem;
padding: 0.35rem var(--space-1);
font-size: 12.5px;
font-weight: 500;
color: var(--text-secondary);
border-top: 1px solid var(--border);
background: var(--panel-bg);
}
#status-counts { margin-left: auto; font-variant-numeric: tabular-nums; }
#status-revision.state-saved { color: var(--ok); }
#status-revision.state-failed { color: var(--danger); }
#status-retention.state-warning { color: var(--warn); }
#status-retention.state-info { color: var(--info); }
#status-notice.state-warning { color: var(--warn); }
#status-notice[hidden] { display: none; }
/* The held indicator: a small dot that settles when a revision is stored.
Calm, not celebratory. */
#status-revision.state-saved::before {
content: "●";
margin-right: 0.35rem;
font-size: 9px;
vertical-align: 1px;
animation: settle var(--motion-panel) ease;
}
@keyframes settle {
from { opacity: 0.2; }
to { opacity: 1; }
}
/* ---- >= 768px: list + editor side by side --------------------------------- */
@media (min-width: 768px) {
#app {
display: grid;
grid-template-columns: 264px minmax(0, 1fr);
grid-template-rows: auto 1fr auto;
}
#app-notices { grid-column: 1 / -1; grid-row: 1; }
/* Both panes are always visible; the mobile view switch is inert. */
#app:not([data-view="editor"]) #editor-panel { display: flex; }
#app[data-view="editor"] #notes-panel { display: flex; }
#notes-panel {
grid-column: 1;
grid-row: 2;