methanol 0.0.0 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/LICENSE +203 -0
  2. package/README.md +58 -0
  3. package/banner.txt +6 -0
  4. package/bin/methanol.js +24 -0
  5. package/index.js +22 -0
  6. package/package.json +51 -9
  7. package/src/assets.js +30 -0
  8. package/src/build-system.js +200 -0
  9. package/src/components.js +145 -0
  10. package/src/config.js +396 -0
  11. package/src/dev-server.js +632 -0
  12. package/src/main.js +133 -0
  13. package/src/mdx.js +406 -0
  14. package/src/node-loader.js +88 -0
  15. package/src/pagefind.js +107 -0
  16. package/src/pages.js +771 -0
  17. package/src/preview-server.js +58 -0
  18. package/src/public-assets.js +73 -0
  19. package/src/register-loader.js +29 -0
  20. package/src/rehype-plugins/link-resolve.js +116 -0
  21. package/src/rehype-plugins/methanol-ctx.js +89 -0
  22. package/src/renderer.js +25 -0
  23. package/src/rewind.js +117 -0
  24. package/src/stage-logger.js +59 -0
  25. package/src/state.js +179 -0
  26. package/src/virtual-module/inject.js +30 -0
  27. package/src/virtual-module/loader.js +116 -0
  28. package/src/virtual-module/pagefind.js +108 -0
  29. package/src/vite-plugins.js +173 -0
  30. package/themes/default/components/ThemeAccentSwitch.client.jsx +95 -0
  31. package/themes/default/components/ThemeAccentSwitch.static.jsx +23 -0
  32. package/themes/default/components/ThemeColorSwitch.client.jsx +95 -0
  33. package/themes/default/components/ThemeColorSwitch.static.jsx +23 -0
  34. package/themes/default/components/ThemeSearchBox.client.jsx +324 -0
  35. package/themes/default/components/ThemeSearchBox.static.jsx +40 -0
  36. package/themes/default/components/ThemeToCContainer.client.jsx +154 -0
  37. package/themes/default/components/ThemeToCContainer.static.jsx +61 -0
  38. package/themes/default/components/pre.client.jsx +84 -0
  39. package/themes/default/components/pre.static.jsx +27 -0
  40. package/themes/default/heading.jsx +35 -0
  41. package/themes/default/index.js +41 -0
  42. package/themes/default/page.jsx +303 -0
  43. package/themes/default/pages/404.mdx +8 -0
  44. package/themes/default/pages/index.mdx +31 -0
  45. package/themes/default/public/favicon.png +0 -0
  46. package/themes/default/public/logo.png +0 -0
  47. package/themes/default/sources/prefetch.js +49 -0
  48. package/themes/default/sources/style.css +1660 -0
@@ -0,0 +1,1660 @@
1
+ @import '@wooorm/starry-night/style/core';
2
+
3
+ :root {
4
+ interpolate-size: allow-keywords;
5
+ color-scheme: dark;
6
+ --bg: #09090b;
7
+ --surface: #0c0c0e;
8
+ --surface-muted: #17171a;
9
+ --surface-elevated: #1c1c21;
10
+ --text: #fafafa;
11
+ --muted: #a1a1aa;
12
+ --border: #27272a;
13
+ --accent: #ffa000;
14
+ --accent-foreground: #ffffff;
15
+ --accent-soft: rgba(255, 160, 0, 0.1);
16
+ --radius: 8px;
17
+ --sidebar-width: 260px;
18
+ --toc-width: 240px;
19
+ --header-height: 0px;
20
+ --hover-bg: rgba(255, 255, 255, 0.05);
21
+
22
+ @media (prefers-color-scheme: light) {
23
+ & {
24
+ color-scheme: light;
25
+ --bg: #ffffff;
26
+ --surface: #fafafa;
27
+ --surface-muted: #f4f4f5;
28
+ --surface-elevated: #ffffff;
29
+ --text: #09090b;
30
+ --muted: #71717a;
31
+ --border: #e4e4e7;
32
+ --accent: #ff8f00;
33
+ --accent-foreground: #ffffff;
34
+ --accent-soft: rgba(255, 143, 0, 0.08);
35
+ --hover-bg: rgba(0, 0, 0, 0.04);
36
+ }
37
+ }
38
+
39
+ &.light {
40
+ color-scheme: light;
41
+ --bg: #ffffff;
42
+ --surface: #fafafa;
43
+ --surface-muted: #f4f4f5;
44
+ --surface-elevated: #ffffff;
45
+ --text: #09090b;
46
+ --muted: #71717a;
47
+ --border: #e4e4e7;
48
+ --accent: #ff8f00;
49
+ --accent-foreground: #ffffff;
50
+ --accent-soft: rgba(255, 143, 0, 0.08);
51
+ --hover-bg: rgba(0, 0, 0, 0.04);
52
+
53
+ /* Starry Night Light Theme */
54
+ --color-prettylights-syntax-brackethighlighter-angle: #59636e;
55
+ --color-prettylights-syntax-brackethighlighter-unmatched: #82071e;
56
+ --color-prettylights-syntax-carriage-return-bg: #cf222e;
57
+ --color-prettylights-syntax-carriage-return-text: #f6f8fa;
58
+ --color-prettylights-syntax-comment: #59636e;
59
+ --color-prettylights-syntax-constant: #0550ae;
60
+ --color-prettylights-syntax-constant-other-reference-link: #0a3069;
61
+ --color-prettylights-syntax-entity: #6639ba;
62
+ --color-prettylights-syntax-entity-tag: #0550ae;
63
+ --color-prettylights-syntax-invalid-illegal-bg: #82071e;
64
+ --color-prettylights-syntax-invalid-illegal-text: #f6f8fa;
65
+ --color-prettylights-syntax-keyword: #cf222e;
66
+ --color-prettylights-syntax-markup-changed-bg: #ffd8b5;
67
+ --color-prettylights-syntax-markup-changed-text: #953800;
68
+ --color-prettylights-syntax-markup-deleted-bg: #ffebe9;
69
+ --color-prettylights-syntax-markup-deleted-text: #82071e;
70
+ --color-prettylights-syntax-markup-heading: #0550ae;
71
+ --color-prettylights-syntax-markup-ignored-bg: #0550ae;
72
+ --color-prettylights-syntax-markup-ignored-text: #d1d9e0;
73
+ --color-prettylights-syntax-markup-inserted-bg: #dafbe1;
74
+ --color-prettylights-syntax-markup-inserted-text: #116329;
75
+ --color-prettylights-syntax-markup-list: #3b2300;
76
+ --color-prettylights-syntax-meta-diff-range: #8250df;
77
+ --color-prettylights-syntax-string: #0a3069;
78
+ --color-prettylights-syntax-string-regexp: #116329;
79
+ --color-prettylights-syntax-sublimelinter-gutter-mark: #818b98;
80
+ --color-prettylights-syntax-variable: #953800;
81
+ --color-prettylights-syntax-markup-bold: #1f2328;
82
+ --color-prettylights-syntax-markup-italic: #1f2328;
83
+ --color-prettylights-syntax-storage-modifier-import: #1f2328;
84
+ }
85
+
86
+ &.dark {
87
+ color-scheme: dark;
88
+ --bg: #09090b;
89
+ --surface: #0c0c0e;
90
+ --surface-muted: #17171a;
91
+ --surface-elevated: #1c1c21;
92
+ --text: #fafafa;
93
+ --muted: #a1a1aa;
94
+ --border: #27272a;
95
+ --accent: #ffa000;
96
+ --accent-foreground: #ffffff;
97
+ --accent-soft: rgba(255, 160, 0, 0.1);
98
+ --radius: 8px;
99
+ --hover-bg: rgba(255, 255, 255, 0.05);
100
+
101
+ /* Starry Night Dark Theme */
102
+ --color-prettylights-syntax-brackethighlighter-angle: #9198a1;
103
+ --color-prettylights-syntax-brackethighlighter-unmatched: #f85149;
104
+ --color-prettylights-syntax-carriage-return-bg: #b62324;
105
+ --color-prettylights-syntax-carriage-return-text: #f0f6fc;
106
+ --color-prettylights-syntax-comment: #9198a1;
107
+ --color-prettylights-syntax-constant: #79c0ff;
108
+ --color-prettylights-syntax-constant-other-reference-link: #a5d6ff;
109
+ --color-prettylights-syntax-entity: #d2a8ff;
110
+ --color-prettylights-syntax-entity-tag: #7ee787;
111
+ --color-prettylights-syntax-invalid-illegal-bg: #8e1519;
112
+ --color-prettylights-syntax-invalid-illegal-text: #f0f6fc;
113
+ --color-prettylights-syntax-keyword: #ff7b72;
114
+ --color-prettylights-syntax-markup-bold: #f0f6fc;
115
+ --color-prettylights-syntax-markup-changed-bg: #5a1e02;
116
+ --color-prettylights-syntax-markup-changed-text: #ffdfb6;
117
+ --color-prettylights-syntax-markup-deleted-bg: #67060c;
118
+ --color-prettylights-syntax-markup-deleted-text: #ffdcd7;
119
+ --color-prettylights-syntax-markup-heading: #1f6feb;
120
+ --color-prettylights-syntax-markup-ignored-bg: #1158c7;
121
+ --color-prettylights-syntax-markup-ignored-text: #f0f6fc;
122
+ --color-prettylights-syntax-markup-inserted-bg: #033a16;
123
+ --color-prettylights-syntax-markup-inserted-text: #aff5b4;
124
+ --color-prettylights-syntax-markup-italic: #f0f6fc;
125
+ --color-prettylights-syntax-markup-list: #f2cc60;
126
+ --color-prettylights-syntax-meta-diff-range: #d2a8ff;
127
+ --color-prettylights-syntax-storage-modifier-import: #f0f6fc;
128
+ --color-prettylights-syntax-string: #a5d6ff;
129
+ --color-prettylights-syntax-string-regexp: #7ee787;
130
+ --color-prettylights-syntax-sublimelinter-gutter-mark: #3d444d;
131
+ --color-prettylights-syntax-variable: #ffa657;
132
+ }
133
+
134
+ /* Accent Colors */
135
+ &.accent-rose {
136
+ --accent: #f43f5e;
137
+ --accent-soft: rgba(244, 63, 94, 0.15);
138
+ @media (prefers-color-scheme: light) {
139
+ --accent: #e11d48;
140
+ --accent-soft: rgba(225, 29, 72, 0.1);
141
+ }
142
+ &.light {
143
+ --accent: #e11d48;
144
+ --accent-soft: rgba(225, 29, 72, 0.1);
145
+ }
146
+ &.dark {
147
+ --accent: #f43f5e;
148
+ --accent-soft: rgba(244, 63, 94, 0.15);
149
+ }
150
+ }
151
+
152
+ &.accent-blue {
153
+ /* Indigo-Blue */
154
+ --accent: #818cf8;
155
+ --accent-soft: rgba(129, 140, 248, 0.15);
156
+ @media (prefers-color-scheme: light) {
157
+ --accent: #4f46e5;
158
+ --accent-soft: rgba(79, 70, 229, 0.1);
159
+ }
160
+ &.light {
161
+ --accent: #4f46e5;
162
+ --accent-soft: rgba(79, 70, 229, 0.1);
163
+ }
164
+ &.dark {
165
+ --accent: #818cf8;
166
+ --accent-soft: rgba(129, 140, 248, 0.15);
167
+ }
168
+ }
169
+
170
+ &.accent-green {
171
+ /* Teal-Emerald */
172
+ --accent: #2dd4bf;
173
+ --accent-soft: rgba(45, 212, 191, 0.15);
174
+ @media (prefers-color-scheme: light) {
175
+ --accent: #0d9488;
176
+ --accent-soft: rgba(13, 148, 136, 0.1);
177
+ }
178
+ &.light {
179
+ --accent: #0d9488;
180
+ --accent-soft: rgba(13, 148, 136, 0.1);
181
+ }
182
+ &.dark {
183
+ --accent: #2dd4bf;
184
+ --accent-soft: rgba(45, 212, 191, 0.15);
185
+ }
186
+ }
187
+
188
+ &.accent-purple {
189
+ /* Violet */
190
+ --accent: #a78bfa;
191
+ --accent-soft: rgba(167, 139, 250, 0.15);
192
+ @media (prefers-color-scheme: light) {
193
+ --accent: #7c3aed;
194
+ --accent-soft: rgba(124, 58, 237, 0.1);
195
+ }
196
+ &.light {
197
+ --accent: #7c3aed;
198
+ --accent-soft: rgba(124, 58, 237, 0.1);
199
+ }
200
+ &.dark {
201
+ --accent: #a78bfa;
202
+ --accent-soft: rgba(167, 139, 250, 0.15);
203
+ }
204
+ }
205
+ }
206
+
207
+ *,
208
+ *::before,
209
+ *::after {
210
+ box-sizing: border-box;
211
+ }
212
+
213
+ html {
214
+ scroll-behavior: smooth;
215
+ }
216
+
217
+ body {
218
+ margin: 0;
219
+ font-family:
220
+ 'Inter', ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
221
+ 'Noto Color Emoji';
222
+ line-height: 1.6;
223
+ color: var(--text);
224
+ background-color: var(--bg);
225
+ background-image:
226
+ radial-gradient(at 0% 0%, var(--accent-soft) 0px, transparent 50%),
227
+ radial-gradient(at 100% 0%, rgba(255, 255, 255, 0.01) 0px, transparent 50%);
228
+ background-attachment: fixed;
229
+ -webkit-font-smoothing: antialiased;
230
+
231
+ @media (prefers-color-scheme: light) {
232
+ background-image:
233
+ radial-gradient(at 0% 0%, var(--accent-soft) 0px, transparent 50%),
234
+ radial-gradient(at 100% 0%, rgba(0, 0, 0, 0.01) 0px, transparent 50%);
235
+ }
236
+ }
237
+
238
+ a {
239
+ color: inherit;
240
+ text-decoration: none;
241
+ transition: color 0.15s ease;
242
+
243
+ &:hover {
244
+ color: var(--text);
245
+ }
246
+ }
247
+
248
+ .text-accent {
249
+ color: var(--accent);
250
+ }
251
+
252
+ /* --- Layout --- */
253
+
254
+ .layout-container {
255
+ display: grid;
256
+ grid-template-columns: var(--sidebar-width) minmax(0, 1fr) var(--toc-width);
257
+ gap: 3rem;
258
+ max-width: 1400px;
259
+ margin: 0 auto;
260
+ padding: 0 1.5rem;
261
+
262
+ &.no-toc {
263
+ grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
264
+ padding-right: 3rem;
265
+ }
266
+ }
267
+
268
+ /* --- Sidebar --- */
269
+
270
+ .sidebar {
271
+ position: sticky;
272
+ top: 0;
273
+ height: 100vh;
274
+ overflow: visible;
275
+ padding: 2rem 0;
276
+ display: flex;
277
+ flex-direction: column;
278
+ gap: 1rem;
279
+ border-right: 1px solid transparent; /* Align visually */
280
+
281
+ .sidebar-header,
282
+ .sidebar-footer,
283
+ nav {
284
+ padding: 0 1rem;
285
+ }
286
+
287
+ .sidebar-header {
288
+ display: flex;
289
+ flex-direction: column;
290
+ gap: 1rem;
291
+ flex-shrink: 0; /* Prevent header from shrinking */
292
+
293
+ .logo {
294
+ display: flex;
295
+ flex-direction: column;
296
+ align-items: center;
297
+ gap: 0.5rem;
298
+ padding: 0.5rem 0;
299
+ text-align: center;
300
+ position: relative;
301
+
302
+ img {
303
+ max-height: 256px;
304
+ max-width: 100%;
305
+ height: auto;
306
+ width: auto;
307
+ object-fit: contain;
308
+
309
+ @media (max-width: 1024px) {
310
+ max-height: 128px;
311
+ }
312
+ }
313
+
314
+ span {
315
+ font-weight: 800;
316
+ font-size: 1.4rem;
317
+ letter-spacing: -0.03em;
318
+ color: var(--text);
319
+ line-height: 1.2;
320
+
321
+ @media (max-width: 1024px) {
322
+ font-size: 1.1rem;
323
+ }
324
+ }
325
+ }
326
+
327
+ .search-box {
328
+ display: flex;
329
+ align-items: center;
330
+ gap: 0.5rem;
331
+ width: 100%;
332
+ height: 2.25rem; /* Set a fixed height to prevent shifts */
333
+ background: var(--surface-muted);
334
+ border: 1px solid var(--border);
335
+ border-radius: var(--radius);
336
+ padding: 0 0.75rem; /* Vertical padding replaced by height + align-items */
337
+ color: var(--muted);
338
+ font-size: 0.875rem;
339
+ cursor: pointer;
340
+ transition: all 0.15s ease;
341
+
342
+ /* Hide search box on narrow screens */
343
+ @media (max-width: 1024px) {
344
+ display: none;
345
+ }
346
+
347
+ kbd {
348
+ margin-left: auto;
349
+ font-family: inherit;
350
+ font-size: 0.75rem;
351
+ line-height: 1;
352
+ border: 1px solid var(--border);
353
+ border-radius: 4px;
354
+ padding: 0.15rem 0.3rem;
355
+ background: var(--surface);
356
+ display: inline-flex;
357
+ align-items: center;
358
+ justify-content: center;
359
+ }
360
+
361
+ &:hover {
362
+ border-color: var(--muted);
363
+ color: var(--text);
364
+ }
365
+ }
366
+ }
367
+
368
+ nav {
369
+ flex: 1;
370
+ overflow-y: auto;
371
+ min-height: 0;
372
+ }
373
+
374
+ nav ul {
375
+ list-style: none;
376
+ margin: 0;
377
+ padding: 0;
378
+ display: flex;
379
+ flex-direction: column;
380
+
381
+ ul {
382
+ margin-left: 10px;
383
+ position: relative;
384
+ &::before {
385
+ content: '';
386
+ position: absolute;
387
+ left: 5px;
388
+ top: 6px;
389
+ width: 1px;
390
+ height: calc(100% - 12px);
391
+ background-color: var(--border);
392
+ border-radius: 0.5px;
393
+ }
394
+
395
+ .sb-dir-header {
396
+ margin-top: 0.25rem;
397
+ }
398
+
399
+ .nav-dir-label,
400
+ .nav-dir-link {
401
+ text-transform: uppercase;
402
+ font-size: 0.75rem;
403
+ font-weight: 700;
404
+ letter-spacing: 0.05em;
405
+ }
406
+ }
407
+ }
408
+
409
+ li {
410
+ margin: 0;
411
+ }
412
+
413
+ /* Common Link Styling */
414
+ a {
415
+ display: block;
416
+ padding: 0.35rem 0.75rem;
417
+ border-radius: var(--radius);
418
+ color: var(--muted);
419
+ font-size: 0.9rem;
420
+ font-weight: 500;
421
+ transition: all 0.1s ease;
422
+ position: relative;
423
+ isolation: isolate;
424
+
425
+ &::before {
426
+ content: '';
427
+ position: absolute;
428
+ inset: 0;
429
+ border-radius: var(--radius);
430
+ z-index: -1;
431
+ transition: background-color 0.1s ease;
432
+ }
433
+
434
+ &:hover {
435
+ color: var(--text);
436
+ &::before {
437
+ background: var(--hover-bg);
438
+ }
439
+ }
440
+
441
+ &.active {
442
+ color: var(--accent);
443
+ &::before {
444
+ background: var(--accent-soft);
445
+ }
446
+ &::after {
447
+ content: '';
448
+ position: absolute;
449
+ border-radius: 1.5px;
450
+ height: calc(100% - 12px);
451
+ left: 4px;
452
+ top: 6px;
453
+ width: 3px;
454
+ background-color: var(--accent);
455
+ }
456
+ }
457
+ }
458
+
459
+ /* Directory Styling */
460
+ .sidebar-collapsible {
461
+ width: 100%;
462
+
463
+ &::details-content {
464
+ opacity: 0;
465
+ height: 0;
466
+ overflow: hidden;
467
+ transition:
468
+ height 0.25s ease-out,
469
+ opacity 0.2s ease-out;
470
+ transition-behavior: allow-discrete;
471
+ }
472
+
473
+ &[open]::details-content {
474
+ opacity: 1;
475
+ height: auto;
476
+ }
477
+
478
+ /* Chevron indicator button on the right */
479
+ &:has(ul) > .sb-dir-header::after {
480
+ content: '';
481
+ width: 1rem;
482
+ height: 1rem;
483
+ margin-right: 0.75rem;
484
+ background-color: currentColor;
485
+ -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'%3E%3C/path%3E%3C/svg%3E");
486
+ mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'%3E%3C/path%3E%3C/svg%3E");
487
+ -webkit-mask-size: contain;
488
+ mask-size: contain;
489
+ -webkit-mask-repeat: no-repeat;
490
+ mask-repeat: no-repeat;
491
+ transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
492
+ opacity: 0.3;
493
+ flex-shrink: 0;
494
+ }
495
+
496
+ &[open] > .sb-dir-header::after {
497
+ transform: rotate(90deg);
498
+ opacity: 0.5;
499
+ }
500
+ }
501
+
502
+ .sb-dir-header {
503
+ list-style: none;
504
+ display: flex;
505
+ align-items: center;
506
+ outline: none;
507
+ cursor: pointer;
508
+ margin-top: 1.25rem;
509
+ border-radius: var(--radius);
510
+ transition: all 0.1s ease;
511
+ position: relative;
512
+ isolation: isolate;
513
+
514
+ &::-webkit-details-marker {
515
+ display: none;
516
+ }
517
+
518
+ &::before {
519
+ content: '';
520
+ position: absolute;
521
+ inset: 0;
522
+ border-radius: var(--radius);
523
+ z-index: -1;
524
+ transition: background-color 0.1s ease;
525
+ }
526
+
527
+ &:hover {
528
+ .nav-dir-link {
529
+ color: var(--accent);
530
+ }
531
+ &::before {
532
+ background: var(--hover-bg);
533
+ }
534
+ &::after {
535
+ opacity: 0.8;
536
+ background-color: var(--accent);
537
+ }
538
+ }
539
+ }
540
+
541
+ .nav-dir-label,
542
+ .nav-dir-link {
543
+ flex: 1;
544
+ display: block;
545
+ margin: 0;
546
+ padding: 0.35rem 0.75rem;
547
+ font-size: 0.75rem;
548
+ font-weight: 700;
549
+ text-transform: uppercase;
550
+ letter-spacing: 0.05em;
551
+ color: var(--text);
552
+ transition: all 0.1s ease;
553
+ }
554
+
555
+ .nav-dir-link {
556
+ cursor: pointer;
557
+ background: none !important;
558
+ position: static;
559
+
560
+ &::before {
561
+ display: none !important;
562
+ content: none !important;
563
+ view-transition-name: none !important;
564
+ }
565
+ }
566
+
567
+ .lang-switch select {
568
+ width: 100%;
569
+ padding: 0.5rem 0.75rem;
570
+ background: var(--surface-muted);
571
+ border: 1px solid var(--border);
572
+ border-radius: var(--radius);
573
+ color: var(--text);
574
+ font-size: 0.875rem;
575
+ font-weight: 500;
576
+ cursor: pointer;
577
+ appearance: none;
578
+ }
579
+
580
+ .sidebar-footer {
581
+ margin-top: auto;
582
+ display: flex;
583
+ align-items: center;
584
+ gap: 0.5rem;
585
+ justify-content: space-between;
586
+ flex-wrap: wrap;
587
+ flex-shrink: 0; /* Prevent footer from shrinking */
588
+ }
589
+
590
+ .lang-switch-wrapper {
591
+ flex: 1;
592
+ position: relative;
593
+ height: 2.25rem;
594
+ background: var(--surface-muted);
595
+ border: 1px solid var(--border);
596
+ border-radius: var(--radius);
597
+ transition: all 0.2s ease;
598
+ flex-grow: 1;
599
+
600
+ &:hover {
601
+ background: var(--hover-bg);
602
+ border-color: var(--muted);
603
+ }
604
+
605
+ .lang-switch-icon {
606
+ position: absolute;
607
+ left: 0.75rem;
608
+ top: 50%;
609
+ transform: translateY(-50%);
610
+ display: flex;
611
+ align-items: center;
612
+ pointer-events: none;
613
+ color: var(--text);
614
+ opacity: 0.7;
615
+ }
616
+
617
+ select {
618
+ width: 100%;
619
+ height: 100%;
620
+ padding: 0 0.75rem 0 2.25rem;
621
+ cursor: pointer;
622
+ appearance: none;
623
+ background: transparent;
624
+ border: none;
625
+ color: var(--text);
626
+ font-size: 0.875rem;
627
+ font-weight: 500;
628
+ outline: none;
629
+ }
630
+ }
631
+
632
+ .theme-switch-container {
633
+ width: 2.25rem;
634
+ height: 2.25rem;
635
+ flex-grow: 0;
636
+ }
637
+
638
+ .theme-switch-wrapper {
639
+ position: relative;
640
+ width: 2.25rem;
641
+ height: 2.25rem;
642
+ }
643
+
644
+ .theme-switch-btn {
645
+
646
+ display: flex;
647
+
648
+ align-items: center;
649
+
650
+ justify-content: center;
651
+
652
+ width: 100%;
653
+
654
+ height: 100%;
655
+
656
+ background: var(--surface-muted);
657
+
658
+ border: 1px solid var(--border);
659
+
660
+ border-radius: var(--radius);
661
+
662
+ color: var(--text);
663
+
664
+ cursor: pointer;
665
+
666
+ transition: all 0.2s ease;
667
+
668
+ position: relative;
669
+
670
+ overflow: hidden;
671
+
672
+
673
+
674
+ &:hover {
675
+
676
+ background: var(--hover-bg);
677
+
678
+ border-color: var(--muted);
679
+
680
+ }
681
+
682
+
683
+
684
+ &:active {
685
+
686
+ transform: scale(0.96);
687
+
688
+ }
689
+
690
+
691
+
692
+ svg {
693
+
694
+ opacity: 0.8;
695
+
696
+ }
697
+
698
+
699
+
700
+ span {
701
+
702
+ display: none;
703
+
704
+ }
705
+
706
+ }
707
+
708
+
709
+
710
+ .accent-circle {
711
+
712
+ width: 12px;
713
+
714
+ height: 12px;
715
+
716
+ border-radius: 50%;
717
+
718
+ background-color: var(--accent);
719
+
720
+ transition: background-color 0.2s ease;
721
+
722
+ box-shadow: 0 0 0 1px var(--surface);
723
+
724
+ }
725
+
726
+
727
+
728
+ .accent-popup {
729
+
730
+ position: absolute;
731
+
732
+ bottom: 100%;
733
+
734
+ left: 50%;
735
+
736
+ transform: translateX(-50%) translateY(10px) scale(0.95);
737
+
738
+ margin-bottom: 1rem;
739
+
740
+ background: var(--surface);
741
+
742
+ border: 1px solid var(--border);
743
+
744
+ border-radius: 12px;
745
+
746
+ padding: 0.5rem;
747
+
748
+ display: flex;
749
+
750
+ flex-direction: column;
751
+
752
+ gap: 0.25rem;
753
+
754
+ box-shadow:
755
+
756
+ 0 10px 15px -3px rgba(0, 0, 0, 0.1),
757
+
758
+ 0 4px 6px -2px rgba(0, 0, 0, 0.05),
759
+
760
+ 0 0 0 1px rgba(0,0,0,0.05);
761
+
762
+ z-index: 50;
763
+
764
+ min-width: 160px;
765
+
766
+ opacity: 0;
767
+
768
+ visibility: hidden;
769
+
770
+ transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
771
+
772
+
773
+
774
+ &.open {
775
+
776
+ opacity: 1;
777
+
778
+ visibility: visible;
779
+
780
+ transform: translateX(-50%) translateY(0) scale(1);
781
+
782
+ }
783
+
784
+
785
+
786
+ &::before {
787
+
788
+ content: '';
789
+
790
+ position: absolute;
791
+
792
+ top: 100%;
793
+
794
+ left: 50%;
795
+
796
+ transform: translateX(-50%);
797
+
798
+ border-left: 6px solid transparent;
799
+
800
+ border-right: 6px solid transparent;
801
+
802
+ border-top: 6px solid var(--border);
803
+
804
+ }
805
+
806
+
807
+
808
+ &::after {
809
+
810
+ content: '';
811
+
812
+ position: absolute;
813
+
814
+ top: 100%;
815
+
816
+ left: 50%;
817
+
818
+ transform: translateX(-50%);
819
+
820
+ border-left: 5px solid transparent;
821
+
822
+ border-right: 5px solid transparent;
823
+
824
+ border-top: 5px solid var(--surface);
825
+
826
+ margin-top: -1px;
827
+
828
+ }
829
+
830
+ }
831
+
832
+
833
+
834
+ .accent-option {
835
+
836
+ display: flex;
837
+
838
+ align-items: center;
839
+
840
+ gap: 0.75rem;
841
+
842
+ padding: 0.6rem 0.75rem;
843
+
844
+ border-radius: 8px;
845
+
846
+ cursor: pointer;
847
+
848
+ transition: all 0.15s ease;
849
+
850
+ color: var(--muted);
851
+
852
+ font-size: 0.875rem;
853
+
854
+ font-weight: 500;
855
+
856
+ white-space: nowrap;
857
+
858
+ background: transparent;
859
+
860
+ border: none;
861
+
862
+ width: 100%;
863
+
864
+ text-align: left;
865
+
866
+ position: relative;
867
+
868
+
869
+
870
+ &:hover {
871
+
872
+ background: var(--surface-muted);
873
+
874
+ color: var(--text);
875
+
876
+ }
877
+
878
+
879
+
880
+ &.active {
881
+
882
+ background: var(--accent-soft);
883
+
884
+ color: var(--accent);
885
+
886
+ }
887
+
888
+
889
+
890
+ .option-circle {
891
+
892
+ width: 10px;
893
+
894
+ height: 10px;
895
+
896
+ border-radius: 50%;
897
+
898
+ flex-shrink: 0;
899
+
900
+ box-shadow: 0 0 0 1px rgba(0,0,0,0.1);
901
+
902
+ }
903
+
904
+ }
905
+
906
+
907
+ }
908
+
909
+ .search-modal {
910
+ position: fixed;
911
+ inset: 0;
912
+ display: none;
913
+ align-items: center;
914
+ justify-content: center;
915
+ z-index: 80;
916
+
917
+ &.open {
918
+ display: flex;
919
+ }
920
+ }
921
+
922
+ .search-modal__scrim {
923
+ position: absolute;
924
+ inset: 0;
925
+ background: rgba(10, 12, 18, 0.6);
926
+ }
927
+
928
+ .search-modal__panel {
929
+ position: relative;
930
+ width: min(720px, 92vw);
931
+ max-height: 80vh;
932
+ overflow: auto;
933
+ background: var(--surface);
934
+ border: 1px solid var(--border);
935
+ border-radius: calc(var(--radius) + 2px);
936
+ padding: 1rem;
937
+ box-shadow: 0 28px 80px rgba(10, 12, 18, 0.25);
938
+ }
939
+
940
+ /* Active State for Directories (Applied from parent .is-active) */
941
+ .is-active > .sidebar-collapsible > .sb-dir-header {
942
+ .nav-dir-link {
943
+ color: var(--accent);
944
+ }
945
+ &::before {
946
+ background: var(--accent-soft);
947
+ }
948
+ }
949
+
950
+ /* --- Search UI --- */
951
+
952
+ .search-modal__panel {
953
+ display: flex;
954
+ flex-direction: column;
955
+ padding: 0;
956
+ height: 60vh;
957
+ max-height: 600px;
958
+ overflow: hidden;
959
+ }
960
+
961
+ .search-input-wrapper {
962
+ display: flex;
963
+ align-items: center;
964
+ gap: 0.75rem;
965
+ padding: 1rem;
966
+ border-bottom: 1px solid var(--border);
967
+ flex-shrink: 0;
968
+
969
+ svg {
970
+ color: var(--muted);
971
+ }
972
+ }
973
+
974
+ .search-input {
975
+ flex: 1;
976
+ background: transparent;
977
+ border: none;
978
+ font-size: 1.1rem;
979
+ color: var(--text);
980
+ outline: none;
981
+ min-width: 0;
982
+
983
+ &::placeholder {
984
+ color: var(--muted);
985
+ opacity: 0.7;
986
+ }
987
+ }
988
+
989
+ .search-results {
990
+ flex: 1;
991
+ overflow-y: auto;
992
+ padding: 0.5rem;
993
+ display: flex;
994
+ flex-direction: column;
995
+ gap: 0.25rem;
996
+
997
+ &::-webkit-scrollbar {
998
+ width: 14px;
999
+ }
1000
+
1001
+ &::-webkit-scrollbar-track {
1002
+ background: transparent;
1003
+ }
1004
+
1005
+ &::-webkit-scrollbar-thumb {
1006
+ background-color: var(--border);
1007
+ border: 4px solid transparent;
1008
+ background-clip: content-box;
1009
+ border-radius: 99px;
1010
+
1011
+ &:hover {
1012
+ background-color: var(--muted);
1013
+ }
1014
+ }
1015
+ }
1016
+
1017
+ .search-result-item {
1018
+ display: block;
1019
+ padding: 0.75rem 1rem;
1020
+ border-radius: var(--radius);
1021
+ cursor: pointer;
1022
+ border: 1px solid transparent;
1023
+ transition: all 0.1s ease;
1024
+
1025
+ &:hover, &:focus-visible, &.active {
1026
+ background: var(--surface-muted);
1027
+ border-color: var(--border);
1028
+ outline: none;
1029
+ }
1030
+ }
1031
+
1032
+ .search-result-title {
1033
+ display: flex;
1034
+ align-items: center;
1035
+ gap: 0.5rem;
1036
+ font-weight: 600;
1037
+ color: var(--accent);
1038
+ margin-bottom: 0.25rem;
1039
+ font-size: 0.95rem;
1040
+
1041
+ svg {
1042
+ color: var(--muted);
1043
+ flex-shrink: 0;
1044
+ }
1045
+ }
1046
+
1047
+ .search-result-excerpt {
1048
+ font-size: 0.85rem;
1049
+ color: var(--muted);
1050
+ line-height: 1.5;
1051
+ display: -webkit-box;
1052
+ -webkit-line-clamp: 2;
1053
+ -webkit-box-orient: vertical;
1054
+ overflow: hidden;
1055
+
1056
+ mark {
1057
+ background: transparent;
1058
+ color: var(--text);
1059
+ font-weight: 600;
1060
+ text-decoration: underline;
1061
+ text-decoration-color: var(--accent);
1062
+ text-underline-offset: 2px;
1063
+ }
1064
+ }
1065
+
1066
+ .search-status {
1067
+ padding: 2rem;
1068
+ text-align: center;
1069
+ color: var(--muted);
1070
+ font-size: 0.9rem;
1071
+ }
1072
+
1073
+ /* --- TOC --- */
1074
+
1075
+ .toc-panel {
1076
+ position: sticky;
1077
+ top: 0;
1078
+ height: 100vh;
1079
+ padding: 3rem 0;
1080
+ overflow-y: auto;
1081
+ }
1082
+
1083
+ .toc-indicator {
1084
+ position: absolute;
1085
+ left: 6px;
1086
+ width: calc(100% - 1rem);
1087
+ background-color: var(--hover-bg);
1088
+ transition:
1089
+ top 0.2s cubic-bezier(0.4, 0, 0.2, 1),
1090
+ height 0.2s cubic-bezier(0.4, 0, 0.2, 1),
1091
+ opacity 0.2s ease;
1092
+ border-radius: var(--radius);
1093
+ pointer-events: none;
1094
+
1095
+ &::before {
1096
+ content: '';
1097
+ position: absolute;
1098
+ left: 8px;
1099
+ top: 6px;
1100
+ bottom: 6px;
1101
+ width: 3px;
1102
+ background-color: var(--accent);
1103
+ border-radius: 1.5px;
1104
+ }
1105
+ }
1106
+
1107
+ .toc {
1108
+ h4 {
1109
+ margin: 0 0 1rem 0.5rem;
1110
+ font-size: 0.8rem;
1111
+ font-weight: 600;
1112
+ color: var(--text);
1113
+ display: flex;
1114
+ align-items: center;
1115
+ gap: 0.5rem;
1116
+
1117
+ &::before {
1118
+ content: '';
1119
+ display: block;
1120
+ width: 1rem;
1121
+ height: 1rem;
1122
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ededed' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='21' y1='10' x2='3' y2='10'%3E%3C/line%3E%3Cline x1='21' y1='6' x2='3' y2='6'%3E%3C/line%3E%3Cline x1='21' y1='14' x2='3' y2='14'%3E%3C/line%3E%3Cline x1='21' y1='18' x2='3' y2='18'%3E%3C/line%3E%3C/svg%3E");
1123
+ background-size: contain;
1124
+ background-repeat: no-repeat;
1125
+ opacity: 0.5;
1126
+
1127
+ @media (prefers-color-scheme: light) {
1128
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2309090b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='21' y1='10' x2='3' y2='10'%3E%3C/line%3E%3Cline x1='21' y1='6' x2='3' y2='6'%3E%3C/line%3E%3Cline x1='21' y1='14' x2='3' y2='14'%3E%3C/line%3E%3Cline x1='21' y1='18' x2='3' y2='18'%3E%3C/line%3E%3C/svg%3E");
1129
+ }
1130
+ }
1131
+ }
1132
+
1133
+ ul {
1134
+ list-style: none;
1135
+ margin: 0;
1136
+ padding: 0;
1137
+ display: flex;
1138
+ flex-direction: column;
1139
+ border-left: 1px solid var(--border);
1140
+ margin-left: 15px;
1141
+ }
1142
+
1143
+ a {
1144
+ display: block;
1145
+ padding: 0.35rem 1rem 0.35rem 1rem;
1146
+ color: var(--muted);
1147
+ font-size: 0.85rem;
1148
+ margin-left: -1px;
1149
+ transition: all 0.2s ease;
1150
+ word-break: break-word;
1151
+
1152
+ &:hover {
1153
+ color: var(--text);
1154
+ }
1155
+
1156
+ &.active {
1157
+ color: var(--accent);
1158
+ }
1159
+ }
1160
+ }
1161
+
1162
+ /* --- Main Content --- */
1163
+
1164
+ .main-content {
1165
+ padding: 3rem 0;
1166
+ min-width: 0;
1167
+
1168
+ h1 {
1169
+ font-size: 2.5rem;
1170
+ font-weight: 700;
1171
+ letter-spacing: -0.02em;
1172
+ margin-bottom: 2rem;
1173
+ color: var(--text);
1174
+ }
1175
+
1176
+ h2 {
1177
+ font-size: 1.75rem;
1178
+ font-weight: 600;
1179
+ letter-spacing: -0.01em;
1180
+ margin-top: 3rem;
1181
+ margin-bottom: 1.25rem;
1182
+ padding-bottom: 0.5rem;
1183
+ border-bottom: 1px solid var(--border);
1184
+ }
1185
+
1186
+ h3 {
1187
+ font-size: 1.25rem;
1188
+ font-weight: 600;
1189
+ margin-top: 2rem;
1190
+ margin-bottom: 1rem;
1191
+ }
1192
+
1193
+ p {
1194
+ color: var(--muted);
1195
+ margin-bottom: 1.25rem;
1196
+ font-size: 1.05rem;
1197
+ }
1198
+
1199
+ ul,
1200
+ ol {
1201
+ color: var(--muted);
1202
+ padding-left: 1.5rem;
1203
+ margin-bottom: 1.5rem;
1204
+ }
1205
+
1206
+ li {
1207
+ margin-bottom: 0.5rem;
1208
+ }
1209
+
1210
+ pre {
1211
+ background: var(--surface);
1212
+ border: 1px solid var(--border);
1213
+ border-radius: var(--radius);
1214
+ padding: 1.25rem;
1215
+ overflow-x: auto;
1216
+ margin: 0;
1217
+ white-space: pre;
1218
+ tab-size: 4;
1219
+
1220
+ code {
1221
+ white-space: pre;
1222
+ word-break: normal;
1223
+ word-wrap: normal;
1224
+ }
1225
+ }
1226
+
1227
+ .code-block-container {
1228
+ position: relative;
1229
+ margin: 1.5rem 0;
1230
+
1231
+ &:hover .copy-btn {
1232
+ opacity: 1;
1233
+ }
1234
+ }
1235
+
1236
+ .copy-btn {
1237
+ position: absolute;
1238
+ top: 0.75rem;
1239
+ right: 0.75rem;
1240
+ z-index: 10;
1241
+ display: flex;
1242
+ align-items: center;
1243
+ justify-content: center;
1244
+ width: 2.125rem;
1245
+ height: 2.125rem;
1246
+ padding: 0;
1247
+ color: var(--muted);
1248
+ background: var(--surface-elevated);
1249
+ border: 1px solid var(--border);
1250
+ border-radius: 6px;
1251
+ cursor: pointer;
1252
+ opacity: 0;
1253
+ transition: all 0.2s ease;
1254
+
1255
+ &:hover {
1256
+ color: var(--text);
1257
+ background: var(--hover-bg);
1258
+ border-color: var(--muted);
1259
+ }
1260
+
1261
+ &:active {
1262
+ transform: scale(0.95);
1263
+ }
1264
+
1265
+ svg {
1266
+ display: block;
1267
+ }
1268
+ }
1269
+
1270
+ :not(pre) > code {
1271
+ background: var(--surface-muted);
1272
+ border: 1px solid var(--border);
1273
+ border-radius: 4px;
1274
+ padding: 0.15em 0.3em;
1275
+ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
1276
+ font-size: 0.85em;
1277
+ color: var(--text);
1278
+ }
1279
+
1280
+ blockquote {
1281
+ margin: 2rem 0;
1282
+ padding: 1.25rem 1.5rem;
1283
+ padding-left: 2rem;
1284
+ background: var(--surface-muted);
1285
+ border: 1px solid var(--border);
1286
+ border-radius: var(--radius);
1287
+ color: var(--text);
1288
+ position: relative;
1289
+
1290
+ &::before {
1291
+ content: '';
1292
+ position: absolute;
1293
+ left: 0.75rem;
1294
+ top: 1.25rem;
1295
+ bottom: 1.25rem;
1296
+ width: 3px;
1297
+ background-color: var(--accent);
1298
+ border-radius: 1.5px;
1299
+ }
1300
+
1301
+ & p {
1302
+ margin: 0;
1303
+ text-autospace: normal;
1304
+ }
1305
+ }
1306
+
1307
+ a {
1308
+ color: var(--text);
1309
+ text-decoration: underline;
1310
+ text-decoration-color: var(--border);
1311
+ text-underline-offset: 4px;
1312
+
1313
+ &:hover {
1314
+ text-decoration-color: var(--accent);
1315
+ }
1316
+ }
1317
+
1318
+ h1,
1319
+ h2,
1320
+ h3,
1321
+ h4,
1322
+ h5,
1323
+ h6 {
1324
+ position: relative;
1325
+
1326
+ &:hover .heading-anchor {
1327
+ opacity: 0.5;
1328
+ }
1329
+
1330
+ .heading-anchor {
1331
+ opacity: 0;
1332
+ color: var(--muted);
1333
+ text-decoration: none !important;
1334
+ left: -0.8em;
1335
+ transition: all 0.2s;
1336
+ font-weight: 800;
1337
+ border: none;
1338
+ user-select: none;
1339
+ transform: scale(0.8);
1340
+ position: absolute;
1341
+ display: block;
1342
+
1343
+ &::before {
1344
+ content: '#';
1345
+ }
1346
+
1347
+ &:hover {
1348
+ opacity: 1;
1349
+ color: var(--accent);
1350
+ }
1351
+
1352
+ @media (max-width: 1024px) {
1353
+ display: none;
1354
+ }
1355
+ }
1356
+ }
1357
+ }
1358
+
1359
+ .page-meta {
1360
+ margin-top: 6rem;
1361
+ padding-top: 2rem;
1362
+ border-top: 1px solid var(--border);
1363
+ color: var(--muted);
1364
+ font-size: 0.85rem;
1365
+ display: flex;
1366
+ justify-content: space-between;
1367
+ align-items: center;
1368
+ flex-wrap: wrap;
1369
+ gap: 1rem;
1370
+ }
1371
+
1372
+ .page-meta-item {
1373
+ display: flex;
1374
+ align-items: center;
1375
+ }
1376
+
1377
+ .methanol-link {
1378
+ font-weight: 600;
1379
+ color: var(--text);
1380
+ text-decoration: none !important;
1381
+ margin-left: 0.25rem;
1382
+ transition: all 0.2s ease;
1383
+ border-bottom: 1px solid transparent;
1384
+
1385
+ &:hover {
1386
+ color: var(--accent);
1387
+ border-bottom-color: var(--accent);
1388
+ }
1389
+ }
1390
+
1391
+ @media (max-width: 640px) {
1392
+ .page-meta {
1393
+ flex-direction: column;
1394
+ align-items: flex-start;
1395
+ gap: 0.5rem;
1396
+ }
1397
+ }
1398
+
1399
+ .page-nav {
1400
+ display: grid;
1401
+ grid-template-columns: repeat(2, minmax(0, 1fr));
1402
+ gap: 1.5rem;
1403
+ margin-top: 4rem;
1404
+ }
1405
+
1406
+ .page-nav-spacer {
1407
+ opacity: 0;
1408
+ pointer-events: none;
1409
+ }
1410
+
1411
+ .page-nav-card {
1412
+ display: flex;
1413
+ flex-direction: column;
1414
+ gap: 0.5rem;
1415
+ padding: 1.25rem;
1416
+ border-radius: var(--radius);
1417
+ border: 1px solid var(--border);
1418
+ background: var(--surface);
1419
+ text-decoration: none !important; /* Remove global underline */
1420
+ transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
1421
+ position: relative;
1422
+ overflow: hidden;
1423
+
1424
+ &:hover {
1425
+ border-color: var(--accent);
1426
+ background: var(--surface-muted);
1427
+ transform: translateY(-2px);
1428
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
1429
+
1430
+ .page-nav-title {
1431
+ color: var(--accent);
1432
+ }
1433
+ }
1434
+ }
1435
+
1436
+ .page-nav-label {
1437
+ font-size: 0.75rem;
1438
+ font-weight: 600;
1439
+ text-transform: uppercase;
1440
+ letter-spacing: 0.05em;
1441
+ color: var(--muted);
1442
+ display: flex;
1443
+ align-items: center;
1444
+ gap: 0.5rem;
1445
+ transition: color 0.2s ease;
1446
+ }
1447
+
1448
+ .page-nav-title {
1449
+ font-size: 1rem;
1450
+ font-weight: 600;
1451
+ color: var(--text);
1452
+ text-decoration: none !important; /* Ensure title has no underline */
1453
+ transition: color 0.2s ease;
1454
+ display: -webkit-box;
1455
+ -webkit-line-clamp: 2;
1456
+ -webkit-box-orient: vertical;
1457
+ overflow: hidden;
1458
+ }
1459
+
1460
+ .page-nav-card.prev .page-nav-label::before {
1461
+ content: '←';
1462
+ font-family: system-ui;
1463
+ margin-right: 0.1rem;
1464
+ transition: transform 0.2s ease;
1465
+ }
1466
+
1467
+ .page-nav-card.next .page-nav-label::after {
1468
+ content: '→';
1469
+ font-family: system-ui;
1470
+ margin-left: 0.1rem;
1471
+ transition: transform 0.2s ease;
1472
+ }
1473
+
1474
+ .page-nav-card.next {
1475
+ text-align: right;
1476
+ align-items: flex-end;
1477
+
1478
+ .page-nav-label {
1479
+ justify-content: flex-end;
1480
+ }
1481
+ }
1482
+
1483
+ .page-nav-card:hover.prev .page-nav-label::before {
1484
+ transform: translateX(-3px);
1485
+ }
1486
+
1487
+ .page-nav-card:hover.next .page-nav-label::after {
1488
+ transform: translateX(3px);
1489
+ }
1490
+
1491
+ @media (max-width: 720px) {
1492
+ .page-nav {
1493
+ grid-template-columns: 1fr;
1494
+ gap: 1rem;
1495
+ }
1496
+
1497
+ .page-nav-card.next {
1498
+ text-align: left;
1499
+ align-items: flex-start;
1500
+
1501
+ .page-nav-label {
1502
+ flex-direction: row;
1503
+ }
1504
+
1505
+ .page-nav-label::after {
1506
+ display: none;
1507
+ }
1508
+
1509
+ .page-nav-label::before {
1510
+ content: '→';
1511
+ font-family: system-ui;
1512
+ margin-right: 0.1rem;
1513
+ transition: transform 0.2s ease;
1514
+ }
1515
+ }
1516
+ }
1517
+
1518
+ /* --- Mobile / Toggles --- */
1519
+
1520
+ .nav-toggle,
1521
+ .toc-toggle,
1522
+ .nav-scrim {
1523
+ display: none;
1524
+ }
1525
+
1526
+ .nav-toggle-label,
1527
+ .toc-toggle-label,
1528
+ .search-toggle-label {
1529
+ display: none;
1530
+ position: fixed;
1531
+ top: 1rem;
1532
+ z-index: 50;
1533
+ width: 42px;
1534
+ height: 42px;
1535
+ align-items: center;
1536
+ justify-content: center;
1537
+ background: var(--surface);
1538
+ border: 1px solid var(--border);
1539
+ border-radius: var(--radius);
1540
+ color: var(--muted);
1541
+ cursor: pointer;
1542
+ }
1543
+
1544
+ .nav-toggle-label {
1545
+ left: 1rem;
1546
+ }
1547
+
1548
+ .search-toggle-label {
1549
+ left: 4.125rem; /* 1rem + 42px (2.625rem) + 0.5rem = 4.125rem */
1550
+ }
1551
+
1552
+ .toc-toggle-label {
1553
+ right: 1rem;
1554
+ }
1555
+
1556
+ @media (max-width: 1024px) {
1557
+ .layout-container {
1558
+ &,
1559
+ &.no-toc {
1560
+ grid-template-columns: 1fr;
1561
+ padding: 4rem 1rem 0;
1562
+ }
1563
+ }
1564
+
1565
+ .sidebar,
1566
+ .toc-panel {
1567
+ position: fixed;
1568
+ top: 0;
1569
+ bottom: 0;
1570
+ width: 280px;
1571
+ background: var(--surface);
1572
+ border: 1px solid var(--border);
1573
+ z-index: 100;
1574
+ padding: 2rem 0;
1575
+ transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
1576
+ }
1577
+
1578
+ .sidebar {
1579
+ left: 0;
1580
+ transform: translateX(-100%);
1581
+ border-left: none;
1582
+ }
1583
+
1584
+ .toc-panel {
1585
+ right: 0;
1586
+ transform: translateX(100%);
1587
+ border-right: none;
1588
+ }
1589
+
1590
+ .nav-toggle-label,
1591
+ .toc-toggle-label,
1592
+ .search-toggle-label {
1593
+ display: flex;
1594
+ }
1595
+
1596
+
1597
+ .nav-scrim {
1598
+ position: fixed;
1599
+ inset: 0;
1600
+ background: rgba(0, 0, 0, 0.6);
1601
+ backdrop-filter: blur(2px);
1602
+ z-index: 90;
1603
+ opacity: 0;
1604
+ pointer-events: none;
1605
+ transition: opacity 0.3s ease;
1606
+ }
1607
+
1608
+ .nav-toggle:checked {
1609
+ ~ .nav-scrim-nav {
1610
+ display: block;
1611
+ opacity: 1;
1612
+ pointer-events: auto;
1613
+ }
1614
+ ~ .layout-container .sidebar {
1615
+ transform: translateX(0);
1616
+ }
1617
+ }
1618
+
1619
+ .toc-toggle:checked {
1620
+ ~ .nav-scrim-toc {
1621
+ display: block;
1622
+ opacity: 1;
1623
+ pointer-events: auto;
1624
+ }
1625
+ ~ .layout-container .toc-panel {
1626
+ transform: translateX(0);
1627
+ }
1628
+ }
1629
+
1630
+ .main-content {
1631
+ padding: 2rem 0;
1632
+ }
1633
+ }
1634
+
1635
+ @media (max-width: 640px) {
1636
+ .layout-container {
1637
+ padding: 4rem 0.75rem 0;
1638
+ }
1639
+
1640
+ .main-content {
1641
+ padding: 2rem 0;
1642
+
1643
+ h1 {
1644
+ font-size: 2rem;
1645
+ }
1646
+ }
1647
+ }
1648
+
1649
+ /* --- View Transitions --- */
1650
+
1651
+ @view-transition {
1652
+ navigation: auto;
1653
+ }
1654
+
1655
+ /* Assign the view-transition-name to the active background only */
1656
+ .sidebar a.active::before,
1657
+ .is-active > .sidebar-collapsible > .sb-dir-header::before {
1658
+ view-transition-name: active-sidebar-bg;
1659
+ contain: layout paint;
1660
+ }