-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyles.css
More file actions
3120 lines (2958 loc) · 88.4 KB
/
Copy pathstyles.css
File metadata and controls
3120 lines (2958 loc) · 88.4 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
/* A+ Study — iPad + iPhone stylesheet */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
/* ─── Accessibility primitives ─── */
/* Skip link: visually hidden until a keyboard user focuses it. */
.skip-link {
position: fixed;
top: 0;
left: 50%;
transform: translate(-50%, -200%);
z-index: 2000;
background: var(--accent, #5aa6ff);
color: #fff;
padding: 10px 16px;
border-radius: 0 0 10px 10px;
font-size: 14px;
font-weight: 600;
text-decoration: none;
transition: transform 0.15s;
}
.skip-link:focus {
transform: translate(-50%, 0);
outline: 2px solid #fff;
outline-offset: 2px;
}
/* Single consistent focus ring for keyboard users across all interactive
elements. Uses :focus-visible so mouse clicks don't leave a ring. */
:where(button, a, input, textarea, select, [role="tab"], [role="radio"], [tabindex]):focus-visible {
outline: 2px solid var(--accent, #5aa6ff);
outline-offset: 2px;
border-radius: 4px;
}
:root {
/* Canonical smartiasis.com palette (shared across the app family).
Semantic --good/--warn/--bad below stay as-is — they're AA-tuned. */
--bg: #0e1117;
--surface: #161b27;
--surface-2: #1e2433;
--border: #2c3040;
--text: #e8e5df;
/* Lifted from #9e9b95 for dark-mode readability (secondary/muted text).
#9e9b95 passed AA only marginally on --surface-2 (5.59:1); #b4b0a8
reads 7.2–8.7:1 across bg/surface/surface-2 and stays clearly dimmer
than --text so the hierarchy holds. Dark-only: the light-mode media
query below overrides --text-dim to #5c5850. */
--text-dim: #b4b0a8;
--accent: #74a8cf;
/* Text/iconography that sits ON an --accent fill (#fff light, navy
#0e1117 dark). Theme-aware so it clears
WCAG-AA on both accents: navy on the light-blue dark accent (7.6:1),
white on the darkened light accent (6.5:1). A single static color
can't pass on both. */
--on-accent: #0e1117;
--good: #4ade80;
--warn: #fbbf24;
--bad: #f87171;
--safe-top: env(safe-area-inset-top, 0px);
--safe-bottom: env(safe-area-inset-bottom, 0px);
--safe-left: env(safe-area-inset-left, 0px);
--safe-right: env(safe-area-inset-right, 0px);
}
@media (prefers-color-scheme: light) {
:root {
--bg: #f8f6f2;
--surface: #ffffff;
--surface-2: #f0ede8;
--border: #ddd9d2;
--text: #1c1c1c;
--text-dim: #5c5850;
/* WCAG-AA accent colors for use as text-on-white and as button
backgrounds. The dark-mode versions (--accent #74a8cf, --good
#4ade80, --warn #fbbf24, --bad #f87171) all read at 1.7-2.8:1
against white and fail AA when used as text on the light surface.
Darken them for light mode; all four pass 5:1+ as text on white,
and 5:1+ for white-on-button. */
--accent: #2e6388;
--on-accent: #ffffff;
--good: #15803d;
--warn: #92400e;
--bad: #b91c1c;
}
}
/* ─── Accessibility / preference overrides ─── */
/* Text size scales the whole app via the `zoom` CSS property — every
font-size in this stylesheet is in px (no rem/em), so the simpler
`font-size: 15px` on html doesn't propagate. zoom proportionally
scales font, padding, margin, dimensions — supported by all current
evergreen browsers (Chromium, Safari, Firefox 126+). */
html[data-size="small"] body { zoom: 0.9; }
html[data-size="medium"] body { zoom: 1; }
html[data-size="large"] body { zoom: 1.15; }
html[data-size="xlarge"] body { zoom: 1.35; }
/* Dyslexia-friendly font setting. These names are NOT bundled — they
render only if the user has Atkinson Hyperlegible / OpenDyslexic
installed at the OS level (iOS exposes both via Settings → General →
Fonts; macOS Font Book; Android via Font Substitution). The CSS-only
approach avoids repo bloat (~80kB per weight) + a CSP/CDN dependency,
trading off "works for anyone who turned it on" instead of "works
universally". If we ever want universal availability, add @font-face
pointing at self-hosted woff2 files in fonts/ and extend the CSP
font-src to include 'self'. Form controls don't inherit font-family
by default — force them to so the chosen font applies everywhere. */
html[data-font="atkinson"] body { font-family: 'Atkinson Hyperlegible', -apple-system, system-ui, sans-serif; }
html[data-font="opendyslexic"] body { font-family: 'OpenDyslexic', -apple-system, system-ui, sans-serif; letter-spacing: 0.02em; }
html[data-font="atkinson"] button,
html[data-font="atkinson"] input,
html[data-font="atkinson"] textarea,
html[data-font="atkinson"] select,
html[data-font="opendyslexic"] button,
html[data-font="opendyslexic"] input,
html[data-font="opendyslexic"] textarea,
html[data-font="opendyslexic"] select { font-family: inherit; letter-spacing: inherit; }
/* Reduced motion respects OS setting by default; explicit override forces it off too */
html[data-motion="reduced"] *,
html[data-motion="reduced"] *::before,
html[data-motion="reduced"] *::after {
animation-duration: 0.001ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.001ms !important;
scroll-behavior: auto !important;
}
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after {
animation-duration: 0.001ms !important;
transition-duration: 0.001ms !important;
}
}
/* Anxiety Mode: hide numeric progress feedback, keep streak + timer */
html[data-anxiety="on"] .numeric-ui,
html[data-anxiety="on"] .card-meta .tag.numeric {
display: none !important;
}
/* Focus mode: hides chrome so only the card is visible */
html[data-focus] #tabbar,
html[data-focus] .filter-bar,
html[data-focus] .search-row,
html[data-focus] .filter-collapse,
html[data-focus] .card-meta,
html[data-focus] #progress-hud { display: none !important; }
html[data-focus] header { border-bottom: none; }
html[data-focus] #main { padding-top: 12px; }
/* Segmented control for S/M/L/XL + font picker */
.seg-control {
display: inline-flex;
background: var(--surface-2);
border: 1px solid var(--border);
border-radius: 8px;
overflow: hidden;
}
.seg-control button {
background: none;
border: none;
color: var(--text-dim);
padding: 6px 10px;
font-size: 12px;
cursor: pointer;
font-family: inherit;
font-weight: 500;
border-right: 1px solid var(--border);
}
.seg-control button:last-child { border-right: none; }
.seg-control button.active {
background: var(--accent);
color: var(--on-accent);
}
/* Fonts (Atkinson Hyperlegible, OpenDyslexic) are loaded dynamically by JS
only when the user selects them — keeps the default path network-free. */
/* Manual theme overrides (higher specificity than :root + @media) */
html[data-theme="dark"] {
--bg: #0e1117;
--surface: #161b27;
--surface-2: #1e2433;
--border: #2c3040;
--text: #e8e5df;
--text-dim: #b4b0a8;
}
html[data-theme="light"] {
--bg: #f8f6f2;
--surface: #ffffff;
--surface-2: #f0ede8;
--border: #ddd9d2;
--text: #1c1c1c;
--text-dim: #5c5850;
}
/* High contrast — declared AFTER theme overrides so it wins source-order when
both attributes are set. Forces near-pure-black + brighter text for both
auto and dark themes; mirrors for predictability. */
html[data-contrast="high"] {
--bg: #000;
--surface: #111;
--surface-2: #1c1c1c;
--border: #777;
--text: #ffffff;
--text-dim: #dddddd;
}
/* OS-level contrast preferences:
- prefers-contrast: more → user wants thicker borders + bolder text
(set in macOS Display → Increase contrast, Windows Make text bigger,
iOS Increase Contrast).
- forced-colors: active → Windows High Contrast mode / Edge forced
colors. The OS overrides our colors entirely with a system palette;
we still need to keep borders + outlines visible (else card edges
disappear into the background). */
@media (prefers-contrast: more) {
:root {
--border: #666;
--text-dim: #c0c0c0;
}
:root.light, @media (prefers-color-scheme: light) {
:root { --border: #555; --text-dim: #404040; }
}
button, .card, .option, .rate-btn { border-width: 2px !important; }
}
@media (forced-colors: active) {
/* Make sure cards, options, dialogs, and buttons retain visible edges
when the OS forces a high-contrast palette. forced-color-adjust:auto
is the default; we explicitly keep borders + outlines on interactive
surfaces so they don't render edgeless against the system bg. */
.card, .option, .obj-section, .rate-btn, .action,
#welcome-overlay, #help-overlay, #feedback-overlay, #sync-overlay,
#pin-overlay, #lock-overlay, #img-zoom-overlay, #pdf-viewer-overlay,
.toast {
border: 1px solid CanvasText !important;
}
/* The active/selected option needs a thicker outline since the OS
palette doesn't honor our --accent. */
.q-option.selected, .q-option[aria-selected="true"] {
outline: 3px solid Highlight !important;
outline-offset: 1px;
}
/* Disabled controls: half-tone via system disabled color so users
can distinguish them from active ones. */
button[disabled], .action[disabled] { color: GrayText !important; }
}
html, body {
height: 100%;
background: var(--bg);
color: var(--text);
font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
font-size: 17px;
line-height: 1.5;
overscroll-behavior: none;
-webkit-font-smoothing: antialiased;
}
#app {
display: flex;
flex-direction: column;
height: 100vh;
height: 100dvh;
padding-top: var(--safe-top);
padding-left: var(--safe-left);
padding-right: var(--safe-right);
}
header {
padding: 16px 24px;
background: var(--surface);
border-bottom: 1px solid var(--border);
display: flex;
justify-content: space-between;
align-items: center;
flex-shrink: 0;
}
header h1 {
font-size: 20px;
font-weight: 600;
}
.header-right {
display: flex;
align-items: center;
gap: 12px;
}
#progress-hud {
color: var(--text-dim);
font-size: 14px;
font-variant-numeric: tabular-nums;
}
#progress-hud.hud-soon { color: var(--warn); }
#progress-hud.hud-urgent { color: var(--bad); font-weight: 600; }
#progress-hud.hud-past { color: var(--text-dim); font-style: italic; }
/* Exam-date inputs (native date picker styled to match settings rows) */
.exam-date-input {
background: var(--surface-2);
border: 1px solid var(--border);
color: var(--text);
padding: 6px 10px;
border-radius: 8px;
font-size: 13px;
font-family: inherit;
-webkit-appearance: none;
appearance: none;
min-width: 140px;
}
.exam-date-input:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.settings-meta.hud-soon { color: var(--warn); font-weight: 500; }
.settings-meta.hud-urgent { color: var(--bad); font-weight: 600; }
.settings-meta.hud-past { color: var(--text-dim); font-style: italic; }
#theme-btn, #focus-btn, #help-btn, #listen-btn, #sync-btn {
background: var(--surface-2);
border: 1px solid var(--border);
width: 36px;
height: 36px;
border-radius: 50%;
cursor: pointer;
font-size: 16px;
display: flex;
align-items: center;
justify-content: center;
line-height: 1;
padding: 0;
color: var(--text);
transition: transform 0.1s, background 0.1s;
}
#theme-btn:active, #focus-btn:active, #help-btn:active, #listen-btn:active, #sync-btn:active { transform: scale(0.92); }
#theme-btn:hover, #focus-btn:hover, #help-btn:hover, #listen-btn:hover, #sync-btn:hover { background: var(--border); }
/* Sync button carries a small "backup is on" dot once cloud sync is
configured, so a user can see at a glance their progress is backed up. */
#sync-btn { position: relative; }
#sync-btn.is-configured::after {
content: '';
position: absolute;
top: 3px;
right: 3px;
width: 8px;
height: 8px;
border-radius: 50%;
background: var(--good);
border: 1.5px solid var(--surface-2);
}
#listen-btn[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
#focus-btn[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
/* ─── Stats → collapsible "Settings & tools" section ─── */
/* Keeps the Stats tab focused on actual stats; settings live one tap away. */
.settings-collapse { margin-top: 8px; }
.settings-summary {
cursor: pointer;
user-select: none;
list-style: none;
padding: 14px 16px;
background: var(--surface-2);
border: 1px solid var(--border);
border-radius: 10px;
font-weight: 600;
font-size: 15px;
color: var(--text);
display: flex;
align-items: center;
}
.settings-summary::-webkit-details-marker { display: none; }
.settings-summary::after {
content: '▸';
margin-left: auto;
color: var(--text-dim);
transition: transform 0.15s;
}
.settings-collapse[open] > .settings-summary { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.settings-collapse[open] > .settings-summary::after { transform: rotate(90deg); }
/* ─── First-run icon legend (coachmark popover) ─── */
#icon-legend {
position: fixed;
top: 54px;
right: 8px;
z-index: 1100;
width: min(280px, calc(100vw - 16px));
background: var(--surface-2);
border: 1px solid var(--border);
border-radius: 12px;
padding: 14px 16px;
box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
font-size: 13px;
color: var(--text);
}
.legend-arrow {
position: absolute;
top: -8px;
right: 20px;
width: 14px;
height: 14px;
background: var(--surface-2);
border-left: 1px solid var(--border);
border-top: 1px solid var(--border);
transform: rotate(45deg);
}
.legend-title { font-weight: 700; margin: 0 0 8px; }
.legend-list { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.legend-list li { display: flex; align-items: center; gap: 9px; line-height: 1.3; }
.legend-ic { width: 22px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; }
.legend-note { color: var(--text-dim); font-size: 12px; margin: 0 0 10px; }
.legend-dismiss { width: 100%; }
/* ─── Welcome / landing overlay ─── */
#welcome-overlay {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.6);
backdrop-filter: blur(4px);
-webkit-backdrop-filter: blur(4px);
z-index: 1000;
display: flex;
align-items: center;
justify-content: center;
padding: 20px;
overflow-y: auto;
}
.welcome-card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 18px;
max-width: 560px;
width: 100%;
padding: 32px 28px 28px;
position: relative;
color: var(--text);
max-height: calc(100vh - 40px);
overflow-y: auto;
}
.welcome-card h2 {
font-size: 24px;
font-weight: 700;
letter-spacing: -0.01em;
margin-bottom: 6px;
padding-right: 36px; /* clear the absolute close button */
}
.welcome-card .welcome-sub {
color: var(--text-dim);
margin-bottom: 24px;
font-size: 15px;
line-height: 1.5;
}
.welcome-card .welcome-intro {
color: var(--text-dim);
font-size: 14px;
line-height: 1.5;
margin-bottom: 16px;
}
.welcome-card .welcome-countdown {
display: block;
color: var(--text-dim);
font-size: 14px;
margin-bottom: 20px;
padding: 8px 14px;
border-radius: 10px;
background: var(--surface-2);
border: 1px solid var(--border);
font-variant-numeric: tabular-nums;
}
button.welcome-countdown-cta {
width: 100%;
text-align: left;
font-family: inherit;
cursor: pointer;
color: var(--accent);
font-weight: 500;
}
button.welcome-countdown-cta:hover { background: var(--surface); border-color: var(--accent); }
.welcome-card .welcome-countdown.hud-soon { color: var(--warn); border-color: var(--warn); background: rgba(251, 191, 36, 0.08); }
.welcome-card .welcome-countdown.hud-urgent { color: var(--bad); border-color: var(--bad); background: rgba(248, 113, 113, 0.12); font-weight: 600; }
.welcome-card .welcome-countdown.hud-past { font-style: italic; }
.welcome-more { gap: 8px !important; }
.welcome-more .welcome-btn {
padding: 8px 12px;
font-size: 13px;
flex-direction: row;
gap: 6px;
}
.welcome-card h3 {
font-size: 13px;
text-transform: uppercase;
letter-spacing: 0.5px;
color: var(--text-dim);
font-weight: 600;
margin: 12px 0 10px;
}
.welcome-close {
position: absolute;
top: 12px;
right: 12px;
/* WCAG 2.5.5 (AAA): 44×44 minimum touch target. Was 32×32. The visual
glyph stays roughly 16px via font-size so the bigger hit area
doesn't dominate the dialog header visually. */
width: 44px;
height: 44px;
border-radius: 50%;
border: none;
background: var(--surface-2);
color: var(--text-dim);
cursor: pointer;
font-size: 16px;
display: flex;
align-items: center;
justify-content: center;
}
.welcome-close:hover { background: var(--border); color: var(--text); }
.welcome-actions {
display: flex;
flex-direction: column;
gap: 10px;
margin-bottom: 20px;
}
.welcome-btn {
background: var(--surface-2);
border: 1px solid var(--border);
color: var(--text);
padding: 14px 16px;
border-radius: 12px;
font-family: inherit;
font-size: 15px;
cursor: pointer;
text-align: left;
display: flex;
flex-direction: column;
gap: 3px;
transition: background 0.1s, border-color 0.1s, transform 0.08s;
}
.welcome-btn:hover { background: var(--surface); border-color: var(--accent); }
.welcome-btn:active { transform: scale(0.99); }
.welcome-btn.primary {
background: var(--accent);
color: var(--on-accent);
border-color: var(--accent);
}
.welcome-btn.primary:hover { background: var(--accent); filter: brightness(1.1); }
.wbtn-title { font-weight: 600; font-size: 15px; }
.wbtn-sub { font-size: 12px; opacity: 0.75; }
.welcome-help {
margin: 16px 0;
padding: 12px 14px;
background: var(--surface-2);
border-radius: 10px;
}
.welcome-help summary {
cursor: pointer;
font-size: 14px;
font-weight: 500;
user-select: none;
}
.welcome-help[open] summary { margin-bottom: 8px; }
.welcome-help ul { list-style: none; padding: 0; }
.welcome-help li {
font-size: 13px;
line-height: 1.6;
margin-bottom: 6px;
color: var(--text-dim);
}
.welcome-help strong { color: var(--text); }
.welcome-help kbd {
background: var(--border);
color: var(--text);
padding: 1px 6px;
border-radius: 4px;
font-family: ui-monospace, SFMono-Regular, monospace;
font-size: 11px;
border: 1px solid var(--surface);
}
.welcome-dismiss {
display: flex;
align-items: center;
gap: 8px;
margin-top: 16px;
font-size: 13px;
color: var(--text-dim);
cursor: pointer;
}
/* Small screens: welcome takes full width */
@media (max-width: 600px) {
#welcome-overlay { padding: 12px; }
.welcome-card { padding: 24px 20px 20px; }
.welcome-card h2 { font-size: 20px; }
.welcome-btn { padding: 12px 14px; }
}
#main {
flex: 1;
overflow-y: auto;
overflow-x: hidden;
-webkit-overflow-scrolling: touch;
padding: 24px;
}
/* Navigation bar */
#tabbar {
display: flex;
background: var(--surface);
border-top: 1px solid var(--border);
padding-bottom: var(--safe-bottom);
flex-shrink: 0;
}
.tab {
flex: 1;
background: none;
border: none;
color: var(--text-dim);
font-size: 13px;
padding: 10px 8px;
cursor: pointer;
display: flex;
flex-direction: column;
align-items: center;
gap: 4px;
transition: color 0.15s;
min-height: 60px;
}
.tab { position: relative; }
.tab:active { opacity: 0.6; }
.tab.active { color: var(--accent); }
.tab-icon { font-size: 22px; }
.tab-label { font-size: 11px; font-weight: 500; }
/* "N due" pill on the Study tab so spaced-repetition review is visible
without opening filters. Hidden when nothing is due / in Anxiety Mode. */
.tab-badge {
position: absolute;
top: 4px;
left: 50%;
transform: translateX(6px);
min-width: 17px;
height: 17px;
padding: 0 4px;
border-radius: 9px;
background: var(--accent);
color: var(--on-accent);
font-size: 10px;
font-weight: 700;
line-height: 17px;
text-align: center;
font-variant-numeric: tabular-nums;
}
/* Card (used by Study + Quiz modes) */
.card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 18px;
padding: 28px;
max-width: 760px;
margin: 0 auto 20px;
position: relative;
}
/* Subtle fade-and-lift when a new card loads. Only applied when the question
actually changes — reveal-toggle rerenders keep the existing card in place. */
.card.card-fresh {
animation: cardEnter 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes cardEnter {
0% { opacity: 0; transform: translateY(12px); }
100% { opacity: 1; transform: translateY(0); }
}
html[data-motion="reduced"] .card.card-fresh { animation: none; }
@media (prefers-reduced-motion: reduce) {
.card.card-fresh { animation: none; }
}
.card-meta {
display: flex;
gap: 12px;
color: var(--text-dim);
font-size: 13px;
margin-bottom: 16px;
font-weight: 500;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.card-meta .tag {
background: var(--surface-2);
padding: 3px 10px;
border-radius: 12px;
}
.card-meta .tag.pbq { background: var(--warn); color: #000; }
.card-meta .tag.obj { color: var(--accent); }
.card-meta .tag.edited { background: var(--good); color: #000; }
/* Internal question source IDs (P6 Q6, c2-os-003, yt001, etc.) are useful
for the maintainer's debugging but noise for a beginner. Hidden by
default. The Edit button still surfaces the question identity. */
.card-meta .tag.tag-source-id { display: none; }
.card-meta .tag.repeats {
background: var(--bad);
/* Was #fff on --bad = 2.77:1 (failed AA — the tag text "blocked out").
#000 on --bad reads 7.6:1 and matches the .tag.pbq/.tag.edited pattern. */
color: #000;
font-weight: 700;
}
/* Pretest-miss footnote — appears inside the green explanation block on reveal
as a small labeled note about what you originally picked on the pretest(s).
Deliberately quiet: separator line above, muted text, so it doesn't compete
with the primary answer/explanation content. */
.pretest-miss {
margin-top: 16px;
padding-top: 12px;
border-top: 1px dashed var(--border);
font-size: 12px;
color: var(--text-dim);
line-height: 1.55;
display: flex;
flex-wrap: wrap;
align-items: baseline;
gap: 6px;
}
.pretest-miss-label {
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.4px;
font-size: 11px;
color: var(--text-dim);
}
.pretest-miss-item {
background: var(--surface-2);
border: 1px solid var(--border);
color: var(--text);
padding: 2px 8px;
border-radius: 10px;
font-size: 12px;
font-weight: 500;
}
.card-meta .tag-btn {
border: 1px dashed var(--border);
background: transparent;
color: var(--text-dim);
cursor: pointer;
font: inherit;
font-size: 13px;
font-weight: 500;
text-transform: uppercase;
letter-spacing: 0.5px;
margin-left: auto;
}
.card-meta .tag-btn:hover { color: var(--accent); border-color: var(--accent); }
.card-question {
font-size: 19px;
line-height: 1.55;
margin-bottom: 20px;
}
.card-question .q-para {
margin: 0 0 12px;
}
.card-question .q-para:last-child {
margin-bottom: 0;
}
.card-section {
margin-top: 20px;
padding-top: 20px;
border-top: 1px solid var(--border);
}
.card-section .label {
font-size: 12px;
text-transform: uppercase;
letter-spacing: 0.5px;
color: var(--text-dim);
font-weight: 600;
margin-bottom: 8px;
}
.card-section.right .label { color: var(--good); }
.card-section p {
line-height: 1.6;
}
/* Explanation lead paragraph: states the answer, made scannable */
.card-section .expl-lead {
font-size: 17px;
font-weight: 500;
line-height: 1.55;
color: var(--text);
}
.card-section .expl-para {
font-size: 15px;
color: var(--text-dim);
margin-top: 10px;
}
.card-section .expl-para strong {
color: var(--text);
background: none;
padding: 0;
}
.card-section .expl-tip {
background: rgba(90, 166, 255, 0.08);
border-left: 3px solid var(--accent);
padding: 10px 14px;
border-radius: 0 10px 10px 0;
margin-top: 16px;
font-size: 14px;
line-height: 1.55;
}
.card-section .expl-tip strong {
display: block;
color: var(--accent);
font-size: 12px;
text-transform: uppercase;
letter-spacing: 0.5px;
margin-bottom: 4px;
background: none;
padding: 0;
}
.card-section .expl-tip p {
color: var(--text);
font-size: 14px;
line-height: 1.55;
}
.card-section strong {
background: rgba(90, 166, 255, 0.15);
padding: 1px 4px;
border-radius: 3px;
}
/* Buttons */
.btn-row {
display: flex;
gap: 12px;
margin-top: 24px;
flex-wrap: wrap;
}
/* Pre-reveal nav row: keep Prev/Skip as compact arrow buttons so all three
fit on one line on a 414px viewport. The full-width Skip wrap was making
it easy to mis-tap during a Reveal press because finger drift moved the
touchend down onto the wrapped Skip button. */
.btn-row-nav { flex-wrap: nowrap; }
.btn-row-nav button.action.nav-btn {
flex: 0 0 56px;
min-width: 56px;
width: 56px;
padding: 0;
font-size: 22px;
font-weight: 600;
}
.btn-row-nav button.action.primary { flex: 1; min-width: 0; }
button.action {
flex: 1;
min-height: 52px;
min-width: 140px;
background: var(--surface-2);
border: 1px solid var(--border);
color: var(--text);
border-radius: 12px;
font-size: 16px;
font-weight: 500;
cursor: pointer;
transition: transform 0.1s, background 0.1s;
padding: 0 16px;
}
button.action:active { transform: scale(0.97); }
/* On-fill text for WCAG-AA contrast across both themes. The accent fill
uses the theme-aware --on-accent token (black on the light-blue dark
accent, white on the darkened light accent) so it clears AA at any
text size in both modes — a single static color cannot. --good/--warn
keep #000: their fills are light enough in both themes for large
button text (≥3:1). Previous #fff on --accent was 2.52:1. */
button.action.primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
button.action.good { background: var(--good); color: #000; border-color: var(--good); }
button.action.warn { background: var(--warn); color: #000; border-color: var(--warn); }
button.action.bad { background: var(--bad); color: #000; border-color: var(--bad); }
/* One-time SRS explainer above the rating row on the first reveal */
.rate-hint {
position: relative;
margin: 18px 0 8px;
padding: 12px 36px 12px 14px;
background: rgba(90, 166, 255, 0.08);
border: 1px solid var(--accent);
border-radius: 10px;
font-size: 13px;
line-height: 1.5;
color: var(--text);
}
.rate-hint strong { color: var(--accent); }
.rate-hint em { font-style: normal; font-weight: 600; }
.rate-hint-dismiss {
position: absolute;
top: 6px; right: 6px;
background: transparent;
border: none;
color: var(--text-dim);
font-size: 12px;
font-family: inherit;
padding: 4px 8px;
cursor: pointer;
border-radius: 6px;
}
.rate-hint-dismiss:hover { background: var(--surface-2); color: var(--text); }
/* SM-2 rating row (Again / Hard / Good / Easy) shown after reveal in Study. */
.rate-header {
margin-top: 24px;
margin-bottom: 10px;
text-align: center;
position: relative;
}
.rate-back-btn {
position: absolute;
left: 0;
top: -2px;
background: transparent;
border: 1px solid var(--border);
border-radius: 8px;
color: var(--text-dim);
font-size: 12px;
font-weight: 500;
padding: 6px 10px;
cursor: pointer;
transition: background 0.1s, color 0.1s, border-color 0.1s;
}
.rate-back-btn:hover { background: var(--surface-2); color: var(--text); border-color: var(--text-dim); }
.rate-back-btn:active { transform: scale(0.96); }
.rate-title {
font-size: 13px;
font-weight: 600;
color: var(--text);
letter-spacing: 0.2px;
}
.rate-sub {
margin-top: 3px;
font-size: 12px;
color: var(--text-dim);
}
.rate-sub em {
font-style: normal;
font-weight: 600;
color: var(--text);
text-transform: capitalize;
}
.btn-row.rate-row {
margin-top: 0;
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 8px;
}
/* Disarmed for 500ms after reveal so a ghost-click from the original tap
on Reveal/Skip can't land on a rate button. JS removes this class on a
timer; see attachStudyEvents in app.js. */
.btn-row.rate-row.rate-row-arming,
.rate-header.rate-row-arming {
pointer-events: none;
}
.btn-row.rate-row.rate-row-arming { opacity: 0.85; }
/* Catch-all post-Reveal lock. For 500ms after Reveal fires, ALL clicks on
the card itself are dropped — a ghost-click, double-tap, accidental
swipe-end-on-button, or any other touch artifact simply cannot navigate
the card. The class is set in renderStudy and removed via setTimeout. */
.card.card-just-revealed { pointer-events: none; }
button.action.rate-btn {
flex: unset;
min-width: 0;
min-height: 64px;
padding: 8px 6px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 2px;
opacity: 0.72;
position: relative;
}
button.action.rate-btn .rate-label {
font-size: 15px;
font-weight: 600;
line-height: 1.1;
}
button.action.rate-btn .rate-interval {
font-size: 11px;
font-weight: 500;