rdoc 6.15.1 → 6.16.0

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. checksums.yaml +4 -4
  2. data/History.rdoc +1 -1
  3. data/lib/rdoc/code_object/top_level.rb +18 -17
  4. data/lib/rdoc/comment.rb +190 -8
  5. data/lib/rdoc/generator/aliki.rb +42 -0
  6. data/lib/rdoc/generator/template/aliki/_aside_toc.rhtml +8 -0
  7. data/lib/rdoc/generator/template/aliki/_footer.rhtml +23 -0
  8. data/lib/rdoc/generator/template/aliki/_head.rhtml +91 -0
  9. data/lib/rdoc/generator/template/aliki/_header.rhtml +56 -0
  10. data/lib/rdoc/generator/template/aliki/_sidebar_ancestors.rhtml +6 -0
  11. data/lib/rdoc/generator/template/aliki/_sidebar_classes.rhtml +5 -0
  12. data/lib/rdoc/generator/template/aliki/_sidebar_extends.rhtml +15 -0
  13. data/lib/rdoc/generator/template/aliki/_sidebar_includes.rhtml +15 -0
  14. data/lib/rdoc/generator/template/aliki/_sidebar_installed.rhtml +16 -0
  15. data/lib/rdoc/generator/template/aliki/_sidebar_methods.rhtml +21 -0
  16. data/lib/rdoc/generator/template/aliki/_sidebar_pages.rhtml +37 -0
  17. data/lib/rdoc/generator/template/aliki/_sidebar_search.rhtml +15 -0
  18. data/lib/rdoc/generator/template/aliki/_sidebar_sections.rhtml +11 -0
  19. data/lib/rdoc/generator/template/aliki/_sidebar_toggle.rhtml +3 -0
  20. data/lib/rdoc/generator/template/aliki/class.rhtml +219 -0
  21. data/lib/rdoc/generator/template/aliki/css/rdoc.css +1612 -0
  22. data/lib/rdoc/generator/template/aliki/index.rhtml +21 -0
  23. data/lib/rdoc/generator/template/aliki/js/aliki.js +483 -0
  24. data/lib/rdoc/generator/template/aliki/js/c_highlighter.js +299 -0
  25. data/lib/rdoc/generator/template/aliki/js/search.js +120 -0
  26. data/lib/rdoc/generator/template/aliki/js/theme-toggle.js +112 -0
  27. data/lib/rdoc/generator/template/aliki/page.rhtml +17 -0
  28. data/lib/rdoc/generator/template/aliki/servlet_not_found.rhtml +14 -0
  29. data/lib/rdoc/generator/template/aliki/servlet_root.rhtml +65 -0
  30. data/lib/rdoc/generator/template/darkfish/_head.rhtml +2 -7
  31. data/lib/rdoc/generator/template/darkfish/_sidebar_search.rhtml +1 -0
  32. data/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml +1 -1
  33. data/lib/rdoc/generator/template/json_index/js/searcher.js +5 -1
  34. data/lib/rdoc/generator.rb +1 -0
  35. data/lib/rdoc/markup/pre_process.rb +34 -10
  36. data/lib/rdoc/markup/to_html.rb +6 -4
  37. data/lib/rdoc/options.rb +21 -10
  38. data/lib/rdoc/parser/c.rb +15 -46
  39. data/lib/rdoc/parser/prism_ruby.rb +121 -113
  40. data/lib/rdoc/parser/ruby.rb +8 -8
  41. data/lib/rdoc/parser/ruby_tools.rb +5 -7
  42. data/lib/rdoc/parser/simple.rb +4 -21
  43. data/lib/rdoc/rdoc.rb +1 -0
  44. data/lib/rdoc/text.rb +1 -1
  45. data/lib/rdoc/token_stream.rb +13 -1
  46. data/lib/rdoc/tom_doc.rb +1 -1
  47. data/lib/rdoc/version.rb +1 -1
  48. metadata +27 -2
@@ -0,0 +1,1612 @@
1
+ /*
2
+ * Aliki Theme Stylesheet
3
+ * Modern RDoc theme by Stan Lo
4
+ *
5
+ * Features:
6
+ * - Three-column responsive layout (navigation, content, table of contents)
7
+ * - Dark mode support with localStorage persistence
8
+ * - Auto-generated right sidebar TOC with scroll spy
9
+ * - Mobile-optimized search modal
10
+ * - Enhanced syntax highlighting for both light and dark themes
11
+ * - Code-copying functionality
12
+ */
13
+
14
+ /* 1. Design System - CSS Variables and Tokens */
15
+
16
+ /* Light Theme (Default) */
17
+ :root {
18
+ /* Color Palette - Primary */
19
+ --color-primary-50: #fdeae9;
20
+ --color-primary-100: #fadad3;
21
+ --color-primary-200: #f8bfbd;
22
+ --color-primary-300: #f5a9a7;
23
+ --color-primary-400: #f07f7b;
24
+ --color-primary-500: #eb544f;
25
+ --color-primary-600: #e62923;
26
+ --color-primary-700: #b8211c;
27
+ --color-primary-800: #8a1915;
28
+ --color-primary-900: #5c100e;
29
+
30
+ /* Color Palette - Neutral */
31
+ --color-neutral-50: #fafaf9;
32
+ --color-neutral-100: #f5f5f4;
33
+ --color-neutral-200: #e7e5e4;
34
+ --color-neutral-300: #d6d3d1;
35
+ --color-neutral-400: #a8a29e;
36
+ --color-neutral-500: #78716c;
37
+ --color-neutral-600: #57534e;
38
+ --color-neutral-700: #44403c;
39
+ --color-neutral-800: #292524;
40
+ --color-neutral-900: #1c1917;
41
+
42
+ /* Code highlighting colors */
43
+ --code-blue: #1d4ed8;
44
+ --code-green: #047857;
45
+ --code-orange: #d97706;
46
+ --code-purple: #7e22ce;
47
+ --code-red: #dc2626;
48
+
49
+ /* C syntax highlighting */
50
+ --c-keyword: #b91c1c;
51
+ --c-type: #0891b2;
52
+ --c-macro: #ea580c;
53
+ --c-function: #7c3aed;
54
+ --c-identifier: #475569;
55
+ --c-operator: #059669;
56
+ --c-preprocessor: #a21caf;
57
+ --c-value: #92400e;
58
+ --c-string: #15803d;
59
+ --c-comment: #78716c;
60
+
61
+ /* Color Palette - Green (for success states) */
62
+ --color-green-400: #4ade80;
63
+ --color-green-500: #22c55e;
64
+ --color-green-600: #16a34a;
65
+
66
+ /* Semantic Colors - Light Theme */
67
+ --color-text-primary: var(--color-neutral-900);
68
+ --color-text-secondary: var(--color-neutral-600);
69
+ --color-text-tertiary: var(--color-neutral-500);
70
+ --color-background-primary: #fff;
71
+ --color-background-secondary: var(--color-neutral-50);
72
+ --color-background-tertiary: var(--color-neutral-100);
73
+ --color-border-default: var(--color-neutral-300);
74
+ --color-border-subtle: var(--color-neutral-200);
75
+ --color-border-emphasis: var(--color-neutral-400);
76
+ --color-link-default: var(--color-text-primary);
77
+ --color-link-hover: var(--color-primary-600);
78
+ --color-accent-primary: var(--color-primary-600);
79
+ --color-accent-hover: var(--color-primary-700);
80
+ --color-accent-subtle: var(--color-primary-50);
81
+ --color-code-bg: #f6f8fa;
82
+ --color-code-border: var(--color-neutral-300);
83
+ --color-nav-bg: #fff;
84
+ --color-nav-text: var(--color-neutral-700);
85
+ --color-th-background: var(--color-neutral-100);
86
+ --color-td-background: var(--color-neutral-50);
87
+
88
+ /* RGBA Colors (theme-agnostic) */
89
+ --color-overlay: rgb(0 0 0 / 50%);
90
+ --color-emphasis-bg: rgb(255 111 97 / 10%);
91
+ --color-emphasis-decoration: rgb(52 48 64 / 25%);
92
+ --color-search-highlight-bg: rgb(224 108 117 / 10%);
93
+ --color-success-bg: rgb(34 197 94 / 10%);
94
+
95
+ /* Typography Scale */
96
+ --font-size-xs: 0.75rem; /* 12px */
97
+ --font-size-sm: 0.875rem; /* 14px */
98
+ --font-size-base: 1rem; /* 16px */
99
+ --font-size-lg: 1.125rem; /* 18px */
100
+ --font-size-xl: 1.25rem; /* 20px */
101
+ --font-size-2xl: 1.5rem; /* 24px */
102
+ --font-size-3xl: 1.875rem; /* 30px */
103
+ --font-size-4xl: 2.25rem; /* 36px */
104
+ --font-size-5xl: 3rem; /* 48px */
105
+
106
+ /* Font Families */
107
+ --font-family-base: -apple-system, blinkmacsystemfont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Helvetica Neue', sans-serif;
108
+ --font-family-heading: var(--font-family-base);
109
+ --font-family-mono: ui-monospace, 'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', monospace;
110
+
111
+ /* Font Weights */
112
+ --font-weight-normal: 400;
113
+ --font-weight-medium: 500;
114
+ --font-weight-semibold: 600;
115
+ --font-weight-bold: 700;
116
+
117
+ /* Font Shortcuts */
118
+ --font-primary: var(--font-family-base);
119
+ --font-heading: var(--font-family-heading);
120
+ --font-code: var(--font-family-mono);
121
+
122
+ /* Line Heights */
123
+ --line-height-tight: 1.25;
124
+ --line-height-normal: 1.5;
125
+ --line-height-relaxed: 1.625;
126
+
127
+ /* Spacing Scale */
128
+ --space-1: 0.25rem; /* 4px */
129
+ --space-2: 0.5rem; /* 8px */
130
+ --space-3: 0.75rem; /* 12px */
131
+ --space-4: 1rem; /* 16px */
132
+ --space-5: 1.25rem; /* 20px */
133
+ --space-6: 1.5rem; /* 24px */
134
+ --space-8: 2rem; /* 32px */
135
+ --space-12: 3rem; /* 48px */
136
+ --space-16: 4rem; /* 64px */
137
+
138
+ /* Border Radius */
139
+ --radius-sm: 0.25rem; /* 4px */
140
+ --radius-md: 0.375rem; /* 6px */
141
+ --radius-lg: 0.5rem; /* 8px */
142
+
143
+ /* Shadows */
144
+ --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 10%), 0 1px 2px -1px rgb(0 0 0 / 10%);
145
+ --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 10%), 0 4px 6px -4px rgb(0 0 0 / 10%);
146
+ --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 10%), 0 8px 10px -6px rgb(0 0 0 / 10%);
147
+
148
+ /* Layout Dimensions */
149
+ --layout-sidebar-width: 280px;
150
+ --layout-sidebar-width-min: 240px;
151
+ --layout-sidebar-width-max: 15%;
152
+ --layout-toc-width-min: 240px;
153
+ --layout-toc-width-max: 18%;
154
+ --layout-content-max-width: 800px;
155
+ --layout-header-height: 64px;
156
+ --layout-search-width: 400px;
157
+
158
+ /* Transitions */
159
+ --transition-fast: 150ms ease-in-out;
160
+ --transition-base: 200ms ease-in-out;
161
+
162
+ /* Z-Index Scale */
163
+ --z-fixed: 300;
164
+ --z-modal: 400;
165
+ --z-popover: 500;
166
+
167
+ }
168
+
169
+ /* Dark Theme */
170
+ [data-theme="dark"] {
171
+ /* Code highlighting colors */
172
+ --code-blue: #93c5fd;
173
+ --code-green: #34d399;
174
+ --code-orange: #fbbf24;
175
+ --code-purple: #c084fc;
176
+ --code-red: #f87171;
177
+
178
+ /* C syntax highlighting */
179
+ --c-keyword: #f87171;
180
+ --c-type: #22d3ee;
181
+ --c-macro: #fb923c;
182
+ --c-function: #a78bfa;
183
+ --c-identifier: #94a3b8;
184
+ --c-operator: #6ee7b7;
185
+ --c-preprocessor: #e879f9;
186
+ --c-value: #fcd34d;
187
+ --c-string: #4ade80;
188
+ --c-comment: #a8a29e;
189
+
190
+ /* Semantic Colors - Dark Theme */
191
+ --color-text-primary: var(--color-neutral-50);
192
+ --color-text-secondary: var(--color-neutral-200);
193
+ --color-text-tertiary: var(--color-neutral-400);
194
+ --color-background-primary: var(--color-neutral-900);
195
+ --color-background-secondary: var(--color-neutral-800);
196
+ --color-background-tertiary: var(--color-neutral-700);
197
+ --color-border-default: var(--color-neutral-600);
198
+ --color-border-subtle: var(--color-neutral-700);
199
+ --color-border-emphasis: var(--color-neutral-300);
200
+ --color-link-default: var(--color-neutral-50);
201
+ --color-link-hover: var(--color-primary-500);
202
+ --color-accent-primary: var(--color-primary-500);
203
+ --color-accent-hover: var(--color-primary-400);
204
+ --color-accent-subtle: rgb(235 84 79 / 10%);
205
+ --color-code-bg: var(--color-neutral-800);
206
+ --color-code-border: var(--color-neutral-700);
207
+ --color-nav-bg: var(--color-neutral-900);
208
+ --color-nav-text: var(--color-neutral-50);
209
+ --color-th-background: var(--color-background-tertiary);
210
+ --color-td-background: var(--color-background-secondary);
211
+
212
+ /* Dark theme shadows (slightly more subtle) */
213
+ --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 40%), 0 1px 2px -1px rgb(0 0 0 / 40%);
214
+ --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 40%), 0 4px 6px -4px rgb(0 0 0 / 40%);
215
+ --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 40%), 0 8px 10px -6px rgb(0 0 0 / 40%);
216
+
217
+ }
218
+
219
+ /* 2. Global Styles & Layout */
220
+ body {
221
+ background: var(--color-background-primary);
222
+ font-family: var(--font-primary);
223
+ font-weight: 400;
224
+ color: var(--color-text-primary);
225
+ line-height: var(--line-height-relaxed);
226
+ margin: 0;
227
+ overflow-wrap: break-word; /* Avoid overflow on mobile */
228
+
229
+ /* Grid layout with header, sidebar, main, and footer */
230
+ display: grid;
231
+ grid-template: "header header" var(--layout-header-height) "nav main" 1fr "nav footer" auto / minmax(var(--layout-sidebar-width-min), var(--layout-sidebar-width-max)) 1fr;
232
+ min-height: 100vh;
233
+ }
234
+
235
+ /* Three-column layout when TOC is present */
236
+ body.has-toc {
237
+ grid-template: "header header header" var(--layout-header-height) "nav main toc" 1fr "nav footer toc" auto / minmax(var(--layout-sidebar-width-min), var(--layout-sidebar-width-max)) 1fr minmax(var(--layout-toc-width-min), var(--layout-toc-width-max));
238
+ min-height: 100vh;
239
+ }
240
+
241
+ /* Mobile: stack everything vertically */
242
+ @media (width <= 1023px) {
243
+ body,
244
+ body.has-toc {
245
+ display: flex;
246
+ flex-direction: column;
247
+ grid-template: none;
248
+ }
249
+ }
250
+
251
+ /* 3. Typography */
252
+
253
+ /* 4. Links */
254
+ a {
255
+ color: var(--color-link-default);
256
+ transition: color var(--transition-base);
257
+ text-decoration: underline;
258
+ text-underline-offset: 0.2em; /* Make sure it doesn't overlap with underscores in a method name. */
259
+ }
260
+
261
+ /* 5. Code and Pre */
262
+
263
+ /* Code blocks */
264
+ pre {
265
+ font-family: var(--font-code);
266
+ background-color: var(--color-code-bg);
267
+ border: 1px solid var(--color-code-border);
268
+ border-radius: var(--radius-md);
269
+ padding: var(--space-4);
270
+ overflow-x: auto;
271
+ font-size: var(--font-size-sm);
272
+ line-height: var(--line-height-normal);
273
+ margin: var(--space-4) 0;
274
+ position: relative;
275
+ }
276
+
277
+ /* Code block wrapper for copy button */
278
+ .code-block-wrapper {
279
+ position: relative;
280
+ margin: var(--space-4) 0;
281
+ }
282
+
283
+ /* Copy button styling */
284
+ .copy-code-button {
285
+ position: absolute;
286
+ top: var(--space-2);
287
+ right: var(--space-2);
288
+ padding: var(--space-2);
289
+ background: var(--color-background-secondary);
290
+ border: 1px solid var(--color-border-default);
291
+ border-radius: var(--radius-sm);
292
+ cursor: pointer;
293
+ opacity: 0.6;
294
+ transition: opacity var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
295
+ display: flex;
296
+ align-items: center;
297
+ justify-content: center;
298
+ width: 2rem;
299
+ height: 2rem;
300
+ z-index: 10;
301
+ }
302
+
303
+ .copy-code-button:hover,
304
+ .copy-code-button:focus {
305
+ opacity: 1;
306
+ background: var(--color-background-tertiary);
307
+ border-color: var(--color-border-emphasis);
308
+ }
309
+
310
+ .copy-code-button:active {
311
+ transform: scale(0.95);
312
+ }
313
+
314
+ .copy-code-button svg {
315
+ width: 1rem;
316
+ height: 1rem;
317
+ fill: none;
318
+ stroke: currentcolor;
319
+ stroke-width: 2;
320
+ stroke-linecap: round;
321
+ stroke-linejoin: round;
322
+ color: var(--color-text-secondary);
323
+ transition: color var(--transition-fast);
324
+ }
325
+
326
+ .copy-code-button:hover svg {
327
+ color: var(--color-text-primary);
328
+ }
329
+
330
+ /* Copied state - subtle green checkmark */
331
+ .copy-code-button.copied {
332
+ background: var(--color-success-bg);
333
+ border-color: var(--color-green-500);
334
+ opacity: 1;
335
+ }
336
+
337
+ .copy-code-button.copied svg {
338
+ color: var(--color-green-600);
339
+ }
340
+
341
+ [data-theme="dark"] .copy-code-button.copied {
342
+ border-color: var(--color-green-400);
343
+ }
344
+
345
+ [data-theme="dark"] .copy-code-button.copied svg {
346
+ color: var(--color-green-400);
347
+ }
348
+
349
+ /* Mobile adjustments */
350
+ @media (hover: none) {
351
+ .copy-code-button {
352
+ opacity: 0.7;
353
+ }
354
+
355
+ .copy-code-button:active {
356
+ opacity: 1;
357
+ }
358
+ }
359
+
360
+ /* Inline code */
361
+ code {
362
+ font-family: var(--font-code);
363
+ background-color: var(--color-code-bg);
364
+ border: 1px solid var(--color-border-subtle);
365
+ padding: 0.125rem 0.375rem;
366
+ border-radius: var(--radius-sm);
367
+ font-size: 0.9em;
368
+ }
369
+
370
+ pre code {
371
+ background: none;
372
+ border: none;
373
+ padding: 0;
374
+ font-size: inherit;
375
+ }
376
+
377
+ a code:hover {
378
+ color: var(--color-link-hover);
379
+ }
380
+
381
+ /* Tables */
382
+ table {
383
+ margin: 0;
384
+ border-spacing: 0;
385
+ border-collapse: collapse;
386
+ }
387
+
388
+ table tr th, table tr td {
389
+ padding: 0.2em 0.4em;
390
+ border: 1px solid var(--color-border-default);
391
+ }
392
+
393
+ table tr th {
394
+ background-color: var(--color-th-background);
395
+ }
396
+
397
+ table tr:nth-child(even) td {
398
+ background-color: var(--color-td-background);
399
+ }
400
+
401
+ /* 6. Header (Top Navbar) */
402
+ header.top-navbar {
403
+ grid-area: header;
404
+ position: sticky;
405
+ top: 0;
406
+ z-index: var(--z-fixed);
407
+ background: var(--color-background-primary);
408
+ border-bottom: 1px solid var(--color-border-default);
409
+ display: flex;
410
+ align-items: center;
411
+ justify-content: flex-start;
412
+ padding: 0 var(--space-6);
413
+ gap: var(--space-8);
414
+ height: var(--layout-header-height);
415
+ box-shadow: var(--shadow-sm);
416
+ }
417
+
418
+ header.top-navbar .navbar-brand {
419
+ font-size: var(--font-size-xl);
420
+ font-weight: var(--font-weight-semibold);
421
+ color: var(--color-text-primary);
422
+ text-decoration: none;
423
+ white-space: nowrap;
424
+ }
425
+
426
+ header.top-navbar .navbar-brand:hover {
427
+ color: var(--color-accent-primary);
428
+ }
429
+
430
+ header.top-navbar .navbar-search {
431
+ position: relative;
432
+ flex: 0 1 auto;
433
+ width: var(--layout-search-width);
434
+ }
435
+
436
+ header.top-navbar .navbar-search form {
437
+ margin: 0;
438
+ padding: 0;
439
+ }
440
+
441
+
442
+
443
+ /* Mobile search icon button (hidden on desktop) */
444
+ .navbar-search-mobile {
445
+ display: none;
446
+ }
447
+
448
+ /* Theme toggle button */
449
+ .theme-toggle {
450
+ display: flex;
451
+ align-items: center;
452
+ justify-content: center;
453
+ padding: var(--space-2);
454
+ margin-left: auto;
455
+ background: transparent;
456
+ border: 1px solid var(--color-border-default);
457
+ border-radius: var(--radius-md);
458
+ color: var(--color-text-primary);
459
+ cursor: pointer;
460
+ transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
461
+ font-size: var(--font-size-lg);
462
+ line-height: 1;
463
+ width: 2.5rem;
464
+ height: 2.5rem;
465
+ }
466
+
467
+ .theme-toggle:hover {
468
+ background: var(--color-background-secondary);
469
+ border-color: var(--color-accent-primary);
470
+ color: var(--color-accent-primary);
471
+ }
472
+
473
+ .theme-toggle:focus {
474
+ outline: none;
475
+ border-color: var(--color-accent-primary);
476
+ box-shadow: 0 0 0 3px var(--color-accent-subtle);
477
+ }
478
+
479
+ .theme-toggle-icon {
480
+ display: inline-block;
481
+ transition: transform var(--transition-base);
482
+ }
483
+
484
+ .theme-toggle:hover .theme-toggle-icon {
485
+ transform: rotate(20deg);
486
+ }
487
+
488
+ /* Mobile navbar */
489
+ @media (width <= 1023px) {
490
+ header.top-navbar {
491
+ display: flex;
492
+ align-items: center;
493
+ padding: 0 var(--space-4);
494
+ gap: var(--space-4);
495
+ }
496
+
497
+ /* Hide desktop search bar on mobile */
498
+ header.top-navbar .navbar-search-desktop {
499
+ display: none;
500
+ }
501
+
502
+ /* Show mobile search icon */
503
+ .navbar-search-mobile {
504
+ display: flex;
505
+ align-items: center;
506
+ justify-content: center;
507
+ padding: 0.5rem;
508
+ background: transparent;
509
+ border: none;
510
+ font-size: 1.25rem;
511
+ color: var(--color-text-primary);
512
+ cursor: pointer;
513
+ transition: color var(--transition-fast);
514
+ }
515
+
516
+ .navbar-search-mobile:hover {
517
+ color: var(--color-accent-primary);
518
+ }
519
+
520
+ /* Brand needs left margin for hamburger button */
521
+ header.top-navbar .navbar-brand {
522
+ margin-left: 2.5rem;
523
+ flex: 1;
524
+ font-size: var(--font-size-lg);
525
+ overflow: hidden;
526
+ text-overflow: ellipsis;
527
+ white-space: nowrap;
528
+ }
529
+ }
530
+
531
+ /* 7. Navigation (Left Sidebar) */
532
+ nav {
533
+ grid-area: nav;
534
+ font-family: var(--font-heading);
535
+ font-size: var(--font-size-base);
536
+ border-right: 1px solid var(--color-border-default);
537
+ background: var(--color-nav-bg);
538
+ color: var(--color-nav-text);
539
+ overflow: hidden auto;
540
+ display: flex;
541
+ flex-direction: column;
542
+ position: sticky;
543
+ top: var(--layout-header-height);
544
+ height: calc(100vh - var(--layout-header-height));
545
+ align-self: start;
546
+ }
547
+
548
+ /* Mobile navigation */
549
+ @media (width <= 1023px) {
550
+ nav {
551
+ position: fixed;
552
+ top: var(--layout-header-height);
553
+ bottom: 0;
554
+ left: 0;
555
+ width: var(--layout-sidebar-width);
556
+ z-index: calc(var(--z-fixed) - 10); /* Below header */
557
+ box-shadow: var(--shadow-lg);
558
+
559
+ /* Don't set height - let top/bottom define it */
560
+ }
561
+
562
+ nav[hidden] {
563
+ display: none;
564
+ }
565
+
566
+ /* Backdrop for mobile nav */
567
+ body::before {
568
+ content: '';
569
+ position: fixed;
570
+ inset: var(--layout-header-height) 0 0 0;
571
+ background: var(--color-overlay);
572
+ z-index: calc(var(--z-fixed) - 20);
573
+ opacity: 0;
574
+ pointer-events: none;
575
+ transition: opacity var(--transition-base);
576
+ }
577
+
578
+ /* Show backdrop when nav is open */
579
+ body.nav-open::before {
580
+ opacity: 1;
581
+ pointer-events: auto;
582
+ }
583
+ }
584
+
585
+ /* Desktop: hide nav when [hidden] attribute is set */
586
+ @media (width >= 1024px) {
587
+ nav[hidden] {
588
+ display: none;
589
+ }
590
+ }
591
+
592
+ nav .nav-section {
593
+ margin-top: var(--space-6);
594
+ padding: 0 var(--space-6);
595
+ }
596
+
597
+ nav h2, nav h3 {
598
+ font-size: var(--font-size-lg);
599
+ font-weight: var(--font-weight-semibold);
600
+ margin: 0 0 var(--space-4);
601
+ padding: var(--space-2) 0;
602
+ color: var(--color-accent-primary);
603
+ border-bottom: 1px solid var(--color-border-default);
604
+ }
605
+
606
+ nav ul,
607
+ nav dl,
608
+ nav p {
609
+ padding: 0;
610
+ list-style: none;
611
+ margin: var(--space-3) 0;
612
+ }
613
+
614
+ nav ul li {
615
+ margin-bottom: var(--space-2);
616
+ line-height: var(--line-height-relaxed);
617
+ }
618
+
619
+ nav ul ul {
620
+ padding-left: var(--space-5);
621
+ margin-top: var(--space-2);
622
+ }
623
+
624
+ nav ul ul ul {
625
+ padding-left: var(--space-5);
626
+ }
627
+
628
+ nav ul ul ul ul {
629
+ padding-left: var(--space-5);
630
+ }
631
+
632
+ nav a {
633
+ text-decoration: none;
634
+ }
635
+
636
+ nav footer {
637
+ padding: var(--space-4);
638
+ border-top: 1px solid var(--color-border-default);
639
+ }
640
+
641
+ nav footer a {
642
+ color: var(--color-accent-hover);
643
+ }
644
+
645
+ #navigation-toggle {
646
+ display: none; /* Hidden by default, shown on mobile */
647
+ }
648
+
649
+ /* Mobile toggle button */
650
+ @media (width <= 1023px) {
651
+ #navigation-toggle {
652
+ display: flex;
653
+ align-items: center;
654
+ justify-content: center;
655
+ position: fixed;
656
+ top: calc(var(--layout-header-height) / 2);
657
+ transform: translateY(-50%);
658
+ left: 1rem;
659
+ z-index: var(--z-fixed);
660
+ font-size: 1.5rem;
661
+ background: transparent;
662
+ border: none;
663
+ color: var(--color-text-primary);
664
+ cursor: pointer;
665
+ transition: color var(--transition-fast);
666
+ line-height: 1;
667
+ }
668
+
669
+ #navigation-toggle:hover {
670
+ color: var(--color-accent-primary);
671
+ }
672
+ }
673
+
674
+ nav ul li details > summary {
675
+ list-style: none; /* Remove the default marker */
676
+ position: relative; /* So that the open/close triangle can position itself absolutely inside */
677
+ }
678
+
679
+ nav ul li details > summary::-webkit-details-marker {
680
+ display: none; /* Removes the default marker, in Safari 18. */
681
+ }
682
+
683
+ nav ul li details > summary::after {
684
+ content: '▶'; /* Unicode right-pointing triangle */
685
+ position: absolute;
686
+ font-size: 0.8em;
687
+ bottom: 0.1em;
688
+ margin-left: 0.3em;
689
+ transition: transform var(--transition-base);
690
+ }
691
+
692
+ nav ul li details[open] > summary::after {
693
+ transform: rotate(90deg); /* Rotate the triangle when open */
694
+ }
695
+
696
+ /* Global link hover state is defined after navigation to keep specificity ordering */
697
+ a:hover {
698
+ color: var(--color-link-hover);
699
+ }
700
+
701
+ /* 8. Main Content (Center Column) */
702
+ main {
703
+ grid-area: main;
704
+ width: 100%;
705
+ max-width: var(--layout-content-max-width);
706
+ margin: 0 auto;
707
+ padding: var(--space-12) var(--space-8);
708
+ font-size: var(--font-size-base);
709
+ line-height: var(--line-height-relaxed);
710
+ color: var(--color-text-primary);
711
+ box-sizing: border-box;
712
+ }
713
+
714
+ /* Desktop: hide hamburger */
715
+ @media (width >= 1024px) {
716
+ #navigation-toggle {
717
+ display: none;
718
+ }
719
+ }
720
+
721
+ /* Mobile: full width with padding */
722
+ @media (width <= 1023px) {
723
+ main {
724
+ padding: var(--space-6) var(--space-4);
725
+ padding-top: var(--space-8);
726
+ width: 100%;
727
+ }
728
+
729
+ footer.site-footer {
730
+ padding: var(--space-8) var(--space-4);
731
+ }
732
+
733
+ footer.site-footer .footer-content {
734
+ grid-template-columns: 1fr;
735
+ gap: var(--space-6);
736
+ }
737
+ }
738
+
739
+ main h1[class] {
740
+ margin-top: 0;
741
+ margin-bottom: 1em;
742
+ font-size: 2.5em;
743
+ color: var(--color-accent-primary);
744
+ }
745
+
746
+ main h1,
747
+ main h2,
748
+ main h3,
749
+ main h4,
750
+ main h5,
751
+ main h6 {
752
+ font-family: var(--font-heading);
753
+ color: var(--color-accent-primary);
754
+ scroll-margin-top: calc(var(--layout-header-height) + 2rem);
755
+ }
756
+
757
+ /* Heading size hierarchy */
758
+ main h1 {
759
+ font-size: var(--font-size-3xl);
760
+ font-weight: var(--font-weight-bold);
761
+ margin-bottom: var(--space-4);
762
+ line-height: var(--line-height-tight);
763
+ }
764
+
765
+ main h2 {
766
+ font-size: var(--font-size-2xl);
767
+ font-weight: var(--font-weight-semibold);
768
+ margin-top: var(--space-8);
769
+ margin-bottom: var(--space-4);
770
+ line-height: var(--line-height-tight);
771
+ }
772
+
773
+ main h3 {
774
+ font-size: var(--font-size-xl);
775
+ font-weight: var(--font-weight-semibold);
776
+ margin-top: var(--space-6);
777
+ margin-bottom: var(--space-3);
778
+ line-height: var(--line-height-tight);
779
+ }
780
+
781
+ main h4 {
782
+ font-size: var(--font-size-lg);
783
+ font-weight: var(--font-weight-medium);
784
+ margin-top: var(--space-4);
785
+ margin-bottom: var(--space-2);
786
+ }
787
+
788
+ main h5, main h6 {
789
+ font-size: var(--font-size-base);
790
+ font-weight: var(--font-weight-medium);
791
+ margin-top: var(--space-3);
792
+ margin-bottom: var(--space-2);
793
+ }
794
+
795
+ /* Heading links */
796
+ main h1 a,
797
+ main h2 a,
798
+ main h3 a,
799
+ main h4 a,
800
+ main h5 a,
801
+ main h6 a {
802
+ color: inherit;
803
+ text-decoration: none;
804
+ }
805
+
806
+ main h1 a:hover,
807
+ main h2 a:hover,
808
+ main h3 a:hover,
809
+ main h4 a:hover,
810
+ main h5 a:hover,
811
+ main h6 a:hover {
812
+ text-decoration: underline;
813
+ }
814
+
815
+ /* Syntax Highlighting - Light Theme */
816
+ .ruby-constant { color: var(--code-orange); }
817
+ .ruby-keyword { color: var(--code-red); }
818
+ .ruby-ivar { color: var(--code-orange); }
819
+ .ruby-operator { color: var(--code-green); }
820
+ .ruby-identifier { color: var(--code-blue); }
821
+ .ruby-node { color: var(--code-purple); }
822
+
823
+ .ruby-comment {
824
+ color: var(--color-neutral-500);
825
+ font-style: italic;
826
+ }
827
+ .ruby-regexp { color: var(--code-purple); }
828
+ .ruby-value { color: var(--code-orange); }
829
+ .ruby-string { color: var(--code-green); }
830
+
831
+ /* Syntax Highlighting - Dark Theme */
832
+ [data-theme="dark"] .ruby-constant { color: var(--code-orange); }
833
+ [data-theme="dark"] .ruby-keyword { color: var(--code-red); }
834
+ [data-theme="dark"] .ruby-ivar { color: var(--code-orange); }
835
+ [data-theme="dark"] .ruby-operator { color: var(--code-green); }
836
+ [data-theme="dark"] .ruby-identifier { color: var(--code-blue); }
837
+ [data-theme="dark"] .ruby-node { color: var(--code-purple); }
838
+
839
+ [data-theme="dark"] .ruby-comment {
840
+ color: var(--color-neutral-400);
841
+ font-style: italic;
842
+ }
843
+ [data-theme="dark"] .ruby-regexp { color: var(--code-purple); }
844
+ [data-theme="dark"] .ruby-value { color: var(--code-orange); }
845
+ [data-theme="dark"] .ruby-string { color: var(--code-green); }
846
+
847
+ /* C Syntax Highlighting */
848
+ .c-keyword { color: var(--c-keyword); }
849
+ .c-type { color: var(--c-type); }
850
+ .c-macro { color: var(--c-macro); }
851
+ .c-function { color: var(--c-function); }
852
+ .c-identifier { color: var(--c-identifier); }
853
+ .c-operator { color: var(--c-operator); }
854
+ .c-preprocessor { color: var(--c-preprocessor); }
855
+ .c-value { color: var(--c-value); }
856
+ .c-string { color: var(--c-string); }
857
+
858
+ .c-comment {
859
+ color: var(--c-comment);
860
+ font-style: italic;
861
+ }
862
+
863
+ /* Emphasis */
864
+ em {
865
+ text-decoration-color: var(--color-emphasis-decoration);
866
+ text-decoration-line: underline;
867
+ text-decoration-style: dotted;
868
+ }
869
+
870
+ strong,
871
+ em {
872
+ color: var(--color-accent-primary);
873
+ background-color: var(--color-emphasis-bg);
874
+ }
875
+
876
+ /* Paragraphs */
877
+ main p {
878
+ line-height: var(--line-height-relaxed);
879
+ font-weight: 400;
880
+ margin-bottom: var(--space-4);
881
+ }
882
+
883
+ /* Preformatted Text */
884
+ main pre {
885
+ margin: 1.2em 0.5em;
886
+ padding: 1em;
887
+ font-size: 0.8em;
888
+ }
889
+
890
+ .code-block-wrapper pre {
891
+ margin: 0;
892
+ }
893
+
894
+ /* Horizontal Rules */
895
+ main hr {
896
+ margin: 1.5em 1em;
897
+ border: 2px solid var(--color-border-default);
898
+ }
899
+
900
+ /* Blockquotes */
901
+ main blockquote {
902
+ margin: 0 2em 1.2em 1.2em;
903
+ padding-left: 0.5em;
904
+ border-left: 2px solid var(--color-border-default);
905
+ }
906
+
907
+ /* Lists */
908
+ main li > p {
909
+ margin: 0.5em;
910
+ }
911
+
912
+ /* Definition Lists */
913
+ main dl {
914
+ margin: 1em 0.5em;
915
+ }
916
+
917
+ main dt {
918
+ line-height: 1.5;
919
+ font-weight: bold;
920
+ }
921
+
922
+ main dl.note-list dt {
923
+ margin-right: 1em;
924
+ float: left;
925
+ }
926
+
927
+ main dl.note-list dt:has(+ dt) {
928
+ margin-right: 0.25em;
929
+ }
930
+
931
+ main dl.note-list dt:has(+ dt)::after {
932
+ content: ', ';
933
+ font-weight: normal;
934
+ }
935
+
936
+ main dd {
937
+ margin: 0 0 1em 1em;
938
+ }
939
+
940
+ main dd p:first-child {
941
+ margin-top: 0;
942
+ }
943
+
944
+ /* Headers within Main */
945
+ main header h2 {
946
+ margin-top: 2em;
947
+ border-width: 0;
948
+ border-top: 4px solid var(--color-border-default);
949
+ font-size: 130%;
950
+ }
951
+
952
+ main header h3 {
953
+ margin: 2em 0 1.5em;
954
+ border-width: 0;
955
+ border-top: 3px solid var(--color-border-default);
956
+ font-size: 120%;
957
+ }
958
+
959
+ h1:target,
960
+ h2:target,
961
+ h3:target,
962
+ h4:target,
963
+ h5:target,
964
+ h6:target {
965
+ margin-left: calc(-1 * var(--space-5));
966
+ padding-left: calc(var(--space-5) / 2);
967
+ border-left: calc(var(--space-5) / 2) solid var(--color-border-default);
968
+ }
969
+
970
+ main .anchor-link:target {
971
+ scroll-margin-top: calc(var(--layout-header-height) + 2rem);
972
+ }
973
+
974
+
975
+ /* Utility Classes */
976
+ .hide { display: none !important; }
977
+ .initially-hidden { display: none; }
978
+
979
+ /* Screen reader only */
980
+ .sr-only {
981
+ position: absolute;
982
+ width: 1px;
983
+ height: 1px;
984
+ padding: 0;
985
+ margin: -1px;
986
+ overflow: hidden;
987
+ clip-path: inset(50%);
988
+ white-space: nowrap;
989
+ border-width: 0;
990
+ }
991
+
992
+
993
+
994
+ /* Method Details */
995
+ main .method-source-code {
996
+ visibility: hidden;
997
+ max-height: 0;
998
+ overflow: auto;
999
+ transition: max-height var(--transition-base), visibility var(--transition-base);
1000
+ }
1001
+
1002
+ main .method-source-code pre {
1003
+ border-color: var(--color-accent-hover);
1004
+ }
1005
+
1006
+ main .method-source-code.active-menu {
1007
+ visibility: visible;
1008
+ max-height: 100vh;
1009
+ }
1010
+
1011
+ main .method-description .method-calls-super {
1012
+ color: var(--color-text-primary);
1013
+ font-weight: bold;
1014
+ }
1015
+
1016
+ main .method-detail {
1017
+ margin-bottom: 2.5em;
1018
+ }
1019
+
1020
+ main .method-detail:target {
1021
+ margin-left: calc(-1 * var(--space-5));
1022
+ padding-left: calc(var(--space-5) / 2);
1023
+ border-left: calc(var(--space-5) / 2) solid var(--color-border-default);
1024
+ }
1025
+
1026
+ main .method-header {
1027
+ display: inline-block;
1028
+ }
1029
+
1030
+ main .method-heading {
1031
+ position: relative;
1032
+ font-family: var(--font-code);
1033
+ font-size: var(--font-size-lg);
1034
+ font-weight: var(--font-weight-semibold);
1035
+ margin-bottom: var(--space-3);
1036
+ }
1037
+
1038
+ main .method-heading .method-name {
1039
+ font-weight: var(--font-weight-semibold);
1040
+ }
1041
+
1042
+ main .method-heading .method-args {
1043
+ font-weight: var(--font-weight-normal);
1044
+ }
1045
+
1046
+ main .method-controls {
1047
+ line-height: 20px;
1048
+ float: right;
1049
+ color: var(--color-accent-hover);
1050
+ cursor: pointer;
1051
+ }
1052
+
1053
+ main .method-description,
1054
+ main .aliases {
1055
+ margin-top: 0.75em;
1056
+ color: var(--color-text-primary);
1057
+ }
1058
+
1059
+ main .aliases {
1060
+ padding-top: 4px;
1061
+ font-style: italic;
1062
+ cursor: default;
1063
+ }
1064
+
1065
+ main .aliases a {
1066
+ color: var(--color-accent-hover);
1067
+ }
1068
+
1069
+ main .mixin-from {
1070
+ font-size: 80%;
1071
+ font-style: italic;
1072
+ margin-bottom: 0.75em;
1073
+ }
1074
+
1075
+ main .method-description ul {
1076
+ margin-left: 1.5em;
1077
+ }
1078
+
1079
+ main #attribute-method-details .method-detail:hover {
1080
+ background-color: transparent;
1081
+ cursor: default;
1082
+ }
1083
+
1084
+ main .attribute-access-type {
1085
+ text-transform: uppercase;
1086
+ }
1087
+
1088
+ /* Small screen adjustments */
1089
+ @media (width <= 480px) {
1090
+ nav {
1091
+ width: 85%;
1092
+ max-width: 320px;
1093
+ }
1094
+
1095
+ main {
1096
+ margin: 0;
1097
+ padding: var(--space-4);
1098
+ max-width: 100%;
1099
+ }
1100
+
1101
+ table {
1102
+ display: block;
1103
+ overflow-x: auto;
1104
+ white-space: nowrap;
1105
+ }
1106
+
1107
+ main .method-controls {
1108
+ margin-top: 10px;
1109
+ float: none;
1110
+ }
1111
+ }
1112
+
1113
+
1114
+
1115
+ /* 9. Search Modal (Mobile) */
1116
+ .search-modal {
1117
+ position: fixed;
1118
+ inset: 0;
1119
+ z-index: var(--z-modal);
1120
+ display: none;
1121
+ }
1122
+
1123
+ .search-modal:not([hidden]) {
1124
+ display: flex;
1125
+ align-items: flex-start;
1126
+ justify-content: center;
1127
+ padding: var(--space-16) var(--space-4);
1128
+ }
1129
+
1130
+ /* Reduce padding on very small screens */
1131
+ @media (width <= 420px) {
1132
+ .search-modal:not([hidden]) {
1133
+ padding: var(--space-4) var(--space-3);
1134
+ }
1135
+
1136
+ .search-modal-content {
1137
+ border-radius: var(--radius-md);
1138
+ }
1139
+
1140
+ .search-modal-header {
1141
+ padding: var(--space-3);
1142
+ }
1143
+
1144
+ .search-modal-body {
1145
+ padding: var(--space-3);
1146
+ }
1147
+
1148
+ .search-modal-form input {
1149
+ font-size: var(--font-size-base);
1150
+ min-width: 0; /* Allow input to shrink */
1151
+ }
1152
+
1153
+ .search-modal-form {
1154
+ gap: var(--space-2);
1155
+ }
1156
+
1157
+ .search-modal-close {
1158
+ padding: var(--space-1) var(--space-3);
1159
+ font-size: 0.75rem;
1160
+ }
1161
+ }
1162
+
1163
+ .search-modal-backdrop {
1164
+ position: absolute;
1165
+ inset: 0;
1166
+ background: var(--color-overlay);
1167
+ z-index: 1;
1168
+ }
1169
+
1170
+ .search-modal-content {
1171
+ position: relative;
1172
+ z-index: 2;
1173
+ background: var(--color-background-primary);
1174
+ border-radius: var(--radius-lg);
1175
+ box-shadow: var(--shadow-xl);
1176
+ width: 100%;
1177
+ max-width: 600px;
1178
+ max-height: 80vh;
1179
+ display: flex;
1180
+ flex-direction: column;
1181
+ }
1182
+
1183
+ .search-modal-header {
1184
+ padding: var(--space-6);
1185
+ border-bottom: 1px solid var(--color-border-default);
1186
+ }
1187
+
1188
+ .search-modal-form {
1189
+ display: flex;
1190
+ align-items: center;
1191
+ gap: var(--space-3);
1192
+ }
1193
+
1194
+ .search-modal-icon {
1195
+ font-size: 1.5rem;
1196
+ color: var(--color-text-secondary);
1197
+ flex-shrink: 0;
1198
+ }
1199
+
1200
+ .search-modal-form input {
1201
+ flex: 1;
1202
+ border: none;
1203
+ outline: none;
1204
+ background: transparent;
1205
+ font-size: var(--font-size-lg);
1206
+ color: var(--color-text-primary);
1207
+ padding: 0;
1208
+ }
1209
+
1210
+ .search-modal-form input::placeholder {
1211
+ color: var(--color-text-tertiary);
1212
+ }
1213
+
1214
+ .search-modal-close {
1215
+ padding: var(--space-2) var(--space-4);
1216
+ background: var(--color-background-secondary);
1217
+ border: 1px solid var(--color-border-default);
1218
+ border-radius: var(--radius-md);
1219
+ font-size: var(--font-size-sm);
1220
+ color: var(--color-text-secondary);
1221
+ cursor: pointer;
1222
+ transition: background var(--transition-fast), border-color var(--transition-fast);
1223
+ flex-shrink: 0;
1224
+ }
1225
+
1226
+ .search-modal-close:hover {
1227
+ background: var(--color-background-tertiary);
1228
+ border-color: var(--color-border-default);
1229
+ }
1230
+
1231
+ .search-modal-body {
1232
+ padding: var(--space-6);
1233
+ overflow-y: auto;
1234
+ flex: 1;
1235
+ }
1236
+
1237
+ .search-modal-empty {
1238
+ text-align: center;
1239
+ color: var(--color-text-tertiary);
1240
+ padding: var(--space-12) 0;
1241
+ }
1242
+
1243
+ .search-modal-results {
1244
+ list-style: none;
1245
+ margin: 0;
1246
+ padding: 0;
1247
+ }
1248
+
1249
+ .search-modal-results.initially-hidden {
1250
+ display: block !important; /* Override initially-hidden */
1251
+ }
1252
+
1253
+ .search-modal-results li {
1254
+ padding: var(--space-3) var(--space-4);
1255
+ border-radius: var(--radius-md);
1256
+ cursor: pointer;
1257
+ transition: background var(--transition-fast);
1258
+ margin-bottom: var(--space-2);
1259
+ }
1260
+
1261
+ .search-modal-results li:hover {
1262
+ background: var(--color-background-secondary);
1263
+ }
1264
+
1265
+ .search-modal-results a {
1266
+ color: var(--color-text-primary);
1267
+ }
1268
+
1269
+ .search-modal-results .search-match {
1270
+ margin: 0;
1271
+ font-size: var(--font-size-base);
1272
+ }
1273
+
1274
+ .search-modal-results .search-match a {
1275
+ text-decoration: none;
1276
+ }
1277
+
1278
+ .search-modal-results .search-namespace {
1279
+ margin: var(--space-1) 0 0 0;
1280
+ font-size: var(--font-size-sm);
1281
+ color: var(--color-text-secondary);
1282
+ }
1283
+
1284
+ .search-modal-results .search-snippet {
1285
+ margin: var(--space-1) 0 0 0;
1286
+ font-size: var(--font-size-sm);
1287
+ color: var(--color-text-tertiary);
1288
+ }
1289
+
1290
+ /* 10. Right Sidebar - Table of Contents */
1291
+ aside.table-of-contents {
1292
+ grid-area: toc;
1293
+ align-self: start;
1294
+ position: sticky;
1295
+ top: var(--layout-header-height);
1296
+ padding: var(--space-8) var(--space-6);
1297
+ border: none;
1298
+ border-left: 1px solid var(--color-border-default);
1299
+ font-size: var(--font-size-base);
1300
+ }
1301
+
1302
+ aside.table-of-contents * {
1303
+ border-right: none !important;
1304
+ outline: none !important;
1305
+ }
1306
+
1307
+ aside.table-of-contents .toc-sticky {
1308
+ display: flex;
1309
+ flex-direction: column;
1310
+
1311
+ /* Exclude header height and top/bottom padding of aside.table-of-contents */
1312
+ height: calc(100vh - var(--layout-header-height) - var(--space-8) * 2);
1313
+ }
1314
+
1315
+ aside.table-of-contents .toc-sticky nav {
1316
+ height: auto;
1317
+ }
1318
+
1319
+ /* Hide TOC on mobile/tablet */
1320
+ @media (width <= 1279px) {
1321
+ aside.table-of-contents {
1322
+ display: none;
1323
+ }
1324
+
1325
+ body.has-toc {
1326
+ grid-template-columns: minmax(var(--layout-sidebar-width-min), var(--layout-sidebar-width-max)) 1fr;
1327
+ grid-template-areas:
1328
+ "header header"
1329
+ "nav main"
1330
+ "footer footer";
1331
+ }
1332
+ }
1333
+
1334
+ /* Tablet adjustments (between mobile and desktop) */
1335
+ @media (width >= 768px) and (width <= 1023px) {
1336
+ nav {
1337
+ width: 240px;
1338
+ }
1339
+
1340
+ header.top-navbar {
1341
+ padding: 0 var(--space-6);
1342
+ }
1343
+
1344
+ main {
1345
+ padding: var(--space-8) var(--space-6);
1346
+ max-width: 100%;
1347
+ }
1348
+ }
1349
+
1350
+ .table-of-contents h3 {
1351
+ font-size: var(--font-size-lg);
1352
+ font-weight: var(--font-weight-semibold);
1353
+ margin: 0 0 var(--space-5) 0;
1354
+ color: var(--color-text-primary);
1355
+ }
1356
+
1357
+ .table-of-contents ul {
1358
+ margin: 0;
1359
+ padding: 0;
1360
+ list-style: none;
1361
+ }
1362
+
1363
+ .table-of-contents ul ul {
1364
+ margin-top: var(--space-3);
1365
+ margin-left: var(--space-5);
1366
+ border-left: 1px solid var(--color-border-default);
1367
+ padding-left: var(--space-4);
1368
+ }
1369
+
1370
+ .table-of-contents li {
1371
+ margin-bottom: var(--space-3);
1372
+ }
1373
+
1374
+ .table-of-contents a {
1375
+ display: block;
1376
+ color: var(--color-text-secondary);
1377
+ text-decoration: none;
1378
+ transition: color var(--transition-fast);
1379
+ line-height: var(--line-height-relaxed);
1380
+ overflow-wrap: break-word;
1381
+ hyphens: auto;
1382
+ }
1383
+
1384
+ /* Nav hover styles sit here to keep specificity ordering with TOC links */
1385
+ nav a:hover {
1386
+ color: var(--color-link-hover);
1387
+ text-decoration: underline;
1388
+ }
1389
+
1390
+ .table-of-contents a:hover {
1391
+ color: var(--color-link-hover);
1392
+ }
1393
+
1394
+ .table-of-contents a.active {
1395
+ color: var(--color-accent-primary);
1396
+ font-weight: var(--font-weight-medium);
1397
+ }
1398
+
1399
+ ol.breadcrumb {
1400
+ display: flex;
1401
+ padding: 0;
1402
+ margin: 0 0 1em;
1403
+ }
1404
+
1405
+ ol.breadcrumb li {
1406
+ display: block;
1407
+ list-style: none;
1408
+ font-size: 125%;
1409
+ }
1410
+
1411
+ /* 11. Footer */
1412
+ footer.site-footer {
1413
+ grid-area: footer;
1414
+ background: var(--color-background-secondary);
1415
+ border-top: 1px solid var(--color-border-default);
1416
+ padding: var(--space-12) var(--space-6);
1417
+ }
1418
+
1419
+ footer.site-footer .footer-content {
1420
+ max-width: 1200px;
1421
+ margin: 0 auto;
1422
+ display: grid;
1423
+ grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
1424
+ gap: var(--space-8);
1425
+ }
1426
+
1427
+ footer.site-footer h3 {
1428
+ font-size: var(--font-size-sm);
1429
+ font-weight: var(--font-weight-semibold);
1430
+ color: var(--color-text-primary);
1431
+ margin: 0 0 var(--space-4) 0;
1432
+ letter-spacing: 0.05em;
1433
+ }
1434
+
1435
+ footer.site-footer ul {
1436
+ list-style: none;
1437
+ margin: 0;
1438
+ padding: 0;
1439
+ }
1440
+
1441
+ footer.site-footer li {
1442
+ margin-bottom: var(--space-2);
1443
+ }
1444
+
1445
+ footer.site-footer a {
1446
+ color: var(--color-text-secondary);
1447
+ text-decoration: none;
1448
+ font-size: var(--font-size-sm);
1449
+ transition: color var(--transition-fast);
1450
+ }
1451
+
1452
+ footer.site-footer a:hover {
1453
+ color: var(--color-link-hover);
1454
+ }
1455
+
1456
+ footer.site-footer .footer-bottom {
1457
+ margin-top: var(--space-8);
1458
+ padding-top: var(--space-6);
1459
+ border-top: 1px solid var(--color-border-default);
1460
+ text-align: center;
1461
+ font-size: var(--font-size-xs);
1462
+ color: var(--color-text-tertiary);
1463
+ }
1464
+
1465
+ footer.site-footer .footer-bottom:first-child {
1466
+ margin-top: 0;
1467
+ padding-top: 0;
1468
+ border-top: none;
1469
+ }
1470
+
1471
+ /* Search */
1472
+ #search-section {
1473
+ padding: var(--space-6);
1474
+ background-color: var(--color-background-primary);
1475
+ border-bottom: 1px solid var(--color-border-default);
1476
+ }
1477
+
1478
+ #search-field-wrapper {
1479
+ position: relative;
1480
+ display: flex;
1481
+ align-items: center;
1482
+ }
1483
+
1484
+ #search-field {
1485
+ width: 100%;
1486
+ padding: var(--space-2) var(--space-4) var(--space-2) 2.5rem;
1487
+ border: 1px solid var(--color-border-default);
1488
+ border-radius: 1.25rem;
1489
+ font-size: var(--font-size-sm);
1490
+ outline: none;
1491
+ transition: border-color var(--transition-base);
1492
+ color: var(--color-text-primary);
1493
+ }
1494
+
1495
+ #search-field:focus {
1496
+ border-color: var(--color-accent-primary);
1497
+ }
1498
+
1499
+ #search-field::placeholder {
1500
+ color: var(--color-text-primary);
1501
+ }
1502
+
1503
+ #search-field-wrapper::before {
1504
+ content: "\1F50D";
1505
+ position: absolute;
1506
+ left: var(--space-3);
1507
+ top: 50%;
1508
+ transform: translateY(-50%);
1509
+ font-size: var(--font-size-sm);
1510
+ color: var(--color-text-primary);
1511
+ opacity: 0.6;
1512
+ }
1513
+
1514
+ /* Search Results */
1515
+ #search-results {
1516
+ font-family: var(--font-primary);
1517
+ font-weight: 300;
1518
+ }
1519
+
1520
+ #search-results a {
1521
+ color: var(--color-text-primary);
1522
+ }
1523
+
1524
+ #search-results a:hover {
1525
+ color: var(--color-accent-primary);
1526
+ }
1527
+
1528
+ #search-results .search-match {
1529
+ font-family: var(--font-heading);
1530
+ font-weight: normal;
1531
+ }
1532
+
1533
+ #search-results .search-selected {
1534
+ background: var(--color-code-bg);
1535
+ border-bottom: 1px solid transparent;
1536
+ }
1537
+
1538
+ #search-results li {
1539
+ list-style: none;
1540
+ border-bottom: 1px solid var(--color-border-default);
1541
+ margin-bottom: 0.5em;
1542
+ }
1543
+
1544
+ #search-results li:last-child {
1545
+ border-bottom: none;
1546
+ margin-bottom: 0;
1547
+ }
1548
+
1549
+ #search-results li p {
1550
+ padding: 0;
1551
+ margin: 0.5em;
1552
+ }
1553
+
1554
+ #search-results .search-namespace {
1555
+ font-weight: bold;
1556
+ }
1557
+
1558
+ #search-results li em {
1559
+ background-color: var(--color-search-highlight-bg);
1560
+ font-style: normal;
1561
+ }
1562
+
1563
+ #search-results pre {
1564
+ margin: 0.5em;
1565
+ font-family: var(--font-code);
1566
+ }
1567
+
1568
+ header.top-navbar #search-field {
1569
+ width: 100%;
1570
+ padding: var(--space-2) var(--space-4);
1571
+ border: 1px solid var(--color-border-default);
1572
+ border-radius: var(--radius-md);
1573
+ font-size: var(--font-size-base);
1574
+ background: var(--color-background-primary);
1575
+ color: var(--color-text-primary);
1576
+ transition: border-color var(--transition-fast);
1577
+ }
1578
+
1579
+ header.top-navbar #search-field:focus {
1580
+ outline: none;
1581
+ border-color: var(--color-accent-primary);
1582
+ box-shadow: 0 0 0 3px var(--color-accent-subtle);
1583
+ }
1584
+
1585
+ header.top-navbar #search-field::placeholder {
1586
+ color: var(--color-text-tertiary);
1587
+ }
1588
+
1589
+ /* Search results dropdown in navbar */
1590
+ header.top-navbar #search-results {
1591
+ position: absolute;
1592
+ top: calc(100% + var(--space-2));
1593
+ left: 0;
1594
+ width: var(--layout-search-width);
1595
+ max-height: 60vh;
1596
+ background: var(--color-background-primary);
1597
+ border: 1px solid var(--color-border-default);
1598
+ border-radius: var(--radius-lg);
1599
+ box-shadow: var(--shadow-lg);
1600
+ overflow-y: auto;
1601
+ z-index: var(--z-popover);
1602
+ margin: 0;
1603
+ padding: 0;
1604
+ }
1605
+
1606
+ header.top-navbar #search-results.initially-hidden {
1607
+ display: none;
1608
+ }
1609
+
1610
+ header.top-navbar #search-results[aria-expanded="false"] {
1611
+ display: none;
1612
+ }