Repository navigation
Expand file tree
/
Copy pathstyle.css
More file actions
5914 lines (5061 loc) · 124 KB
/
Copy pathstyle.css
File metadata and controls
5914 lines (5061 loc) · 124 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
/*
* SPDX-FileCopyrightText: 2026 Anton Wiklund and Solid Memo contributors
*
* SPDX-License-Identifier: MIT
*/
@import "@fontsource-variable/fredoka";
@import "@fontsource/bangers";
@import "@fontsource-variable/noto-naskh-arabic";
@import "./palettes.css";
:root {
color-scheme: light;
--radius-sm: 8px;
--radius: 12px;
--radius-lg: 18px;
/*
* How much larger than the browser's own the text is: 1 here. What is
* sized by the window (vw) rather than in rem is multiplied by it, so
* it grows with the rest of the text.
*/
--text-scale: 1;
--font-mono:
ui-monospace, "SFMono-Regular", "Cascadia Mono", "Menlo", "Consolas", "Liberation Mono",
monospace;
--font-display:
"Bangers", "Fredoka Variable", ui-rounded, "Hiragino Maru Gothic ProN", "Arial Rounded MT Bold",
system-ui, "Hiragino Sans", "Noto Sans CJK JP", "Noto Sans JP", "Yu Gothic", "Noto Sans KR",
sans-serif;
font-family:
"Fredoka Variable",
ui-rounded,
"Hiragino Maru Gothic ProN",
"Arial Rounded MT Bold",
system-ui,
-apple-system,
"Segoe UI",
Roboto,
"Hiragino Sans",
"Noto Sans CJK JP",
"Noto Sans JP",
"Yu Gothic",
"Noto Sans KR",
sans-serif;
font-size: 100%;
line-height: 1.55;
color: var(--text);
background-color: var(--bg);
-webkit-text-size-adjust: 100%;
-webkit-font-smoothing: antialiased;
}
/* The dark theme, which the root's data-theme turns on (see ui/theme.tsx); its colors are
in palettes.css. */
:root[data-theme="dark"] {
color-scheme: dark;
}
/*
* The larger text sizes, which the root's data-text-size turns on (see
* ui/theme.tsx, docs/theme.md): the root's font size as a share of the
* browser's, so the browser's own text size is multiplied in, and
* --text-scale with it, for what the window sizes.
*/
:root[data-text-size="large"] {
--text-scale: 1.125;
font-size: 112.5%;
}
:root[data-text-size="larger"] {
--text-scale: 1.25;
font-size: 125%;
}
:root[data-text-size="largest"] {
--text-scale: 1.5;
font-size: 150%;
}
/*
* Korean, on a Korean page or in text marked lang="ko" on another: Korean
* fonts before the pan-CJK Japanese ones (which hold Hangul too, but with
* Japanese shapes and metrics), Fredoka still first for the Latin letters,
* and lines broken between words, not syllables; overflow-wrap still breaks
* a word too long for its line. :where() puts it below every other rule, so
* headings and code keep their own fonts; code-like elements styled by no
* rule of ours get back the monospace this rule takes from the browser's.
*/
:where(:lang(ko)) {
--font-display:
"Bangers", "Fredoka Variable", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR",
"Noto Sans CJK KR", "Source Han Sans K", ui-rounded, "Hiragino Maru Gothic ProN",
"Arial Rounded MT Bold", system-ui, "Hiragino Sans", "Noto Sans CJK JP", "Noto Sans JP",
"Yu Gothic", sans-serif;
font-family:
"Fredoka Variable",
"Apple SD Gothic Neo",
"Malgun Gothic",
"Noto Sans KR",
"Noto Sans CJK KR",
"Source Han Sans K",
ui-rounded,
"Hiragino Maru Gothic ProN",
"Arial Rounded MT Bold",
system-ui,
-apple-system,
"Segoe UI",
Roboto,
"Hiragino Sans",
"Noto Sans CJK JP",
"Noto Sans JP",
"Yu Gothic",
sans-serif;
word-break: keep-all;
}
:where(:lang(ko)):where(code, kbd, samp, pre) {
font-family: var(--font-mono);
}
/* Korean text inside a heading on another language's page. */
:where(h1, h2, .newcomer-course-title) :where(:lang(ko)) {
font-family: var(--font-display);
}
/*
* Bangers has no Hangul and a single weight: Korean display text is drawn
* bold in the Korean font, with no faked bold for Bangers' Latin letters.
* Tracking spreads Hangul apart, there and in the uppercase labels, where
* uppercase does nothing to it.
*/
h1:lang(ko),
h2:lang(ko),
.newcomer-course-body .newcomer-course-title:lang(ko),
:is(h1, h2, .newcomer-course-title) :lang(ko) {
font-weight: 700;
font-synthesis-weight: none;
letter-spacing: 0;
}
:is(dl.account, dl.facts) dt:lang(ko),
legend:lang(ko),
th:lang(ko),
.newcomer-course-body .newcomer-course-eyebrow:lang(ko),
:is(dt, legend, th, .newcomer-course-eyebrow) :lang(ko) {
letter-spacing: 0;
}
/*
* German, on a German page or in text marked lang="de": its long
* compound words are hyphenated at line ends by the browser's German
* dictionary, rather than run past their box or broken at any letter.
*/
:where(:lang(de)) {
hyphens: auto;
}
/*
* Text in a language written right to left (Arabic, Persian, Urdu,
* Hebrew…), marked with its language: it runs right to left in a box of
* its own, isolated from the text around it, so its punctuation, numbers
* and any Latin words keep their places, and a block of it starts at the
* right (text-align: start). The page itself stays left to right: no such
* language is one the app speaks yet. No other rule sets a direction.
*/
:lang(ar),
:lang(fa),
:lang(ur),
:lang(ps),
:lang(sd),
:lang(ug),
:lang(ckb),
:lang(dv),
:lang(he),
:lang(yi),
:lang(syr) {
direction: rtl;
unicode-bidi: isolate;
}
/*
* Arabic, in text marked lang="ar": Noto Naskh Arabic, the book hand that
* draws the vowel marks clearly, after Fredoka for the Latin letters (it
* has no Arabic), then the systems' own Arabic fonts. As in Korean,
* headings, which Bangers cannot draw in Arabic, are bold in the Arabic
* font, and code keeps the monospace font.
*/
:where(:lang(ar)) {
--font-display:
"Bangers", "Fredoka Variable", "Noto Naskh Arabic Variable", "Geeza Pro", "Segoe UI", Tahoma,
sans-serif;
font-family:
"Fredoka Variable", "Noto Naskh Arabic Variable", "Geeza Pro", "Noto Naskh Arabic",
"Noto Sans Arabic", "Segoe UI", Tahoma, sans-serif;
}
:where(:lang(ar)):where(code, kbd, samp, pre) {
font-family: var(--font-mono);
}
/* Arabic text inside a heading on another language's page. */
:where(h1, h2, .newcomer-course-title) :where(:lang(ar)) {
font-family: var(--font-display);
}
/*
* Arabic letters join, and tracking, which spaces letters apart, would
* part them: no Arabic text is tracked, the card's question (tightened for
* Latin letters) and the uppercase labels included.
*/
h1:lang(ar),
h2:lang(ar),
.newcomer-course-body .newcomer-course-title:lang(ar),
:is(h1, h2, .newcomer-course-title) :lang(ar) {
font-weight: 700;
font-synthesis-weight: none;
letter-spacing: 0;
}
:is(dl.account, dl.facts) dt:lang(ar),
legend:lang(ar),
th:lang(ar),
.card-question > p:lang(ar),
.newcomer-course-body .newcomer-course-eyebrow:lang(ar),
:is(dt, legend, th, .card-question, .newcomer-course-eyebrow) :lang(ar) {
letter-spacing: 0;
}
*,
*::before,
*::after {
box-sizing: border-box;
}
body {
margin: 0;
min-height: 100vh;
background:
radial-gradient(
circle at calc(100% + 5rem) 30rem,
var(--paper-blue) 0 17rem,
transparent 17.05rem
)
no-repeat,
radial-gradient(circle at -4rem 11rem, var(--paper-yellow) 0 9rem, transparent 9.05rem)
no-repeat,
var(--bg);
background-attachment: fixed;
}
#app {
display: flex;
flex-direction: column;
min-height: 100vh;
}
main {
flex: 1;
width: 100%;
max-width: 46rem;
margin: 0 auto;
padding: 1.5rem 1rem 3rem;
}
/* The banner landmark: the top bar and, signed in, the masthead and the
instance bar, in the column of the main content below it. */
header.site-header {
display: block;
width: 100%;
max-width: 46rem;
margin: 0 auto;
padding: 0 1rem;
}
/* Below the site header's own bottom margin. */
main.workspace {
padding-top: 0;
}
/* The first Tab stop, out of sight until focused: past the header to the main content. */
.skip-link {
position: absolute;
top: 0.5rem;
left: 1rem;
z-index: 10;
padding: 0.5rem 1rem;
font-weight: 600;
background: var(--surface);
border: 1px solid var(--border-strong);
border-radius: var(--radius);
box-shadow: var(--shadow);
transform: translateY(calc(-100% - 1rem));
}
.skip-link:focus {
transform: none;
}
.site-footer {
padding: 1.25rem 1rem 1.5rem;
text-align: center;
font-size: 0.85rem;
color: var(--text-muted);
}
.site-footer p {
margin: 0;
}
.site-footer a {
color: inherit;
font-weight: 600;
}
.site-footer a:hover {
color: var(--link);
}
/* The docs, the source code, the changelog, the issue tracker and Discussions, side by side,
wrapping on a narrow screen: its rows apart enough that each link, under 24px high, has the
room around it a target needs (WCAG 2.5.8). */
.site-footer .footer-links {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 0.5rem 1rem;
}
/* The documents of a deck to confirm as its own (UnclaimedDecksNotice), one link each, its
address: each a target 24px high at least (WCAG 2.5.8), wrapping on a narrow screen. */
.unclaimed-documents a {
display: inline-block;
min-height: 24px;
overflow-wrap: anywhere;
}
/* A deck's documents named again in a sentence (UnclaimedDecksNotice), their addresses joined
by commas: broken anywhere, so a long one wraps on a narrow screen instead of scrolling the
page sideways (WCAG 1.4.10). */
.unclaimed-addresses {
overflow-wrap: anywhere;
}
/* The theme and language choices above every screen: a sun or a moon, then the language list. */
.top-bar {
display: flex;
flex-wrap: wrap;
justify-content: flex-end;
align-items: center;
gap: 0.6rem;
padding-top: 0.5rem;
}
/* A language that could not be fetched is said below the choices, across the bar. */
.top-bar > .error {
flex-basis: 100%;
margin: 0;
}
/*
* The theme toggle, a small outlined 1.5rem by 1rem rectangle: a yellow
* sun on a pale fill in the light theme, a blue moon on the masthead's
* navy in the dark one (the --toggle-* roles, palettes.css).
*/
.theme-toggle {
width: 1.5rem;
height: 1rem;
min-height: 0;
margin: 0.2rem;
padding: 0;
color: var(--toggle-icon);
background: var(--toggle-bg);
border: none;
border-radius: 0;
box-shadow: 0 0 0 1px var(--toggle-edge);
}
.theme-toggle:hover:not(:disabled) {
background: var(--surface-hover);
box-shadow: 0 0 0 1px var(--toggle-hover-edge);
transform: none;
}
.theme-toggle svg.icon {
width: 0.8rem;
height: 0.8rem;
margin: 0;
}
/* The language list: a globe, then the language spoken now, named in itself. */
.language-selector {
display: flex;
align-items: center;
gap: 0.3rem;
color: var(--text-muted);
}
.language-selector svg.icon {
width: 1rem;
height: 1rem;
margin: 0;
}
.language-selector select {
font: inherit;
color: var(--text);
padding: 0.1rem 0.3rem;
border: 1px solid var(--control-border);
border-radius: var(--radius);
background: var(--surface);
cursor: pointer;
}
.language-selector select:hover {
border-color: var(--text-muted);
}
h1,
h2,
h3 {
font-weight: 700;
line-height: 1.15;
letter-spacing: 0;
word-spacing: 0.12em;
text-wrap: balance;
}
h1,
h2 {
font-family: var(--font-display);
font-weight: 400;
line-height: 1.1;
letter-spacing: 0.04em;
word-spacing: 0.1em;
text-shadow: 0.06em 0.06em 0 var(--heading-pop);
transform-origin: left center;
}
h1 {
--tilt: -3deg;
font-size: 1.8rem;
transform: rotate(var(--tilt));
}
h2 {
--tilt: -2deg;
font-size: 1.6rem;
margin: 0 0 0.85rem;
transform: rotate(var(--tilt));
}
h3 {
font-size: 1rem;
}
p {
margin: 0 0 0.85rem;
}
a {
color: var(--link);
text-underline-offset: 0.18em;
text-decoration-thickness: 1px;
}
a:hover {
text-decoration-thickness: 2px;
}
/* A link laid over its whole row (a deck's name) marks the row, not
itself, so it takes no highlight of its own; nor does a menu's, which
shows as its items do. */
a:not(.button, .brand, .wordmark, .deck-open, .library-deck-name, [role="menuitem"]) {
border-radius: 0.35em;
transition:
background-color 0.12s ease,
box-shadow 0.12s ease;
}
a:not(.button, .brand, .wordmark, .deck-open, .library-deck-name, [role="menuitem"]):hover {
background-color: var(--link-hover-bg);
box-shadow:
0 0 0 0.22em var(--link-hover-bg),
0 0 0 calc(0.22em + 1.5px) var(--link-hover-border);
}
:focus-visible {
outline: 2px solid var(--primary);
outline-offset: 2px;
}
/* A new screen's heading (or the screen) takes focus after a navigation:
ringed when the user moves by keyboard, not after a click. */
h2[tabindex="-1"]:focus:not(:focus-visible),
.screen[tabindex="-1"]:focus:not(:focus-visible),
main[tabindex="-1"]:focus:not(:focus-visible) {
outline: none;
}
svg.icon {
width: 1em;
height: 1em;
margin-right: 0.35em;
vertical-align: -0.12em;
flex: none;
}
h2 svg.icon {
vertical-align: -0.08em;
}
/* After a link that opens in a new tab (ExternalLink). */
svg.external-icon {
width: 0.75em;
height: 0.75em;
margin-left: 0.2em;
vertical-align: -0.05em;
flex: none;
}
header {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0.5rem;
margin-bottom: 1rem;
}
header h1,
header h2 {
margin: 0;
margin-right: auto;
}
section > header h2 {
flex: 1 1 14rem;
}
/* A short number field followed by what it counts; the pair takes the
field's usual space below, so the text lines up with the field. */
.input-with-unit {
display: flex;
align-items: center;
gap: 0.6rem;
margin-bottom: 0.6rem;
}
.input-with-unit input {
width: 5.5rem;
flex: none;
margin-bottom: 0;
padding-inline: 0.6rem;
}
/* Several buttons beside a heading, stacked. */
.header-actions {
display: flex;
flex-direction: column;
align-items: stretch;
gap: 0.4rem;
}
h2 a {
color: inherit;
text-decoration: underline;
text-decoration-color: var(--link);
text-decoration-thickness: 2px;
text-underline-offset: 0.18em;
}
h2 a:hover {
color: var(--link);
}
.masthead {
--link-hover-bg: var(--masthead-link-hover-bg);
--link-hover-border: var(--masthead-link-hover-border);
--blob: 6.5rem;
--blob-x: 2.5rem;
--dot: 0.5rem;
--dot-x: 9.6rem;
--sun: 2.2rem;
--sun-x: 8.5rem;
--logo-height: 3.6rem;
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 0.9rem;
padding: 0.85rem 1rem 0.85rem 0.9rem;
margin: 1.5rem 0 1.25rem;
color: var(--masthead-text);
border: 1px solid var(--masthead-border);
border-radius: var(--radius-lg);
box-shadow: var(--shadow);
background:
radial-gradient(
circle at calc(100% - var(--dot-x)) 0.95rem,
var(--accent-red) 0 var(--dot),
transparent calc(var(--dot) + 0.05rem)
)
no-repeat,
radial-gradient(
circle at calc(100% - var(--sun-x)) calc(100% + 1.1rem),
var(--accent-yellow) 0 var(--sun),
transparent calc(var(--sun) + 0.05rem)
)
no-repeat,
radial-gradient(
circle at calc(100% - var(--blob-x)) -2rem,
var(--masthead-blue) 0 var(--blob),
transparent calc(var(--blob) + 0.05rem)
)
no-repeat,
var(--masthead-bg);
}
/* The logo belongs to the name's link, yet stands left of both the name
and the session line, as tall as the two. */
.masthead-title {
position: relative;
display: flex;
flex-direction: column;
justify-content: center;
gap: 0.2rem;
min-width: 0;
min-height: var(--logo-height);
margin-right: auto;
padding-left: calc(var(--logo-height) * 1.5 + 0.9rem);
}
.masthead a.brand {
color: inherit;
text-decoration: none;
-webkit-user-select: none;
user-select: none;
}
.masthead img.logo {
position: absolute;
top: 50%;
left: 0;
height: var(--logo-height);
width: auto;
border-radius: var(--radius);
border: 2px solid var(--masthead-text);
box-shadow: var(--logo-shadow);
transform: translateY(-50%) rotate(-4deg);
transition: transform 0.15s ease;
}
.masthead a.brand:hover img.logo {
transform: translateY(-50%) rotate(2deg) scale(1.06);
}
/* The link's ring goes round the name; the logo, outside its box, gets its own. */
.masthead a.brand:focus-visible img.logo {
outline: 2px solid var(--masthead-text);
outline-offset: 2px;
}
/* The tilt and the stamp go on the name, not the heading: a transformed
heading would hold the logo, which is placed from the title's edge. */
.masthead h1 {
--heading-pop: var(--accent-red);
margin: 0;
font-size: 1.9rem;
overflow-wrap: anywhere;
transform: none;
animation: none;
}
.wordmark {
display: inline-block;
color: inherit;
text-decoration: none;
transform: rotate(var(--tilt));
transform-origin: left center;
animation: stamp-in 0.4s cubic-bezier(0.2, 0.8, 0.3, 1) 0.08s backwards;
transition: transform 0.15s ease;
}
.masthead a.brand:hover .wordmark {
transform: rotate(calc(var(--tilt) + 1.5deg)) scale(1.06);
}
/* Wraps rather than cutting off who is logged in, at 320px or with the
reader's own text spacing. */
.session-line {
font-size: 0.8rem;
color: color-mix(in srgb, var(--masthead-text) 72%, transparent);
overflow-wrap: anywhere;
}
.session-line a {
color: inherit;
}
.session-line a:hover {
color: var(--masthead-text);
}
/* Below the logo and title when they need the width (at 320px, or with
the reader's own text spacing), still at the right; alone on its row, a
long label wraps rather than running out of the masthead. */
.masthead > button,
.masthead-actions {
margin-left: auto;
}
.masthead button {
background: var(--masthead-text);
border-color: transparent;
color: var(--masthead-button-text);
box-shadow: var(--masthead-button-shadow);
}
.masthead button:hover:not(:disabled),
.masthead button:focus-visible {
background: var(--masthead-button-hover);
transform: translateY(-1px) rotate(2deg);
}
.masthead button:active:not(:disabled) {
transform: rotate(2deg) scale(0.96);
}
/* The primary green is too dark to show on the navy masthead, so
everything focusable in it rings in the masthead's text color. */
.masthead :focus-visible {
outline-color: var(--masthead-text);
}
main.landing {
max-width: 31rem;
padding-top: 2.5rem;
}
/* The landing's picture and name, one link home: still the picture over the heading. */
a.hero-brand {
display: block;
color: inherit;
text-decoration: none;
}
main.landing > h1:not(.hero-heading),
main.landing > a.hero-brand > h1:not(.hero-heading) {
margin: 0.25rem 0 0.4rem;
font-size: 2.8rem;
text-align: center;
transform-origin: center;
}
.tagline {
margin: 0.35rem 0 1.5rem;
text-align: center;
text-wrap: balance;
color: var(--text-muted);
}
/* The maker's note, after the guest's offer: a quote on the cards'
surface, so the paper's circles behind it do not show through. */
.maker-note {
margin: 0 0 1.5rem;
padding: 1rem 1.25rem;
background: var(--surface);
border: 1px solid var(--border);
border-left: 3px solid var(--border-strong);
border-radius: var(--radius);
box-shadow: var(--shadow);
}
.maker-note blockquote {
margin: 0;
}
.maker-note p {
margin: 0;
}
.maker-note figcaption {
margin-top: 0.35rem;
color: var(--text-muted);
font-size: 0.9375rem;
}
/* The landing picture and the masthead's logo: their img is laid out as
if the picture element around it, which only picks the file, were not
there. */
picture.illustration {
display: contents;
}
/* The picture as the heading: it spells the name, so no text beside it. */
h1.hero-heading {
margin: 0;
}
img.hero {
display: block;
width: min(100%, 21rem);
height: auto;
margin: 0 auto 1.25rem;
border-radius: var(--radius-lg);
border: 1px solid var(--border);
box-shadow: var(--shadow);
transform: rotate(-1.5deg);
}
section {
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius-lg);
box-shadow: var(--shadow);
padding: 1.5rem;
margin-bottom: 1.5rem;
}
section > :last-child {
margin-bottom: 0;
}
form {
display: flex;
flex-direction: column;
align-items: stretch;
gap: 0.35rem;
margin-top: 1rem;
}
label {
font-size: 0.85rem;
font-weight: 600;
color: var(--text-muted);
}
/* No wider than what it is in, however large the text: a field's own width is in characters. */
input,
textarea {
max-width: 100%;
font: inherit;
color: var(--text);
min-height: 2.75rem;
padding: 0.55rem 0.8rem;
border: 1px solid var(--control-border);
border-radius: var(--radius);
background: var(--surface);
margin-bottom: 0.6rem;
transition:
border-color 0.12s ease,
box-shadow 0.12s ease;
}
textarea {
min-height: 6rem;
resize: vertical;
}
/* At full opacity: a fainter placeholder drops below 4.5:1. */
input::placeholder,
textarea::placeholder {
color: var(--text-muted);
opacity: 1;
}
/* A field's hint sits right under it, above the next label's gap. */
.field-hint {
margin: -0.4rem 0 0.6rem;
}
input:hover:not(:disabled),
textarea:hover:not(:disabled) {
border-color: var(--text-muted);
}
/*
* Text fields show focus with their border and ring; the transparent
* outline is what forced-colors mode draws, since it drops the shadow.
* Radios and checkboxes have no border to color, so they keep a solid
* outline like every other control.
*/
input:not([type="radio"], [type="checkbox"]):focus,
textarea:focus {
outline: 2px solid transparent;
border-color: var(--primary);
box-shadow: var(--ring);
}
input:is([type="radio"], [type="checkbox"]):focus-visible {
outline: 2px solid var(--primary);
outline-offset: 2px;
}
input:disabled,
textarea:disabled {
background: var(--surface-sunken);
opacity: 0.7;
}
input[type="radio"],
input[type="checkbox"] {
min-height: 0;
width: 1.1rem;
height: 1.1rem;
margin: 0 0.5rem 0 0;
vertical-align: -0.15em;
accent-color: var(--primary);
}
button,
a.button {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 0.4rem;
font: inherit;
font-weight: 600;
font-size: 0.95rem;
line-height: 1.2;
min-height: 2.5rem;
padding: 0.5rem 1rem;
border: 1px solid var(--border-strong);
border-radius: var(--radius);
background: var(--surface);
color: var(--text);
box-shadow: var(--shadow-sm);
text-decoration: none;
cursor: pointer;
/* A label is pressed, not copied: a drag or a double-click over it
must not select it. */
-webkit-user-select: none;
user-select: none;
transition:
background 0.12s ease,
border-color 0.12s ease,
transform 0.12s ease,
box-shadow 0.12s ease;
}
button:hover:not(:disabled, [aria-disabled="true"]),
a.button:hover {
background: var(--surface-hover);
transform: translateY(-1px);
}
button:active:not(:disabled, [aria-disabled="true"]),
a.button:active {
transform: translateY(0);
box-shadow: none;
}
/* A study button stays focusable while its answer saves, so it is only
aria-disabled; it looks disabled all the same. */
button:disabled,
button[aria-disabled="true"] {
opacity: 0.5;
cursor: default;
box-shadow: none;
}
/* Fading it would fade its focus ring too, below 3:1, so a focused one
shows in full; aria-disabled still tells assistive tech it is busy. */
button[aria-disabled="true"]:focus-visible {
opacity: 1;
}
button[type="submit"],
button.primary,
a.button.primary {
background: var(--primary-fill);
border-color: var(--primary-fill);
color: var(--on-primary);
box-shadow: var(--primary-bevel);
}
button[type="submit"]:hover:not(:disabled, [aria-disabled="true"]),
button.primary:hover:not(:disabled, [aria-disabled="true"]),
a.button.primary:hover {
background: var(--primary-hover);
border-color: var(--primary-hover);
}
form > button,
form > a.button {
align-self: flex-start;
}
button[type="submit"] {
margin-top: 0.25rem;
}
button.danger {
color: var(--danger);
border-color: var(--danger-border);