Repository navigation
Expand file tree
/
Copy pathstyle.css
More file actions
550 lines (480 loc) · 13.2 KB
/
Copy pathstyle.css
File metadata and controls
550 lines (480 loc) · 13.2 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
/* ============================================
Google Fonts Import
============================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
/* ============================================
Theme — overrides rheobook package defaults
============================================ */
:root:root, html:root {
/* High-contrast neutral theme with regional warm accents (Terracotta) */
--background-color: #ffffff; /* Crisp pure white */
--sidebar-bg: #f8f9fa; /* Neutral light gray sidebar */
--primary-dark: #212529; /* Neutral dark black for titles and active headers */
--text-color: #343a40; /* Dark charcoal for high-contrast reading text */
--border-color: #e9ecef; /* Neutral light gray for borders and lines */
--accent-color: #9e3f1b; /* Dark high-contrast terracotta for active states (passes WCAG AAA) */
--link-color: #b34d28; /* Warm copper/terracotta for links */
--quote-color: #495057; /* Neutral dark gray for blockquotes */
--arrow-bg: #ffffff;
--arrow-color: #212529;
--sidebar-link-color: #495057;
--sidebar-hover-bg: #e9ecef; /* Sidebar link hover background */
--code-bg: #f8f9fa;
--sidebar-width: 260px;
--topbar-height: 40px;
}
/* ============================================
Base Styles
============================================ */
body {
background-color: var(--background-color);
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
font-size: 16px;
line-height: 1.65;
color: var(--text-color);
}
/* Headings: Premium sans-serif styling */
h1, h2, h3, h4, h5, h6 {
color: var(--primary-dark);
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
font-weight: 600;
line-height: 1.3;
margin-top: 2rem;
margin-bottom: 1rem;
letter-spacing: -0.019em;
}
h3 {
margin-bottom: 0.5rem;
}
ul,
ol {
padding: 0;
margin: 0.5rem 0 1.5rem 1.5rem;
}
li {
margin-bottom: 0.5rem;
}
/* Links: Elegant transition and semi-transparent underlines */
a {
color: var(--link-color);
text-decoration: underline;
text-decoration-color: rgba(179, 77, 40, 0.3);
text-decoration-thickness: 1px;
transition: all 0.2s ease;
}
a:hover {
text-decoration-color: var(--link-color);
color: #8c3b1e;
}
video {
max-width: 100%;
}
/* Blockquote: Clean modern style with terracotta accent bar */
blockquote {
position: relative;
width: 100%;
padding: 1.2rem 1.5rem 1.2rem 2.5rem;
margin: 2.2rem 0;
font-size: 1.1rem;
font-style: italic;
font-family: 'Inter', sans-serif;
background-color: #f8f9fa;
color: var(--quote-color);
border-left: 3px solid var(--accent-color);
border-radius: 0 6px 6px 0;
box-sizing: border-box;
}
blockquote::before {
content: "\201C";
position: absolute;
top: 0.2rem;
left: 0.5rem;
font-size: 3rem;
color: rgba(158, 63, 27, 0.15); /* large subtle terracotta quote mark */
line-height: 1;
}
section[role="doc-endnotes"] ol li a[role="doc-backlink"] {
padding-right: 0.2em;
}
figure {
text-align: center;
margin: 2rem 0;
}
figure figcaption {
font-family: 'Inter', sans-serif;
font-style: italic;
font-size: 0.9rem;
color: var(--quote-color);
margin-top: 0.5rem;
}
/* ============================================
Code Blocks
============================================ */
pre {
max-width: 100%;
overflow-x: auto;
margin: 1.5rem 0;
}
code {
font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
font-size: 0.9em;
word-wrap: break-word;
overflow-wrap: break-word;
}
pre code {
display: block;
white-space: pre-wrap;
background-color: var(--code-bg);
border: 1px solid var(--border-color);
padding: 1rem;
border-radius: 6px;
word-break: break-word;
color: var(--primary-dark);
}
@media (max-width: 768px) {
pre {
overflow-x: visible;
}
pre code {
white-space: pre-wrap;
word-break: break-all;
}
}
/* ============================================
Tables Styling (Minimal, Clean, and Rowspan-Safe)
============================================ */
.content table {
width: 100%;
border-collapse: collapse;
margin: 2rem 0;
font-size: 0.95rem;
line-height: 1.5;
box-sizing: border-box;
}
.content th,
.content td {
padding: 0.75rem 1rem;
text-align: left;
vertical-align: top;
border-bottom: 1px solid var(--border-color);
background-color: #ffffff; /* Solid white background makes rowspan cells seamless */
}
.content th {
font-weight: 600;
color: var(--primary-dark);
border-bottom: 2px solid var(--border-color);
font-size: 0.9rem;
background-color: #f8f9fa;
}
/* Note: Zebra striping and row-hover rules are omitted to prevent coloring conflicts
when tables contain cells with rowspan/colspan attributes. */
.content td[colspan] {
font-weight: 600;
background-color: #ffffff; /* Seamless white background */
color: var(--primary-dark); /* Bold dark text */
text-align: left;
font-size: 0.95rem;
padding: 1.25rem 1rem 0.6rem 1rem; /* More top padding to separate it from the previous section */
border-bottom: 1.5px solid var(--primary-dark); /* Strong anchor line to group it with the rows below */
border-top: none;
}
@media (max-width: 768px) {
.content table {
display: block;
width: 100%;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
}
}
/* ============================================
Sidebar & Navigation Overrides (High-Contrast)
============================================ */
.sidebar-nav li.section-label {
color: #495057 !important; /* High contrast section headings */
border-top: 1px solid var(--border-color) !important;
}
.sidebar-nav a:hover {
background-color: var(--sidebar-hover-bg) !important;
color: var(--primary-dark) !important;
}
.sidebar-nav li.active > a,
.sidebar-nav li.active > p > a {
background-color: var(--accent-color) !important;
color: #ffffff !important; /* Perfect contrast on deep terracotta */
font-weight: 600 !important;
}
.sidebar-nav li.active-parent > a {
color: var(--accent-color) !important;
font-weight: 600 !important;
}
/* Navigation Arrows (Next/Prev buttons) */
.nav-arrow {
color: var(--accent-color) !important;
background-color: var(--arrow-bg) !important;
border: 1px solid var(--border-color) !important;
border-radius: 6px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.nav-arrow:hover {
background-color: var(--accent-color) !important;
border-color: var(--accent-color) !important;
box-shadow: 0 4px 12px rgba(158, 63, 27, 0.2) !important;
}
.nav-arrow:hover .arrow-icon,
.nav-arrow:hover .arrow-text {
color: #ffffff !important;
}
/* ============================================
Content Layout & Width Restricting
============================================ */
.content {
padding: 1.5rem 2rem 3rem;
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
[role="doc-endnotes"] {
padding: 0 2rem 3rem;
box-sizing: border-box;
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.content h2 {
font-size: 2.2rem;
border-bottom: 1px solid var(--border-color);
padding-bottom: 0.5rem;
margin-top: 0;
margin-bottom: 1.8rem;
}
/* Tablet and up */
@media (min-width: 768px) {
.content {
font-size: 1.05rem;
line-height: 1.65;
padding-top: 2.5rem;
}
blockquote {
max-width: 32rem;
padding: 1.2rem 1.8rem 1.2rem 2.8rem;
margin: 2.5rem auto;
}
}
/* Desktop and up (sidebar open): center and restrict content/arrows */
@media (min-width: 769px) {
.content,
[role="doc-endnotes"] {
/* Dynamically calculate margins so that content is exactly 800px wide, centered in the remaining screen space */
padding-left: max(2rem, calc((100vw - var(--sidebar-width) - 800px) / 2));
padding-right: max(2rem, calc((100vw - var(--sidebar-width) - 800px) / 2));
max-width: none;
box-sizing: border-box;
}
.nav-arrows:not(.mobile-nav) {
/* Align arrows perfectly with centered text box limits */
padding-left: max(2rem, calc((100vw - var(--sidebar-width) - 800px) / 2));
padding-right: max(2rem, calc((100vw - var(--sidebar-width) - 800px) / 2));
box-sizing: border-box;
}
}
/* Desktop and up (sidebar closed): center and restrict content/arrows */
@media (min-width: 769px) {
.sidebar-closed~.content,
.sidebar-closed~[role="doc-endnotes"] {
padding-left: max(2rem, calc((100vw - 800px) / 2));
padding-right: max(2rem, calc((100vw - 800px) / 2));
}
.sidebar-closed~.nav-arrows:not(.mobile-nav) {
padding-left: max(2rem, calc((100vw - 800px) / 2));
padding-right: max(2rem, calc((100vw - 800px) / 2));
}
}
/* ============================================
Image Viewer (Lightbox) Styles
============================================ */
.lightbox-backdrop {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
width: 100%;
height: 100%;
background-color: rgba(15, 15, 15, 0.75);
backdrop-filter: blur(16px);
-webkit-backdrop-filter: blur(16px);
z-index: 10000;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
opacity: 0;
visibility: hidden;
transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s;
}
.lightbox-backdrop.active {
opacity: 1;
visibility: visible;
}
.lightbox-wrapper {
position: relative;
max-width: 90vw;
max-height: 90vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.lightbox-img {
max-width: 90vw;
max-height: 68vh;
object-fit: contain;
border-radius: 8px;
box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
transform: scale(0.95);
transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.lightbox-backdrop.active .lightbox-img {
transform: scale(1);
}
.lightbox-caption {
margin-top: 16px;
margin-bottom: max(12px, env(safe-area-inset-bottom, 0px));
color: rgba(255, 255, 255, 0.95);
font-family: 'Inter', sans-serif;
font-size: 0.95rem;
text-align: center;
max-width: 75vw;
max-height: 15vh;
overflow-y: auto;
padding-right: 8px;
box-sizing: border-box;
line-height: 1.5;
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
z-index: 10002;
scrollbar-width: thin;
scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
flex-shrink: 0;
-webkit-overflow-scrolling: touch;
touch-action: pan-y;
}
.lightbox-caption::-webkit-scrollbar {
width: 6px;
}
.lightbox-caption::-webkit-scrollbar-track {
background: transparent;
}
.lightbox-caption::-webkit-scrollbar-thumb {
background-color: rgba(255, 255, 255, 0.3);
border-radius: 3px;
}
.lightbox-caption a {
color: #ffaa80;
text-decoration: underline;
text-decoration-color: rgba(255, 170, 128, 0.4);
}
.lightbox-caption a:hover {
color: #ffc9b3;
text-decoration-color: #ffaa80;
}
/* Close & Arrow Buttons */
.lightbox-close,
.lightbox-arrow {
border: none;
background: rgba(255, 255, 255, 0.08);
backdrop-filter: blur(8px);
-webkit-backdrop-filter: blur(8px);
color: #ffffff;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: background-color 0.25s ease, transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.lightbox-close {
position: absolute;
top: max(24px, env(safe-area-inset-top, 0px));
right: max(24px, env(safe-area-inset-right, 0px));
width: 48px;
height: 48px;
border-radius: 50%;
z-index: 10002;
}
.lightbox-close:hover {
background-color: rgba(255, 255, 255, 0.2);
transform: scale(1.08);
}
.lightbox-close svg {
width: 24px;
height: 24px;
}
.lightbox-arrow {
position: absolute;
top: 50%;
transform: translateY(-50%);
width: 56px;
height: 56px;
border-radius: 50%;
z-index: 10001;
}
.lightbox-arrow:hover {
background-color: rgba(255, 255, 255, 0.2);
transform: translateY(-50%) scale(1.08);
}
.lightbox-arrow-left {
left: max(24px, env(safe-area-inset-left, 0px));
}
.lightbox-arrow-right {
right: max(24px, env(safe-area-inset-right, 0px));
}
.lightbox-arrow svg {
width: 28px;
height: 28px;
}
/* Mobile responsive overrides */
@media (max-width: 768px) {
.lightbox-arrow {
width: 44px;
height: 44px;
}
.lightbox-arrow-left {
left: max(12px, env(safe-area-inset-left, 0px));
}
.lightbox-arrow-right {
right: max(12px, env(safe-area-inset-right, 0px));
}
.lightbox-close {
top: max(16px, env(safe-area-inset-top, 0px));
right: max(16px, env(safe-area-inset-right, 0px));
width: 40px;
height: 40px;
}
.lightbox-caption {
font-size: 0.85rem;
max-width: 85vw;
max-height: 18vh;
overflow-y: auto;
padding-right: 4px;
flex-shrink: 0;
-webkit-overflow-scrolling: touch;
touch-action: pan-y;
}
.lightbox-img {
max-height: 55vh;
}
}
/* ============================================
Topbar Mobile Overrides (Truncate Long Title)
============================================ */
@media (max-width: 768px) {
body .topbar > a {
display: block;
max-width: calc(100% - 110px);
width: 100%;
}
body .topbar .topbar-title {
display: block;
font-size: 14px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
text-align: center;
width: 100%;
}
}