ldbws 1.0.3 → 1.0.4

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 (59) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-version +1 -0
  3. data/Gemfile.lock +147 -49
  4. data/LICENSE +1 -1
  5. data/README.md +2 -2
  6. data/doc/LICENSE.html +403 -47
  7. data/doc/Ldbws/Request/GetDeparturesBoard.html +487 -54
  8. data/doc/Ldbws/Request/GetDeparturesBoardWithDetails.html +487 -54
  9. data/doc/Ldbws/Request/GetServiceDetails.html +484 -51
  10. data/doc/Ldbws/Request/GetStationBoard.html +489 -56
  11. data/doc/Ldbws/Request/GetStationBoardWithDetails.html +489 -56
  12. data/doc/Ldbws/Request/ParamValidationError.html +538 -69
  13. data/doc/Ldbws/Request.html +470 -47
  14. data/doc/Ldbws/RequestError.html +535 -72
  15. data/doc/Ldbws/ResponseParsingError.html +475 -49
  16. data/doc/Ldbws/ResponseTypes/BaseStationBoard.html +565 -56
  17. data/doc/Ldbws/ResponseTypes/CallingPoint.html +498 -65
  18. data/doc/Ldbws/ResponseTypes/Coach.html +487 -54
  19. data/doc/Ldbws/ResponseTypes/DepartureItem.html +485 -52
  20. data/doc/Ldbws/ResponseTypes/DepartureItemWithDetails.html +485 -52
  21. data/doc/Ldbws/ResponseTypes/DeparturesBoard.html +484 -51
  22. data/doc/Ldbws/ResponseTypes/DeparturesBoardWithDetails.html +484 -51
  23. data/doc/Ldbws/ResponseTypes/Formation.html +485 -52
  24. data/doc/Ldbws/ResponseTypes/LoadingCategory.html +486 -53
  25. data/doc/Ldbws/ResponseTypes/Location.html +486 -53
  26. data/doc/Ldbws/ResponseTypes/ServiceDetails.html +510 -77
  27. data/doc/Ldbws/ResponseTypes/ServiceItem.html +503 -70
  28. data/doc/Ldbws/ResponseTypes/ServiceItemWithCallingPoints.html +485 -52
  29. data/doc/Ldbws/ResponseTypes/StationBoard.html +486 -53
  30. data/doc/Ldbws/ResponseTypes/StationBoardWithDetails.html +486 -53
  31. data/doc/Ldbws/ResponseTypes/ToiletAvailability.html +485 -52
  32. data/doc/Ldbws/ResponseTypes.html +470 -47
  33. data/doc/Ldbws/Service.html +1083 -245
  34. data/doc/Ldbws.html +520 -73
  35. data/doc/created.rid +19 -20
  36. data/doc/css/rdoc.css +1926 -378
  37. data/doc/index.html +434 -104
  38. data/doc/js/aliki.js +489 -0
  39. data/doc/js/bash_highlighter.js +167 -0
  40. data/doc/js/c_highlighter.js +299 -0
  41. data/doc/js/search_controller.js +129 -0
  42. data/doc/js/search_data.js +1 -0
  43. data/doc/js/search_navigation.js +105 -0
  44. data/doc/js/search_ranker.js +239 -0
  45. data/doc/js/theme-toggle.js +112 -0
  46. data/ldbws.gemspec +7 -6
  47. data/lib/ldbws/request/base.rb +0 -3
  48. data/lib/ldbws/request/get_departures_board.rb +3 -1
  49. data/lib/ldbws/request/get_service_details.rb +2 -0
  50. data/lib/ldbws/request/get_station_board.rb +12 -2
  51. data/lib/ldbws/response_types/calling_point.rb +2 -2
  52. data/lib/ldbws/response_types/station_board.rb +6 -0
  53. data/lib/ldbws/version.rb +1 -1
  54. data/spec/helpers/request_helper.rb +27 -0
  55. data/spec/request/get_departures_board_spec.rb +55 -0
  56. data/spec/request/get_service_details_spec.rb +16 -0
  57. data/spec/request/get_station_board_spec.rb +73 -0
  58. metadata +29 -21
  59. data/.envrc +0 -1
data/doc/css/rdoc.css CHANGED
@@ -1,84 +1,413 @@
1
1
  /*
2
- * "Darkfish" Rdoc CSS
3
- * $Id: rdoc.css 54 2009-01-27 01:09:48Z deveiant $
4
- *
5
- * Author: Michael Granger <ged@FaerieMUD.org>
2
+ * Aliki Theme Stylesheet
3
+ * Modern RDoc theme by Stan Lo
6
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
7
12
  */
8
13
 
9
- /* vim: ft=css et sw=2 ts=2 sts=2 */
10
- /* Base Green is: #6C8C22 */
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 - neutral palette for all syntax highlighters */
43
+ --code-blue: #1d4ed8;
44
+ --code-green: #047857;
45
+ --code-orange: #d97706;
46
+ --code-purple: #7e22ce;
47
+ --code-red: #dc2626;
48
+ --code-cyan: #0891b2;
49
+ --code-gray: #78716c;
50
+
51
+ /* Color Palette - Green (for success states) */
52
+ --color-green-400: #4ade80;
53
+ --color-green-500: #22c55e;
54
+ --color-green-600: #16a34a;
55
+
56
+ /* Semantic Colors - Light Theme */
57
+ --color-text-primary: var(--color-neutral-900);
58
+ --color-text-secondary: var(--color-neutral-600);
59
+ --color-text-tertiary: var(--color-neutral-500);
60
+ --color-background-primary: #fff;
61
+ --color-background-secondary: var(--color-neutral-50);
62
+ --color-background-tertiary: var(--color-neutral-100);
63
+ --color-border-default: var(--color-neutral-300);
64
+ --color-border-subtle: var(--color-neutral-200);
65
+ --color-border-emphasis: var(--color-neutral-400);
66
+ --color-link-default: var(--color-text-primary);
67
+ --color-link-hover: var(--color-primary-600);
68
+ --color-accent-primary: var(--color-primary-600);
69
+ --color-accent-hover: var(--color-primary-700);
70
+ --color-accent-subtle: var(--color-primary-50);
71
+ --color-title-kind-border: var(--color-primary-200);
72
+ --color-code-bg: #f6f8fa;
73
+ --color-code-border: var(--color-neutral-300);
74
+ --color-sig-bg: var(--color-neutral-100);
75
+ --color-sig-border: var(--color-border-default);
76
+ --color-nav-bg: #fff;
77
+ --color-nav-text: var(--color-neutral-700);
78
+ --color-th-background: var(--color-neutral-100);
79
+ --color-td-background: var(--color-neutral-50);
80
+
81
+ /* Search Type Badge Colors */
82
+ --color-search-type-class-bg: #e6f0ff;
83
+ --color-search-type-class-text: #0050a0;
84
+ --color-search-type-module-bg: #e6ffe6;
85
+ --color-search-type-module-text: #060;
86
+ --color-search-type-constant-bg: #fff0e6;
87
+ --color-search-type-constant-text: #995200;
88
+ --color-search-type-method-bg: #f0e6ff;
89
+ --color-search-type-method-text: #5200a0;
90
+
91
+ /* RGBA Colors (theme-agnostic) */
92
+ --color-overlay: rgb(0 0 0 / 50%);
93
+ --color-emphasis-bg: rgb(255 111 97 / 10%);
94
+ --color-emphasis-decoration: rgb(52 48 64 / 25%);
95
+ --color-search-highlight-bg: rgb(224 108 117 / 10%);
96
+ --color-success-bg: rgb(34 197 94 / 10%);
97
+
98
+ /* Typography Scale */
99
+ --font-size-xs: 0.75rem; /* 12px */
100
+ --font-size-sm: 0.875rem; /* 14px */
101
+ --font-size-base: 1rem; /* 16px */
102
+ --font-size-lg: 1.125rem; /* 18px */
103
+ --font-size-xl: 1.25rem; /* 20px */
104
+ --font-size-2xl: 1.5rem; /* 24px */
105
+ --font-size-3xl: 1.875rem; /* 30px */
106
+ --font-size-4xl: 2.25rem; /* 36px */
107
+ --font-size-5xl: 3rem; /* 48px */
108
+
109
+ /* Font Families */
110
+ --font-family-base: -apple-system, blinkmacsystemfont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Helvetica Neue', sans-serif;
111
+ --font-family-heading: var(--font-family-base);
112
+ --font-family-mono: ui-monospace, 'SFMono-Regular', 'SF Mono', 'Menlo', 'Consolas', 'Liberation Mono', monospace;
113
+
114
+ /* Font Weights */
115
+ --font-weight-normal: 400;
116
+ --font-weight-medium: 500;
117
+ --font-weight-semibold: 600;
118
+ --font-weight-bold: 700;
119
+
120
+ /* Font Shortcuts */
121
+ --font-primary: var(--font-family-base);
122
+ --font-heading: var(--font-family-heading);
123
+ --font-code: var(--font-family-mono);
124
+
125
+ /* Line Heights */
126
+ --line-height-tight: 1.25;
127
+ --line-height-normal: 1.5;
128
+ --line-height-relaxed: 1.625;
129
+
130
+ /* Spacing Scale */
131
+ --space-1: 0.25rem; /* 4px */
132
+ --space-2: 0.5rem; /* 8px */
133
+ --space-3: 0.75rem; /* 12px */
134
+ --space-4: 1rem; /* 16px */
135
+ --space-5: 1.25rem; /* 20px */
136
+ --space-6: 1.5rem; /* 24px */
137
+ --space-8: 2rem; /* 32px */
138
+ --space-12: 3rem; /* 48px */
139
+ --space-16: 4rem; /* 64px */
140
+
141
+ /* Border Radius */
142
+ --radius-sm: 0.25rem; /* 4px */
143
+ --radius-md: 0.375rem; /* 6px */
144
+ --radius-lg: 0.5rem; /* 8px */
145
+
146
+ /* Shadows */
147
+ --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 10%), 0 1px 2px -1px rgb(0 0 0 / 10%);
148
+ --shadow-md: 0 2px 8px rgb(0 0 0 / 10%);
149
+ --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 10%), 0 4px 6px -4px rgb(0 0 0 / 10%);
150
+ --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 10%), 0 8px 10px -6px rgb(0 0 0 / 10%);
151
+
152
+ /* Layout Dimensions */
153
+ --layout-sidebar-width: 300px;
154
+ --layout-sidebar-width-min: 300px;
155
+ --layout-sidebar-width-max: 15%;
156
+ --layout-toc-width-min: 240px;
157
+ --layout-toc-width-max: 18%;
158
+ --layout-content-max-width: 800px;
159
+ --layout-header-height: 64px;
160
+ --layout-search-width: 400px;
161
+
162
+ /* Transitions */
163
+ --transition-fast: 150ms ease-in-out;
164
+ --transition-base: 200ms ease-in-out;
165
+ --transition-slow: 350ms ease-in-out;
166
+ --ease-out-smooth: cubic-bezier(0.4, 0, 0.2, 1);
167
+
168
+ /* Animation Durations */
169
+ --duration-fast: 250ms;
170
+ --duration-base: 300ms;
171
+ --duration-medium: 350ms;
172
+
173
+ /* Z-Index Scale */
174
+ --z-fixed: 300;
175
+ --z-modal: 400;
176
+ --z-popover: 500;
177
+
178
+ }
179
+
180
+ /* Dark Theme */
181
+ [data-theme="dark"] {
182
+ /* Code highlighting colors - neutral palette for all syntax highlighters */
183
+ --code-blue: #93c5fd;
184
+ --code-green: #34d399;
185
+ --code-orange: #fbbf24;
186
+ --code-purple: #c084fc;
187
+ --code-red: #f87171;
188
+ --code-cyan: #22d3ee;
189
+ --code-gray: #a8a29e;
190
+
191
+ /* Semantic Colors - Dark Theme */
192
+ --color-text-primary: var(--color-neutral-50);
193
+ --color-text-secondary: var(--color-neutral-200);
194
+ --color-text-tertiary: var(--color-neutral-400);
195
+ --color-background-primary: var(--color-neutral-900);
196
+ --color-background-secondary: var(--color-neutral-800);
197
+ --color-background-tertiary: var(--color-neutral-700);
198
+ --color-border-default: var(--color-neutral-600);
199
+ --color-border-subtle: var(--color-neutral-700);
200
+ --color-border-emphasis: var(--color-neutral-300);
201
+ --color-link-default: var(--color-neutral-50);
202
+ --color-link-hover: var(--color-primary-500);
203
+ --color-accent-primary: var(--color-primary-500);
204
+ --color-accent-hover: var(--color-primary-400);
205
+ --color-accent-subtle: rgb(235 84 79 / 10%);
206
+ --color-accent-subtle-hover: rgb(235 84 79 / 20%);
207
+ --color-title-kind-border: rgb(235 84 79 / 35%);
208
+ --color-code-bg: var(--color-neutral-800);
209
+ --color-code-border: var(--color-neutral-700);
210
+ --color-sig-bg: #211f1e; /* between neutral-900 and neutral-800 */
211
+ --color-sig-border: var(--color-border-subtle);
212
+ --color-nav-bg: var(--color-neutral-900);
213
+ --color-nav-text: var(--color-neutral-50);
214
+ --color-th-background: var(--color-background-tertiary);
215
+ --color-td-background: var(--color-background-secondary);
216
+
217
+ /* Search Type Badge Colors - Dark Theme */
218
+ --color-search-type-class-bg: #1e3a5f;
219
+ --color-search-type-class-text: #93c5fd;
220
+ --color-search-type-module-bg: #14532d;
221
+ --color-search-type-module-text: #86efac;
222
+ --color-search-type-constant-bg: #451a03;
223
+ --color-search-type-constant-text: #fcd34d;
224
+ --color-search-type-method-bg: #3b0764;
225
+ --color-search-type-method-text: #d8b4fe;
226
+
227
+ /* Dark theme shadows (slightly more subtle) */
228
+ --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 40%), 0 1px 2px -1px rgb(0 0 0 / 40%);
229
+ --shadow-md: 0 2px 8px rgb(0 0 0 / 40%);
230
+ --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 40%), 0 4px 6px -4px rgb(0 0 0 / 40%);
231
+ --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 40%), 0 8px 10px -6px rgb(0 0 0 / 40%);
232
+
233
+ }
234
+
235
+ /* 2. Global Styles & Layout */
236
+ body {
237
+ background: var(--color-background-primary);
238
+ font-family: var(--font-primary);
239
+ font-weight: 400;
240
+ color: var(--color-text-primary);
241
+ line-height: var(--line-height-relaxed);
242
+ margin: 0;
243
+ overflow-wrap: break-word; /* Avoid overflow on mobile */
11
244
 
12
- .hide { display: none !important; }
245
+ /* Grid layout with header, sidebar, main, and footer */
246
+ display: grid;
247
+ grid-template: "header header" var(--layout-header-height) "nav main" 1fr "nav footer" auto / var(--layout-sidebar-width) 1fr;
248
+ min-height: 100vh;
249
+ }
13
250
 
14
- * { padding: 0; margin: 0; }
251
+ /* Three-column layout when TOC is present */
252
+ body.has-toc {
253
+ grid-template: "header header header" var(--layout-header-height) "nav main toc" 1fr "nav footer toc" auto / var(--layout-sidebar-width) 1fr minmax(var(--layout-toc-width-min), var(--layout-toc-width-max));
254
+ min-height: 100vh;
255
+ }
15
256
 
16
- body {
17
- background: #fafafa;
18
- font-family: Lato, sans-serif;
19
- font-weight: 300;
257
+ /* Mobile: stack everything vertically */
258
+ @media (width <= 1023px) {
259
+ body,
260
+ body.has-toc {
261
+ display: flex;
262
+ flex-direction: column;
263
+ grid-template: none;
264
+ }
20
265
  }
21
266
 
22
- h1 span,
23
- h2 span,
24
- h3 span,
25
- h4 span,
26
- h5 span,
27
- h6 span {
267
+ /* 3. Typography */
268
+
269
+ /* 4. Links */
270
+ a {
271
+ color: var(--color-link-default);
272
+ transition: color var(--transition-base);
273
+ text-decoration: underline;
274
+ text-underline-offset: 0.2em; /* Make sure it doesn't overlap with underscores in a method name. */
275
+ }
276
+
277
+ /* 5. Code and Pre */
278
+
279
+ /* Code blocks */
280
+ pre {
281
+ font-family: var(--font-code);
282
+ background-color: var(--color-code-bg);
283
+ border: 1px solid var(--color-code-border);
284
+ border-radius: var(--radius-md);
285
+ padding: var(--space-4);
286
+ overflow-x: auto;
287
+ font-size: var(--font-size-sm);
288
+ line-height: var(--line-height-normal);
289
+ margin: var(--space-4) 0;
28
290
  position: relative;
291
+ }
29
292
 
30
- display: none;
31
- padding-left: 1em;
32
- line-height: 0;
33
- vertical-align: baseline;
34
- font-size: 10px;
35
- }
36
-
37
- h1 span { top: -1.3em; }
38
- h2 span { top: -1.2em; }
39
- h3 span { top: -1.0em; }
40
- h4 span { top: -0.8em; }
41
- h5 span { top: -0.5em; }
42
- h6 span { top: -0.5em; }
43
-
44
- h1:hover span,
45
- h2:hover span,
46
- h3:hover span,
47
- h4:hover span,
48
- h5:hover span,
49
- h6:hover span {
50
- display: inline;
293
+ /* Code block wrapper for copy button */
294
+ .code-block-wrapper {
295
+ position: relative;
296
+ margin: var(--space-4) 0;
51
297
  }
52
298
 
53
- h1:target,
54
- h2:target,
55
- h3:target,
56
- h4:target,
57
- h5:target,
58
- h6:target {
59
- margin-left: -10px;
60
- border-left: 10px solid #f1edba;
299
+ /* Copy button styling */
300
+ .copy-code-button {
301
+ position: absolute;
302
+ top: var(--space-2);
303
+ right: var(--space-2);
304
+ padding: var(--space-2);
305
+ background: var(--color-background-secondary);
306
+ border: 1px solid var(--color-border-default);
307
+ border-radius: var(--radius-sm);
308
+ cursor: pointer;
309
+ opacity: 0.6;
310
+ transition:
311
+ opacity var(--transition-fast),
312
+ background var(--transition-fast),
313
+ border-color var(--transition-fast),
314
+ transform var(--transition-fast),
315
+ box-shadow var(--transition-fast);
316
+ display: flex;
317
+ align-items: center;
318
+ justify-content: center;
319
+ width: 2rem;
320
+ height: 2rem;
321
+ z-index: 10;
322
+ }
323
+
324
+ .copy-code-button:hover,
325
+ .copy-code-button:focus {
326
+ opacity: 1;
327
+ background: var(--color-background-tertiary);
328
+ border-color: var(--color-border-emphasis);
329
+ transform: translateY(-1px);
330
+ box-shadow: var(--shadow-md);
61
331
  }
62
332
 
63
- :link,
64
- :visited {
65
- color: #6C8C22;
66
- text-decoration: none;
333
+ .copy-code-button:focus {
334
+ outline: none;
335
+ box-shadow: 0 0 0 3px var(--color-accent-subtle);
67
336
  }
68
337
 
69
- :link:hover,
70
- :visited:hover {
71
- border-bottom: 1px dotted #6C8C22;
338
+ .copy-code-button:active {
339
+ transform: scale(0.92);
340
+ box-shadow: none;
72
341
  }
73
342
 
74
- code,
75
- pre {
76
- font-family: "Source Code Pro", Monaco, monospace;
77
- background-color: rgba(27,31,35,0.05);
78
- padding: 0em 0.2em;
79
- border-radius: 0.2em;
343
+ .copy-code-button svg {
344
+ width: 1rem;
345
+ height: 1rem;
346
+ fill: none;
347
+ stroke: currentcolor;
348
+ stroke-width: 2;
349
+ stroke-linecap: round;
350
+ stroke-linejoin: round;
351
+ color: var(--color-text-secondary);
352
+ transition: color var(--transition-fast), transform var(--transition-base);
80
353
  }
81
354
 
355
+ .copy-code-button:hover svg {
356
+ color: var(--color-text-primary);
357
+ }
358
+
359
+ /* Copied state - subtle green checkmark */
360
+ .copy-code-button.copied {
361
+ background: var(--color-success-bg);
362
+ border-color: var(--color-green-500);
363
+ opacity: 1;
364
+ }
365
+
366
+ .copy-code-button.copied svg {
367
+ color: var(--color-green-600);
368
+ }
369
+
370
+ [data-theme="dark"] .copy-code-button.copied {
371
+ border-color: var(--color-green-400);
372
+ }
373
+
374
+ [data-theme="dark"] .copy-code-button.copied svg {
375
+ color: var(--color-green-400);
376
+ }
377
+
378
+ /* Mobile adjustments */
379
+ @media (hover: none) {
380
+ .copy-code-button {
381
+ opacity: 0.7;
382
+ }
383
+
384
+ .copy-code-button:active {
385
+ opacity: 1;
386
+ }
387
+ }
388
+
389
+ /* Inline code */
390
+ code {
391
+ font-family: var(--font-code);
392
+ background-color: var(--color-code-bg);
393
+ border: 1px solid var(--color-border-subtle);
394
+ padding: 0.125rem 0.375rem;
395
+ border-radius: var(--radius-sm);
396
+ font-size: 0.9em;
397
+ }
398
+
399
+ pre code {
400
+ background: none;
401
+ border: none;
402
+ padding: 0;
403
+ font-size: inherit;
404
+ }
405
+
406
+ a code:hover {
407
+ color: var(--color-link-hover);
408
+ }
409
+
410
+ /* Tables */
82
411
  table {
83
412
  margin: 0;
84
413
  border-spacing: 0;
@@ -87,491 +416,1173 @@ table {
87
416
 
88
417
  table tr th, table tr td {
89
418
  padding: 0.2em 0.4em;
90
- border: 1px solid #ccc;
419
+ border: 1px solid var(--color-border-default);
91
420
  }
92
421
 
93
422
  table tr th {
94
- background-color: #eceaed;
423
+ background-color: var(--color-th-background);
95
424
  }
96
425
 
97
426
  table tr:nth-child(even) td {
98
- background-color: #f5f4f6;
427
+ background-color: var(--color-td-background);
428
+ }
429
+
430
+ /* 6. Header (Top Navbar) */
431
+ header.top-navbar {
432
+ grid-area: header;
433
+ position: sticky;
434
+ top: 0;
435
+ z-index: var(--z-fixed);
436
+ background: var(--color-background-primary);
437
+ border-bottom: 1px solid var(--color-border-default);
438
+ display: grid;
439
+ grid-template-columns:
440
+ var(--layout-sidebar-width)
441
+ minmax(0, 1fr);
442
+ align-items: center;
443
+ padding: 0;
444
+ height: var(--layout-header-height);
445
+ box-shadow: var(--shadow-sm);
446
+ }
447
+
448
+ body.has-toc header.top-navbar {
449
+ grid-template-columns:
450
+ var(--layout-sidebar-width)
451
+ minmax(0, 1fr)
452
+ minmax(var(--layout-toc-width-min), var(--layout-toc-width-max));
99
453
  }
100
454
 
101
- /* @group Generic Classes */
455
+ @media (width <= 1279px) {
456
+ body.has-toc header.top-navbar {
457
+ grid-template-columns:
458
+ var(--layout-sidebar-width)
459
+ minmax(0, 1fr);
460
+ }
461
+ }
462
+
463
+ header.top-navbar .navbar-brand {
464
+ grid-column: 1;
465
+ justify-self: start;
466
+ margin-left: var(--space-6);
467
+ font-size: var(--font-size-xl);
468
+ font-weight: var(--font-weight-semibold);
469
+ color: var(--color-text-primary);
470
+ text-decoration: none;
471
+ white-space: nowrap;
472
+ }
473
+
474
+ header.top-navbar .navbar-brand:hover {
475
+ color: var(--color-accent-primary);
476
+ }
102
477
 
103
- .initially-hidden {
478
+ header.top-navbar .navbar-search {
479
+ grid-column: 2;
480
+ justify-self: center;
481
+ box-sizing: border-box;
482
+ width: min(100%, var(--layout-content-max-width));
483
+ padding: 0 var(--space-8);
484
+ }
485
+
486
+ header.top-navbar .search-surface {
487
+ position: relative;
488
+ width: min(100%, var(--layout-search-width));
489
+ margin: 0;
490
+ }
491
+
492
+ header.top-navbar .navbar-search form {
493
+ position: relative;
494
+ box-sizing: border-box;
495
+ width: 100%;
496
+ margin: 0;
497
+ padding: 0;
498
+ }
499
+
500
+
501
+
502
+ /* Mobile search icon button (hidden on desktop) */
503
+ .navbar-search-mobile {
104
504
  display: none;
105
505
  }
106
506
 
107
- #search-field {
108
- width: 98%;
109
- background: white;
110
- border: none;
111
- height: 1.5em;
112
- -webkit-border-radius: 4px;
113
- -moz-border-radius: 4px;
114
- border-radius: 4px;
115
- text-align: left;
507
+ /* Theme toggle button */
508
+ .theme-toggle {
509
+ position: absolute;
510
+ top: 50%;
511
+ right: var(--space-6);
512
+ display: flex;
513
+ align-items: center;
514
+ justify-content: center;
515
+ padding: var(--space-2);
516
+ background: transparent;
517
+ border: 1px solid var(--color-border-default);
518
+ border-radius: var(--radius-md);
519
+ color: var(--color-text-primary);
520
+ cursor: pointer;
521
+ transition:
522
+ background var(--transition-fast),
523
+ border-color var(--transition-fast),
524
+ color var(--transition-fast),
525
+ transform var(--transition-fast);
526
+ font-size: var(--font-size-lg);
527
+ line-height: 1;
528
+ width: 2.5rem;
529
+ height: 2.5rem;
530
+ transform: translateY(-50%);
531
+ }
532
+
533
+ .theme-toggle:hover {
534
+ background: var(--color-background-secondary);
535
+ border-color: var(--color-accent-primary);
536
+ color: var(--color-accent-primary);
537
+ transform: translateY(-50%) scale(1.05);
538
+ }
539
+
540
+ .theme-toggle:focus {
541
+ outline: none;
542
+ border-color: var(--color-accent-primary);
543
+ box-shadow: 0 0 0 3px var(--color-accent-subtle);
544
+ }
545
+
546
+ .theme-toggle:active {
547
+ transform: translateY(-50%) scale(0.95);
548
+ }
549
+
550
+ .theme-toggle-icon {
551
+ display: inline-block;
552
+ transition: transform var(--duration-base) var(--ease-out-smooth);
553
+ }
554
+
555
+ .theme-toggle:hover .theme-toggle-icon {
556
+ transform: rotate(15deg) scale(1.1);
557
+ }
558
+
559
+ /* Mobile navbar */
560
+ @media (width <= 1023px) {
561
+ header.top-navbar {
562
+ display: flex;
563
+ align-items: center;
564
+ padding: 0 var(--space-4);
565
+ gap: var(--space-4);
566
+ }
567
+
568
+ header.top-navbar .search-surface {
569
+ display: none;
570
+ }
571
+
572
+ header.top-navbar .navbar-search {
573
+ width: auto;
574
+ padding: 0;
575
+ }
576
+
577
+ /* Show mobile search icon */
578
+ .navbar-search-mobile {
579
+ display: flex;
580
+ align-items: center;
581
+ justify-content: center;
582
+ padding: 0.5rem;
583
+ background: transparent;
584
+ border: none;
585
+ font-size: 1.25rem;
586
+ color: var(--color-text-primary);
587
+ cursor: pointer;
588
+ transition: color var(--transition-fast);
589
+ }
590
+
591
+ .navbar-search-mobile:hover {
592
+ color: var(--color-accent-primary);
593
+ }
594
+
595
+ /* Brand needs left margin for hamburger button */
596
+ header.top-navbar .navbar-brand {
597
+ margin-left: 2.5rem;
598
+ flex: 1;
599
+ font-size: var(--font-size-lg);
600
+ overflow: hidden;
601
+ text-overflow: ellipsis;
602
+ white-space: nowrap;
603
+ }
604
+
605
+ .theme-toggle {
606
+ position: static;
607
+ transform: none;
608
+ margin-right: 0;
609
+ }
610
+
611
+ .theme-toggle:hover {
612
+ transform: scale(1.05);
613
+ }
614
+
615
+ .theme-toggle:active {
616
+ transform: scale(0.95);
617
+ }
618
+ }
619
+
620
+ /* 7. Navigation (Left Sidebar) */
621
+ #sidebar-navigation {
622
+ grid-area: nav;
623
+ font-family: var(--font-heading);
624
+ font-size: var(--font-size-base);
625
+ border-right: 1px solid var(--color-border-default);
626
+ background: var(--color-nav-bg);
627
+ color: var(--color-nav-text);
628
+ overflow: hidden auto;
629
+ overscroll-behavior: contain;
630
+ display: flex;
631
+ flex-direction: column;
632
+ position: sticky;
633
+ top: var(--layout-header-height);
634
+ height: calc(100vh - var(--layout-header-height));
635
+ scrollbar-width: thin;
636
+ scrollbar-color: var(--color-border-default) transparent;
116
637
  }
117
- #search-field:focus {
118
- background: #f1edba;
638
+
639
+ /* Custom scrollbar for WebKit browsers */
640
+ #sidebar-navigation::-webkit-scrollbar {
641
+ width: 6px;
119
642
  }
120
- #search-field:-moz-placeholder,
121
- #search-field::-webkit-input-placeholder {
122
- font-weight: bold;
123
- color: #666;
643
+
644
+ #sidebar-navigation::-webkit-scrollbar-track {
645
+ background: transparent;
124
646
  }
125
647
 
126
- .missing-docs {
127
- font-size: 120%;
128
- background: white url(../images/wrench_orange.png) no-repeat 4px center;
129
- color: #ccc;
130
- line-height: 2em;
131
- border: 1px solid #d00;
132
- opacity: 1;
133
- padding-left: 20px;
134
- text-indent: 24px;
135
- letter-spacing: 3px;
136
- font-weight: bold;
137
- -webkit-border-radius: 5px;
138
- -moz-border-radius: 5px;
648
+ #sidebar-navigation::-webkit-scrollbar-thumb {
649
+ background: var(--color-border-default);
650
+ border-radius: var(--radius-sm);
651
+ transition: background var(--transition-fast);
139
652
  }
140
653
 
141
- .target-section {
142
- border: 2px solid #dcce90;
143
- border-left-width: 8px;
144
- padding: 0 1em;
145
- background: #fff3c2;
654
+ #sidebar-navigation::-webkit-scrollbar-thumb:hover {
655
+ background: var(--color-border-emphasis);
146
656
  }
147
657
 
148
- /* @end */
658
+ /* Mobile navigation */
659
+ @media (width <= 1023px) {
660
+ #sidebar-navigation {
661
+ position: fixed;
662
+ top: var(--layout-header-height);
663
+ bottom: 0;
664
+ left: 0;
665
+ width: var(--layout-sidebar-width);
666
+ z-index: calc(var(--z-fixed) - 10); /* Below header */
667
+ box-shadow: var(--shadow-lg);
149
668
 
150
- /* @group Index Page, Standalone file pages */
151
- .table-of-contents ul {
152
- margin: 1em;
153
- list-style: none;
669
+ /* Don't set height - let top/bottom define it */
670
+ }
671
+
672
+ #sidebar-navigation[hidden] {
673
+ display: none;
674
+ }
675
+
676
+ /* Backdrop for mobile nav */
677
+ body::before {
678
+ content: '';
679
+ position: fixed;
680
+ inset: var(--layout-header-height) 0 0 0;
681
+ background: var(--color-overlay);
682
+ z-index: calc(var(--z-fixed) - 20);
683
+ opacity: 0;
684
+ pointer-events: none;
685
+ transition: opacity var(--transition-base);
686
+ }
687
+
688
+ /* Show backdrop when nav is open */
689
+ body.sidebar-navigation-open::before {
690
+ opacity: 1;
691
+ pointer-events: auto;
692
+ }
154
693
  }
155
694
 
156
- .table-of-contents ul ul {
157
- margin-top: 0.25em;
695
+ /* Desktop: hide nav when [hidden] attribute is set */
696
+ @media (width >= 1024px) {
697
+ #sidebar-navigation[hidden] {
698
+ display: none;
699
+ }
158
700
  }
159
701
 
160
- .table-of-contents ul :link,
161
- .table-of-contents ul :visited {
162
- font-size: 16px;
702
+ #sidebar-navigation .nav-section {
703
+ margin-top: var(--space-6);
704
+ padding: 0 var(--space-6);
163
705
  }
164
706
 
165
- .table-of-contents li {
166
- margin-bottom: 0.25em;
707
+ #sidebar-navigation h2,
708
+ #sidebar-navigation h3 {
709
+ font-size: var(--font-size-lg);
710
+ font-weight: var(--font-weight-semibold);
711
+ margin: 0 0 var(--space-4);
712
+ padding: var(--space-2) 0;
713
+ color: var(--color-accent-primary);
714
+ border-bottom: 1px solid var(--color-border-default);
167
715
  }
168
716
 
169
- .table-of-contents li .toc-toggle {
170
- width: 16px;
171
- height: 16px;
172
- background: url(../images/add.png) no-repeat;
717
+ #sidebar-navigation ul,
718
+ #sidebar-navigation dl,
719
+ #sidebar-navigation p {
720
+ padding: 0;
721
+ list-style: none;
722
+ margin: var(--space-3) 0;
173
723
  }
174
724
 
175
- .table-of-contents li .toc-toggle.open {
176
- background: url(../images/delete.png) no-repeat;
725
+ #sidebar-navigation ul li {
726
+ margin-bottom: var(--space-2);
727
+ line-height: var(--line-height-relaxed);
177
728
  }
178
729
 
179
- /* @end */
730
+ #sidebar-navigation ul li a {
731
+ transition:
732
+ color var(--transition-fast),
733
+ transform var(--transition-fast),
734
+ padding var(--transition-fast);
735
+ }
180
736
 
181
- /* @group Top-Level Structure */
737
+ #sidebar-navigation ul li a:hover {
738
+ padding-left: var(--space-1);
739
+ }
182
740
 
183
- nav {
184
- float: left;
185
- width: 260px;
186
- font-family: Helvetica, sans-serif;
187
- font-size: 14px;
188
- border-right: 1px solid #ccc;
189
- position: sticky;
190
- top: 0;
191
- overflow: auto;
192
- height: calc(100vh - 100px); /* reduce the footer height */
741
+ #sidebar-navigation ul ul {
742
+ padding-left: var(--space-5);
743
+ margin: var(--space-2) 0 0;
193
744
  }
194
745
 
195
- main {
746
+ #sidebar-navigation ul ul ul {
747
+ padding-left: var(--space-5);
748
+ }
749
+
750
+ #sidebar-navigation ul ul ul ul {
751
+ padding-left: var(--space-5);
752
+ }
753
+
754
+ #sidebar-navigation a {
755
+ text-decoration: none;
756
+ }
757
+
758
+ /* Truncation for direct nav links (not links inside code tags) */
759
+ #sidebar-navigation .nav-list > li > a,
760
+ #sidebar-navigation .nav-section > ul > li > a,
761
+ #sidebar-navigation .nav-section > dl > dd > a {
196
762
  display: block;
197
- margin: 0 2em 5em 260px;
198
- padding-left: 20px;
199
- min-width: 340px;
200
- font-size: 16px;
763
+ max-width: 100%;
764
+ overflow: hidden;
765
+ text-overflow: ellipsis;
766
+ white-space: nowrap;
201
767
  }
202
768
 
203
- main h1,
204
- main h2,
205
- main h3,
206
- main h4,
207
- main h5,
208
- main h6 {
209
- font-family: Helvetica, sans-serif;
769
+ #sidebar-navigation footer {
770
+ padding: var(--space-4);
771
+ border-top: 1px solid var(--color-border-default);
210
772
  }
211
773
 
212
- .table-of-contents main {
213
- margin-left: 2em;
774
+ #sidebar-navigation footer a {
775
+ color: var(--color-accent-hover);
214
776
  }
215
777
 
216
- #validator-badges {
217
- clear: both;
218
- margin: 1em 1em 2em;
219
- font-size: smaller;
778
+ #sidebar-navigation-toggle {
779
+ display: none; /* Hidden by default, shown on mobile */
220
780
  }
221
781
 
222
- /* @end */
782
+ /* Mobile toggle button */
783
+ @media (width <= 1023px) {
784
+ #sidebar-navigation-toggle {
785
+ display: flex;
786
+ align-items: center;
787
+ justify-content: center;
788
+ position: fixed;
789
+ top: calc(var(--layout-header-height) / 2);
790
+ transform: translateY(-50%);
791
+ left: 1rem;
792
+ z-index: var(--z-fixed);
793
+ font-size: 1.5rem;
794
+ background: transparent;
795
+ border: none;
796
+ color: var(--color-text-primary);
797
+ cursor: pointer;
798
+ transition: color var(--transition-fast);
799
+ line-height: 1;
800
+ user-select: none;
801
+ -webkit-user-select: none;
802
+ }
223
803
 
224
- /* @group navigation */
225
- nav {
226
- margin-bottom: 1em;
804
+ #sidebar-navigation-toggle:hover {
805
+ color: var(--color-accent-primary);
806
+ }
227
807
  }
228
808
 
229
- nav .nav-section {
230
- margin-top: 2em;
231
- border-top: 2px solid #aaa;
232
- font-size: 90%;
233
- overflow: hidden;
809
+ /*
810
+ * Shared Collapsible Animation using ::details-content pseudo-element.
811
+ * This is the modern CSS approach for animating <details> elements.
812
+ * Uses block-size animation with interpolate-size for smooth height transitions.
813
+ * Both nav-section-collapsible and nested link-list details share this pattern.
814
+ */
815
+ #sidebar-navigation details {
816
+ interpolate-size: allow-keywords;
234
817
  }
235
818
 
236
- nav h2 {
237
- margin: 0;
238
- padding: 2px 8px 2px 8px;
239
- background-color: #e8e8e8;
240
- color: #555;
241
- font-size: 125%;
242
- text-align: center;
819
+ #sidebar-navigation details::details-content {
820
+ overflow: hidden;
821
+ block-size: 0;
822
+ transition: block-size 200ms ease, content-visibility 200ms ease allow-discrete;
243
823
  }
244
824
 
245
- nav h3,
246
- #table-of-contents-navigation {
247
- margin: 0;
248
- padding: 2px 8px 2px 8px;
249
- text-align: right;
250
- background-color: #e8e8e8;
251
- color: #555;
825
+ #sidebar-navigation details[open]::details-content {
826
+ block-size: auto;
252
827
  }
253
828
 
254
- nav ul,
255
- nav dl,
256
- nav p {
257
- padding: 4px 8px 0;
829
+ /* Collapsible Navigation Section Headers */
830
+
831
+ #sidebar-navigation .nav-section-header {
832
+ display: flex;
833
+ align-items: center;
834
+ gap: var(--space-3);
835
+ padding: var(--space-3) 0;
836
+ cursor: pointer;
258
837
  list-style: none;
838
+ user-select: none;
839
+ -webkit-user-select: none;
840
+ border-bottom: 1px solid var(--color-border-default);
841
+ margin-bottom: var(--space-3);
842
+ transition: color var(--transition-fast);
259
843
  }
260
844
 
261
- #project-navigation .nav-section {
262
- margin: 0;
263
- border-top: 0;
845
+ #sidebar-navigation .nav-section-header::-webkit-details-marker {
846
+ display: none;
264
847
  }
265
848
 
266
- #home-section h2 {
267
- text-align: center;
849
+ #sidebar-navigation .nav-section-header:hover {
850
+ color: var(--color-accent-primary);
268
851
  }
269
852
 
270
- #table-of-contents-navigation {
271
- font-size: 1.2em;
272
- font-weight: bold;
273
- text-align: center;
853
+ #sidebar-navigation .nav-section-icon {
854
+ display: flex;
855
+ align-items: center;
856
+ justify-content: center;
857
+ width: 1.25rem;
858
+ height: 1.25rem;
859
+ flex-shrink: 0;
860
+ color: var(--color-accent-primary);
274
861
  }
275
862
 
276
- #search-section {
277
- margin-top: 0;
278
- border-top: 0;
863
+ #sidebar-navigation .nav-section-icon svg {
864
+ width: 100%;
865
+ height: 100%;
279
866
  }
280
867
 
281
- #search-field-wrapper {
282
- border-top: 1px solid #aaa;
283
- border-bottom: 1px solid #aaa;
284
- padding: 3px 8px;
285
- background-color: #e8e8e8;
286
- color: #555;
868
+ #sidebar-navigation .nav-section-title {
869
+ font-size: var(--font-size-base);
870
+ font-weight: var(--font-weight-semibold);
871
+ color: inherit;
872
+ flex: 1;
873
+ min-width: 0;
874
+ overflow: hidden;
875
+ text-overflow: ellipsis;
876
+ white-space: nowrap;
287
877
  }
288
878
 
289
- ul.link-list li {
290
- white-space: nowrap;
291
- line-height: 1.4em;
879
+ #sidebar-navigation .nav-section-chevron {
880
+ display: flex;
881
+ align-items: center;
882
+ justify-content: center;
883
+ width: 1rem;
884
+ height: 1rem;
885
+ flex-shrink: 0;
886
+ color: var(--color-text-tertiary);
887
+ transition: transform var(--transition-base);
292
888
  }
293
889
 
294
- ul.link-list .type {
295
- font-size: 8px;
296
- text-transform: uppercase;
297
- color: white;
298
- background: #969696;
299
- padding: 2px 4px;
300
- -webkit-border-radius: 5px;
890
+ #sidebar-navigation .nav-section-chevron svg {
891
+ width: 100%;
892
+ height: 100%;
301
893
  }
302
894
 
303
- dl.note-list dt {
304
- float: left;
305
- margin-right: 1em;
895
+ /* Rotate chevron when open */
896
+ #sidebar-navigation .nav-section-collapsible[open] > .nav-section-header .nav-section-chevron {
897
+ transform: rotate(90deg);
306
898
  }
307
899
 
308
- .calls-super {
309
- background: url(../images/arrow_up.png) no-repeat right center;
900
+ #sidebar-navigation .nav-section-collapsible > ul,
901
+ #sidebar-navigation .nav-section-collapsible > dl,
902
+ #sidebar-navigation .nav-section-collapsible > p {
903
+ margin-top: 0;
310
904
  }
311
905
 
312
- .nav-section details summary {
313
- display: block;
906
+ #sidebar-navigation .nav-section-collapsible > .nav-list {
907
+ padding-left: var(--space-5);
908
+ border-left: 1px solid var(--color-border-subtle);
909
+ margin-left: 9px; /* Align with the section icon center */
314
910
  }
315
911
 
316
- .nav-section details summary::-webkit-details-marker {
317
- display: none;
912
+ #sidebar-navigation .nav-section-collapsible .nav-list .link-list {
913
+ border-left: none;
914
+ margin-left: 0;
915
+ padding-left: var(--space-5);
318
916
  }
319
917
 
320
- .nav-section details summary:before {
321
- content: "";
918
+ #sidebar-navigation .nav-section-collapsible .nav-list .link-list > li:last-child {
919
+ margin-bottom: 0;
920
+ }
921
+
922
+ /*
923
+ Improve chevron styling for details under link-list, using SVG chevron that matches nav-section-chevron
924
+ We need to avoid adding the element in class content generation so it doesn't break darkfish styles
925
+ */
926
+ #sidebar-navigation li details:has(.link-list) > summary {
927
+ display: inline-flex;
928
+ align-items: center;
929
+ gap: var(--space-2);
930
+ cursor: pointer;
322
931
  }
323
932
 
324
- .nav-section details summary:after {
325
- content: " \25B6"; /* BLACK RIGHT-POINTING TRIANGLE */
933
+ #sidebar-navigation li details:has(.link-list) > summary::after {
934
+ content: '';
935
+ position: static;
936
+ display: inline-block;
937
+ width: 1rem;
938
+ height: 1rem;
939
+ flex-shrink: 0;
940
+ margin-left: 0;
941
+ background-color: var(--color-text-secondary);
942
+ mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'%3E%3C/polyline%3E%3C/svg%3E");
943
+ mask-size: contain;
944
+ mask-repeat: no-repeat;
945
+ mask-position: center;
946
+ -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'%3E%3C/polyline%3E%3C/svg%3E");
947
+ -webkit-mask-size: contain;
948
+ -webkit-mask-repeat: no-repeat;
949
+ -webkit-mask-position: center;
950
+ transition: transform var(--transition-base), background-color var(--transition-fast);
326
951
  }
327
- .nav-section details[open] > summary:after {
328
- content: " \25BD"; /* WHITE DOWN-POINTING TRIANGLE */
952
+
953
+ #sidebar-navigation li details:has(.link-list) > summary:hover::after {
954
+ background-color: var(--color-accent-primary);
329
955
  }
330
956
 
331
- /* @end */
957
+ #sidebar-navigation li details:has(.link-list)[open] > summary::after {
958
+ transform: rotate(90deg);
959
+ background-color: var(--color-accent-primary);
960
+ }
332
961
 
333
- /* @group Documentation Section */
962
+ /* 8. Main Content (Center Column) */
334
963
  main {
335
- color: #333;
964
+ grid-area: main;
965
+ width: 100%;
966
+ min-width: 0;
967
+ max-width: var(--layout-content-max-width);
968
+ margin: 0 auto;
969
+ padding: var(--space-12) var(--space-8);
970
+ font-size: var(--font-size-base);
971
+ line-height: var(--line-height-relaxed);
972
+ color: var(--color-text-primary);
973
+ box-sizing: border-box;
974
+ }
975
+
976
+ /* Desktop: hide hamburger */
977
+ @media (width >= 1024px) {
978
+ #sidebar-navigation-toggle {
979
+ display: none;
980
+ }
981
+ }
982
+
983
+ /* Mobile: full width with padding */
984
+ @media (width <= 1023px) {
985
+ main {
986
+ padding: var(--space-6) var(--space-4);
987
+ padding-top: var(--space-8);
988
+ width: 100%;
989
+ }
990
+
991
+ footer.site-footer {
992
+ padding: var(--space-8) var(--space-4);
993
+ }
994
+
995
+ footer.site-footer .footer-content {
996
+ grid-template-columns: 1fr;
997
+ gap: var(--space-6);
998
+ }
999
+ }
1000
+
1001
+ main h1.page-title {
1002
+ display: grid;
1003
+ gap: var(--space-2);
1004
+ justify-items: start;
1005
+ margin-top: 0;
1006
+ margin-bottom: var(--space-8);
1007
+ color: var(--color-accent-primary);
336
1008
  }
337
1009
 
338
- main > h1:first-child,
339
- main > h2:first-child,
340
- main > h3:first-child,
341
- main > h4:first-child,
342
- main > h5:first-child,
343
- main > h6:first-child {
344
- margin-top: 0px;
1010
+ main h1.page-title .page-title-kind {
1011
+ display: inline-flex;
1012
+ align-items: center;
1013
+ min-height: 1.625rem;
1014
+ padding: 0 var(--space-2);
1015
+ border: 1px solid var(--color-title-kind-border);
1016
+ border-radius: var(--radius-md);
1017
+ background: var(--color-accent-subtle);
1018
+ color: var(--color-accent-primary);
1019
+ font-size: var(--font-size-sm);
1020
+ font-weight: var(--font-weight-semibold);
1021
+ line-height: 1;
345
1022
  }
346
1023
 
347
- main sup {
348
- vertical-align: super;
349
- font-size: 0.8em;
1024
+ main h1.page-title .page-title-name {
1025
+ max-width: 100%;
1026
+ color: var(--color-accent-primary);
1027
+ font-size: var(--font-size-3xl);
1028
+ font-weight: var(--font-weight-bold);
1029
+ line-height: var(--line-height-tight);
1030
+ overflow-wrap: anywhere;
350
1031
  }
351
1032
 
352
- /* The heading with the class name */
353
- main h1[class] {
354
- margin-top: 0;
355
- margin-bottom: 1em;
356
- font-size: 2em;
357
- color: #6C8C22;
1033
+ main h1,
1034
+ main h2,
1035
+ main h3,
1036
+ main h4,
1037
+ main h5,
1038
+ main h6 {
1039
+ font-family: var(--font-heading);
1040
+ color: var(--color-accent-primary);
1041
+ scroll-margin-top: calc(var(--layout-header-height) + 2rem);
358
1042
  }
359
1043
 
1044
+ /* Heading size hierarchy */
360
1045
  main h1 {
361
- margin: 2em 0 0.5em;
362
- font-size: 1.7em;
1046
+ font-size: var(--font-size-3xl);
1047
+ font-weight: var(--font-weight-bold);
1048
+ margin-bottom: var(--space-4);
1049
+ line-height: var(--line-height-tight);
363
1050
  }
364
1051
 
365
1052
  main h2 {
366
- margin: 2em 0 0.5em;
367
- font-size: 1.5em;
1053
+ font-size: var(--font-size-2xl);
1054
+ font-weight: var(--font-weight-semibold);
1055
+ margin-top: var(--space-8);
1056
+ margin-bottom: var(--space-4);
1057
+ line-height: var(--line-height-tight);
368
1058
  }
369
1059
 
370
1060
  main h3 {
371
- margin: 2em 0 0.5em;
372
- font-size: 1.2em;
1061
+ font-size: var(--font-size-xl);
1062
+ font-weight: var(--font-weight-semibold);
1063
+ margin-top: var(--space-6);
1064
+ margin-bottom: var(--space-3);
1065
+ line-height: var(--line-height-tight);
373
1066
  }
374
1067
 
375
1068
  main h4 {
376
- margin: 2em 0 0.5em;
377
- font-size: 1.1em;
1069
+ font-size: var(--font-size-lg);
1070
+ font-weight: var(--font-weight-medium);
1071
+ margin-top: var(--space-4);
1072
+ margin-bottom: var(--space-2);
1073
+ }
1074
+
1075
+ main h5, main h6 {
1076
+ font-size: var(--font-size-base);
1077
+ font-weight: var(--font-weight-medium);
1078
+ margin-top: var(--space-3);
1079
+ margin-bottom: var(--space-2);
1080
+ }
1081
+
1082
+ /* Heading links */
1083
+ main h1 a,
1084
+ main h2 a,
1085
+ main h3 a,
1086
+ main h4 a,
1087
+ main h5 a,
1088
+ main h6 a {
1089
+ color: inherit;
1090
+ text-decoration: none;
378
1091
  }
379
1092
 
380
- main h5 {
381
- margin: 2em 0 0.5em;
382
- font-size: 1em;
1093
+ main h1 a:hover,
1094
+ main h2 a:hover,
1095
+ main h3 a:hover,
1096
+ main h4 a:hover,
1097
+ main h5 a:hover,
1098
+ main h6 a:hover {
1099
+ text-decoration: underline;
383
1100
  }
384
1101
 
385
- main h6 {
386
- margin: 2em 0 0.5em;
387
- font-size: 1em;
1102
+ /* Syntax Highlighting - Light Theme */
1103
+ .ruby-constant { color: var(--code-orange); }
1104
+ .ruby-keyword { color: var(--code-red); }
1105
+ .ruby-ivar { color: var(--code-orange); }
1106
+ .ruby-operator { color: var(--code-green); }
1107
+ .ruby-identifier { color: var(--code-blue); }
1108
+
1109
+ .ruby-comment {
1110
+ color: var(--color-neutral-500);
1111
+ font-style: italic;
1112
+ }
1113
+ .ruby-regexp { color: var(--code-purple); }
1114
+ .ruby-value { color: var(--code-orange); }
1115
+ .ruby-string { color: var(--code-green); }
1116
+
1117
+ /* Syntax Highlighting - Dark Theme */
1118
+ [data-theme="dark"] .ruby-constant { color: var(--code-orange); }
1119
+ [data-theme="dark"] .ruby-keyword { color: var(--code-red); }
1120
+ [data-theme="dark"] .ruby-ivar { color: var(--code-orange); }
1121
+ [data-theme="dark"] .ruby-operator { color: var(--code-green); }
1122
+ [data-theme="dark"] .ruby-identifier { color: var(--code-blue); }
1123
+
1124
+ [data-theme="dark"] .ruby-comment {
1125
+ color: var(--color-neutral-400);
1126
+ font-style: italic;
1127
+ }
1128
+ [data-theme="dark"] .ruby-regexp { color: var(--code-purple); }
1129
+ [data-theme="dark"] .ruby-value { color: var(--code-orange); }
1130
+ [data-theme="dark"] .ruby-string { color: var(--code-green); }
1131
+
1132
+ /* C Syntax Highlighting */
1133
+ .c-keyword { color: var(--code-red); }
1134
+ .c-type { color: var(--code-cyan); }
1135
+ .c-macro { color: var(--code-orange); }
1136
+ .c-function { color: var(--code-purple); }
1137
+ .c-identifier { color: var(--color-text-secondary); }
1138
+ .c-operator { color: var(--code-green); }
1139
+ .c-preprocessor { color: var(--code-purple); }
1140
+ .c-value { color: var(--code-orange); }
1141
+ .c-string { color: var(--code-green); }
1142
+
1143
+ .c-comment {
1144
+ color: var(--code-gray);
1145
+ font-style: italic;
1146
+ }
1147
+
1148
+ /* Shell Syntax Highlighting */
1149
+ .sh-prompt { color: var(--code-gray); }
1150
+ .sh-command { color: var(--code-blue); }
1151
+ .sh-option { color: var(--code-cyan); }
1152
+ .sh-string { color: var(--code-green); }
1153
+ .sh-envvar { color: var(--code-purple); }
1154
+
1155
+ .sh-comment {
1156
+ color: var(--code-gray);
1157
+ font-style: italic;
1158
+ }
1159
+
1160
+ /* RBS Type Signature Links — linked types get subtle underline */
1161
+ a.rbs-type {
1162
+ color: inherit;
1163
+ text-decoration: underline;
1164
+ text-decoration-color: var(--color-border-default);
1165
+ text-underline-offset: 0.2em;
1166
+ transition: text-decoration-color var(--transition-fast), color var(--transition-fast);
388
1167
  }
389
1168
 
1169
+ a.rbs-type:hover {
1170
+ color: var(--color-link-hover);
1171
+ text-decoration-color: var(--color-link-hover);
1172
+ }
1173
+
1174
+ /* Emphasis */
1175
+ em {
1176
+ text-decoration-color: var(--color-emphasis-decoration);
1177
+ text-decoration-line: underline;
1178
+ text-decoration-style: dotted;
1179
+ }
1180
+
1181
+ strong,
1182
+ em {
1183
+ color: var(--color-accent-primary);
1184
+ background-color: var(--color-emphasis-bg);
1185
+ }
1186
+
1187
+ /* Paragraphs */
390
1188
  main p {
391
- margin: 0 0 0.5em;
392
- line-height: 1.4em;
1189
+ line-height: var(--line-height-relaxed);
1190
+ font-weight: 400;
1191
+ margin-bottom: var(--space-4);
393
1192
  }
394
1193
 
1194
+ main .rdoc-logo {
1195
+ margin: var(--space-6) 0 var(--space-8);
1196
+ text-align: center;
1197
+ }
1198
+
1199
+ main .rdoc-logo img {
1200
+ display: inline-block;
1201
+ width: clamp(120px, 14vw, 168px);
1202
+ height: auto;
1203
+ filter: drop-shadow(0 8px 18px rgb(230 41 35 / 8%));
1204
+ }
1205
+
1206
+ [data-theme="dark"] main .rdoc-logo img {
1207
+ filter: saturate(0.58) brightness(1.4) drop-shadow(0 8px 22px rgb(235 84 79 / 16%));
1208
+ }
1209
+
1210
+ /* Preformatted Text */
395
1211
  main pre {
396
1212
  margin: 1.2em 0.5em;
397
1213
  padding: 1em;
398
1214
  font-size: 0.8em;
399
1215
  }
400
1216
 
1217
+ .code-block-wrapper pre {
1218
+ margin: 0;
1219
+ }
1220
+
1221
+ /* Horizontal Rules */
401
1222
  main hr {
402
1223
  margin: 1.5em 1em;
403
- border: 2px solid #ddd;
1224
+ border: 2px solid var(--color-border-default);
404
1225
  }
405
1226
 
1227
+ /* Blockquotes */
406
1228
  main blockquote {
407
1229
  margin: 0 2em 1.2em 1.2em;
408
1230
  padding-left: 0.5em;
409
- border-left: 2px solid #ddd;
410
- }
411
-
412
- main ol,
413
- main ul {
414
- margin: 1em 2em;
1231
+ border-left: 2px solid var(--color-border-default);
415
1232
  }
416
1233
 
1234
+ /* Lists */
417
1235
  main li > p {
418
- margin-bottom: 0.5em;
1236
+ margin: 0.5em;
419
1237
  }
420
1238
 
1239
+ /* Definition Lists */
421
1240
  main dl {
422
1241
  margin: 1em 0.5em;
423
1242
  }
424
1243
 
425
1244
  main dt {
426
- margin-bottom: 0.5em;
1245
+ line-height: 1.5;
427
1246
  font-weight: bold;
428
1247
  }
429
1248
 
1249
+ main dl.note-list dt {
1250
+ margin-right: 1em;
1251
+ float: left;
1252
+ }
1253
+
1254
+ main dl.note-list dt:has(+ dt) {
1255
+ margin-right: 0.25em;
1256
+ }
1257
+
1258
+ main dl.note-list dt:has(+ dt)::after {
1259
+ content: ', ';
1260
+ font-weight: normal;
1261
+ }
1262
+
430
1263
  main dd {
431
- margin: 0 1em 1em 0.5em;
1264
+ margin: 0 0 1em 1em;
432
1265
  }
433
1266
 
1267
+ main dd p:first-child {
1268
+ margin-top: 0;
1269
+ }
1270
+
1271
+ /* Headers within Main */
434
1272
  main header h2 {
435
- margin-top: 2em;
1273
+ margin: var(--space-8) 0 var(--space-4);
1274
+ padding-top: var(--space-3);
436
1275
  border-width: 0;
437
- border-top: 4px solid #bbb;
438
- font-size: 130%;
1276
+ border-top: 1px solid var(--color-border-default);
1277
+ font-size: var(--font-size-2xl);
439
1278
  }
440
1279
 
441
1280
  main header h3 {
442
- margin: 2em 0 1.5em;
1281
+ margin: var(--space-8) 0 var(--space-6);
1282
+ padding-top: var(--space-3);
443
1283
  border-width: 0;
444
- border-top: 3px solid #bbb;
445
- font-size: 120%;
1284
+ border-top: 1px solid var(--color-border-default);
1285
+ font-size: var(--font-size-xl);
446
1286
  }
447
1287
 
448
- .documentation-section-title {
449
- position: relative;
1288
+ h1:target,
1289
+ h2:target,
1290
+ h3:target,
1291
+ h4:target,
1292
+ h5:target,
1293
+ h6:target {
1294
+ margin-left: calc(-1 * var(--space-5));
1295
+ padding-left: calc(var(--space-5) / 2);
1296
+ border-left: calc(var(--space-5) / 2) solid var(--color-border-default);
450
1297
  }
451
- .documentation-section-title .section-click-top {
452
- position: absolute;
453
- top: 6px;
454
- left: 12px;
455
- font-size: 10px;
456
- color: #9b9877;
457
- visibility: hidden;
458
- padding-left: 0.5px;
1298
+
1299
+ main .anchor-link:target {
1300
+ scroll-margin-top: calc(var(--layout-header-height) + 2rem);
459
1301
  }
460
1302
 
461
- .documentation-section-title:hover .section-click-top {
462
- visibility: visible;
1303
+ /* Legacy anchor for backward compatibility with old label- prefix links */
1304
+ .legacy-anchor {
1305
+ display: block;
1306
+ position: relative;
1307
+ visibility: hidden;
1308
+ scroll-margin-top: calc(var(--layout-header-height) + 2rem);
463
1309
  }
464
1310
 
465
- .constants-list > dl {
466
- margin: 1em 0 2em;
467
- border: 0;
1311
+ /* When a legacy anchor is targeted, highlight the next heading sibling */
1312
+ .legacy-anchor:target + h1,
1313
+ .legacy-anchor:target + h2,
1314
+ .legacy-anchor:target + h3,
1315
+ .legacy-anchor:target + h4,
1316
+ .legacy-anchor:target + h5,
1317
+ .legacy-anchor:target + h6 {
1318
+ margin-left: calc(-1 * var(--space-5));
1319
+ padding-left: calc(var(--space-5) / 2);
1320
+ border-left: calc(var(--space-5) / 2) solid var(--color-border-default);
468
1321
  }
469
1322
 
470
- .constants-list > dl dt {
471
- margin-bottom: 0.75em;
472
- padding-left: 0;
473
- font-family: "Source Code Pro", Monaco, monospace;
474
- font-size: 110%;
1323
+
1324
+ /* Utility Classes */
1325
+ .hide { display: none !important; }
1326
+ .initially-hidden { display: none; }
1327
+
1328
+ /* Screen reader only */
1329
+ .sr-only {
1330
+ position: absolute;
1331
+ width: 1px;
1332
+ height: 1px;
1333
+ padding: 0;
1334
+ margin: -1px;
1335
+ overflow: hidden;
1336
+ clip-path: inset(50%);
1337
+ white-space: nowrap;
1338
+ border-width: 0;
475
1339
  }
476
1340
 
477
- .constants-list > dl dt a {
478
- color: inherit;
1341
+
1342
+
1343
+ /* Method Details */
1344
+ main .method-source-code {
1345
+ visibility: hidden;
1346
+ max-height: 0;
1347
+ overflow: hidden;
1348
+ opacity: 0;
1349
+ transform: translateY(-8px);
1350
+ transition:
1351
+ max-height var(--duration-medium) var(--ease-out-smooth),
1352
+ visibility var(--duration-medium),
1353
+ opacity var(--duration-fast) ease-out,
1354
+ transform var(--duration-fast) ease-out;
479
1355
  }
480
1356
 
481
- .constants-list > dl dd {
482
- margin: 0 0 2em 0;
483
- padding: 0;
484
- color: #666;
1357
+ main .method-source-code pre {
1358
+ border-color: var(--color-code-border);
1359
+ width: 100%;
1360
+ box-sizing: border-box;
1361
+ transition: border-color var(--transition-fast);
1362
+ scrollbar-width: thin;
1363
+ scrollbar-color: var(--color-border-default) transparent;
485
1364
  }
486
1365
 
487
- .documentation-section h2 {
488
- position: relative;
1366
+ main .method-source-code pre::-webkit-scrollbar {
1367
+ width: 6px;
1368
+ height: 6px;
489
1369
  }
490
1370
 
491
- .documentation-section h2 a {
492
- position: absolute;
493
- top: 8px;
494
- right: 10px;
495
- font-size: 12px;
496
- color: #9b9877;
497
- visibility: hidden;
1371
+ main .method-source-code pre::-webkit-scrollbar-track {
1372
+ background: transparent;
498
1373
  }
499
1374
 
500
- .documentation-section h2:hover a {
501
- visibility: visible;
1375
+ main .method-source-code pre::-webkit-scrollbar-thumb {
1376
+ background: var(--color-border-default);
1377
+ border-radius: var(--radius-sm);
502
1378
  }
503
1379
 
504
- /* @group Method Details */
1380
+ main .method-source-code pre::-webkit-scrollbar-thumb:hover {
1381
+ background: var(--color-border-emphasis);
1382
+ }
505
1383
 
506
- main .method-source-code {
507
- max-height: 0;
508
- overflow: auto;
509
- transition-duration: 200ms;
510
- transition-delay: 0ms;
511
- transition-property: all;
512
- transition-timing-function: ease-in-out;
1384
+ main .method-source-code pre::-webkit-scrollbar-corner {
1385
+ background: transparent;
513
1386
  }
514
1387
 
515
1388
  main .method-source-code.active-menu {
1389
+ visibility: visible;
516
1390
  max-height: 100vh;
1391
+ overflow: auto;
1392
+ opacity: 1;
1393
+ transform: translateY(0);
517
1394
  }
518
1395
 
519
1396
  main .method-description .method-calls-super {
520
- color: #333;
1397
+ color: var(--color-text-primary);
521
1398
  font-weight: bold;
522
1399
  }
523
1400
 
524
1401
  main .method-detail {
1402
+ position: relative;
525
1403
  margin-bottom: 2.5em;
526
- cursor: pointer;
527
1404
  }
528
1405
 
529
1406
  main .method-detail:target {
530
- margin-left: -10px;
531
- border-left: 10px solid #f1edba;
1407
+ margin-left: calc(-1 * var(--space-5));
1408
+ padding-left: calc(var(--space-5) / 2);
1409
+ border-left: calc(var(--space-5) / 2) solid var(--color-border-default);
1410
+ }
1411
+
1412
+ main .method-header {
1413
+ display: grid;
1414
+ grid-template-columns: minmax(0, 1fr) auto;
1415
+ gap: var(--space-4);
1416
+ align-items: center;
1417
+ background: var(--color-sig-bg);
1418
+ border: 1px solid var(--color-sig-border);
1419
+ border-radius: var(--radius-md);
1420
+ padding: var(--space-4);
1421
+ }
1422
+
1423
+ main .method-heading-group {
1424
+ min-width: 0;
532
1425
  }
533
1426
 
534
1427
  main .method-heading {
535
- position: relative;
536
- font-family: "Source Code Pro", Monaco, monospace;
537
- font-size: 110%;
538
- font-weight: bold;
539
- color: #333;
1428
+ display: flex;
1429
+ flex-direction: column;
1430
+ align-items: flex-start;
1431
+ font-family: var(--font-code);
1432
+ font-size: var(--font-size-lg);
1433
+ font-weight: var(--font-weight-semibold);
1434
+ line-height: var(--line-height-normal);
540
1435
  }
541
- main .method-heading :link,
542
- main .method-heading :visited {
1436
+
1437
+ main .method-heading a {
543
1438
  color: inherit;
1439
+ text-decoration: none;
1440
+ }
1441
+
1442
+ main .method-heading a:hover {
1443
+ color: var(--color-accent-primary);
1444
+ }
1445
+
1446
+ main .method-heading .method-callseq {
1447
+ display: block;
1448
+ }
1449
+
1450
+ main .method-heading .method-name {
1451
+ font-weight: var(--font-weight-semibold);
1452
+ overflow-wrap: anywhere;
544
1453
  }
545
- main .method-click-advice {
1454
+
1455
+ main .method-heading .method-args {
1456
+ font-weight: var(--font-weight-normal);
1457
+ }
1458
+
1459
+ /* Type signatures — overloads stack as a code block under the method name */
1460
+ pre.method-type-signature {
1461
+ position: relative;
1462
+ margin: var(--space-2) 0 0;
1463
+ padding: var(--space-2) 0 0;
1464
+ background: transparent;
1465
+ border: none;
1466
+ border-radius: 0;
1467
+ overflow: visible;
1468
+ font-family: var(--font-code);
1469
+ font-size: var(--font-size-sm);
1470
+ color: var(--color-text-tertiary);
1471
+ line-height: var(--line-height-tight);
1472
+ white-space: pre-wrap;
1473
+ overflow-wrap: break-word;
1474
+ }
1475
+
1476
+ pre.method-type-signature::before {
1477
+ content: '';
546
1478
  position: absolute;
547
- top: 2px;
548
- right: 5px;
549
- font-size: 12px;
550
- color: #9b9877;
551
- visibility: hidden;
552
- padding-right: 20px;
1479
+ top: 0;
1480
+ left: 0;
1481
+ right: 0;
1482
+ border-top: 1px dotted var(--color-border-default);
1483
+ }
1484
+
1485
+ pre.method-type-signature code {
1486
+ font-family: inherit;
1487
+ font-size: inherit;
1488
+ color: inherit;
1489
+ background: transparent;
1490
+ padding: 0;
1491
+ }
1492
+
1493
+ /* Attribute type sigs render inline after the [RW] badge */
1494
+ main .method-heading > .method-type-signature {
1495
+ display: inline;
1496
+ margin-left: var(--space-2);
1497
+ font-family: var(--font-code);
1498
+ font-size: var(--font-size-sm);
1499
+ color: var(--color-text-secondary);
1500
+ }
1501
+
1502
+ main .method-controls {
1503
+ position: static;
1504
+ align-self: center;
1505
+ }
1506
+
1507
+ main .method-controls summary {
1508
+ display: inline-flex;
1509
+ align-items: center;
1510
+ justify-content: center;
1511
+ gap: var(--space-2);
1512
+ min-height: 30px;
553
1513
  line-height: 20px;
554
- background: url(../images/zoom.png) no-repeat right top;
1514
+ color: var(--color-accent-primary);
1515
+ cursor: pointer;
1516
+ padding: var(--space-1) var(--space-3);
1517
+ border-radius: var(--radius-sm);
1518
+ font-size: var(--font-size-sm);
1519
+ font-weight: var(--font-weight-medium);
1520
+ background: var(--color-accent-subtle);
1521
+ border: 1px solid transparent;
1522
+ transition:
1523
+ color var(--transition-fast),
1524
+ background var(--transition-fast),
1525
+ border-color var(--transition-fast),
1526
+ transform var(--transition-fast);
1527
+ user-select: none;
1528
+ -webkit-user-select: none;
1529
+ white-space: nowrap;
1530
+ list-style: none;
555
1531
  }
556
- main .method-heading:hover .method-click-advice {
557
- visibility: visible;
1532
+
1533
+ main .method-controls summary::-webkit-details-marker {
1534
+ display: none;
558
1535
  }
559
1536
 
560
- main .method-alias .method-heading {
561
- color: #666;
1537
+ main .method-controls summary:hover {
1538
+ background: var(--color-primary-100);
1539
+ border-color: var(--color-primary-300);
1540
+ transform: translateY(-1px);
562
1541
  }
563
1542
 
564
- main .method-description,
565
- main .aliases {
566
- margin-top: 0.75em;
567
- color: #333;
1543
+ main .method-controls summary:active {
1544
+ transform: scale(0.96);
1545
+ }
1546
+
1547
+ main .method-source-icon {
1548
+ font-family: var(--font-code);
1549
+ font-size: var(--font-size-xs);
1550
+ line-height: 1;
1551
+ opacity: 0.8;
1552
+ }
1553
+
1554
+ [data-theme="dark"] main .method-controls summary:hover {
1555
+ background: var(--color-accent-subtle-hover);
1556
+ border-color: var(--color-primary-500);
1557
+ }
1558
+
1559
+ main .method-description {
1560
+ color: var(--color-text-primary);
1561
+ line-height: var(--line-height-relaxed);
1562
+ }
1563
+
1564
+ main .method-header ~ .method-description {
1565
+ margin-top: var(--space-5);
1566
+ padding-left: var(--space-2);
568
1567
  }
569
1568
 
570
1569
  main .aliases {
571
- padding-top: 4px;
1570
+ margin-top: var(--space-4);
1571
+ padding-top: var(--space-1);
572
1572
  font-style: italic;
573
1573
  cursor: default;
574
1574
  }
1575
+
1576
+ main .aliases a {
1577
+ color: var(--color-accent-hover);
1578
+ }
1579
+
1580
+ main .mixin-from {
1581
+ font-size: 80%;
1582
+ font-style: italic;
1583
+ margin-bottom: 0.75em;
1584
+ }
1585
+
575
1586
  main .method-description ul {
576
1587
  margin-left: 1.5em;
577
1588
  }
@@ -580,83 +1591,620 @@ main #attribute-method-details .method-detail:hover {
580
1591
  background-color: transparent;
581
1592
  cursor: default;
582
1593
  }
1594
+
583
1595
  main .attribute-access-type {
584
1596
  text-transform: uppercase;
585
- padding: 0 1em;
586
1597
  }
587
- /* @end */
588
1598
 
589
- /* @end */
1599
+ /* Small screen adjustments */
1600
+ @media (width <= 480px) {
1601
+ #sidebar-navigation {
1602
+ width: 85%;
1603
+ max-width: 320px;
1604
+ }
590
1605
 
591
- /* @group Source Code */
1606
+ main {
1607
+ margin: 0;
1608
+ padding: var(--space-4);
1609
+ max-width: 100%;
1610
+ }
592
1611
 
593
- pre {
594
- margin: 0.5em 0;
595
- border: 1px dashed #999;
596
- padding: 0.5em;
597
- background: #262626;
598
- color: white;
599
- overflow: auto;
1612
+ table {
1613
+ display: block;
1614
+ overflow-x: auto;
1615
+ white-space: nowrap;
1616
+ }
1617
+
1618
+ main .method-heading {
1619
+ font-size: var(--font-size-base);
1620
+ }
1621
+
1622
+ pre.method-type-signature {
1623
+ font-size: var(--font-size-xs);
1624
+ }
1625
+
1626
+ main .method-header {
1627
+ grid-template-columns: 1fr;
1628
+ gap: var(--space-3);
1629
+ padding: var(--space-2);
1630
+ }
1631
+
1632
+ main .method-controls {
1633
+ justify-self: start;
1634
+ }
1635
+ }
1636
+
1637
+
1638
+
1639
+ /* 9. Search */
1640
+ .search-backdrop,
1641
+ .search-icon,
1642
+ .search-close,
1643
+ .search-empty {
1644
+ display: none;
1645
+ }
1646
+
1647
+ /* 10. Right Sidebar - Table of Contents */
1648
+ #table-of-contents {
1649
+ grid-area: toc;
1650
+ align-self: start;
1651
+ position: sticky;
1652
+ top: var(--layout-header-height);
1653
+ padding: var(--space-8) var(--space-6);
1654
+ border: none;
1655
+ border-left: 1px solid var(--color-border-default);
1656
+ font-size: var(--font-size-base);
1657
+ }
1658
+
1659
+ #table-of-contents .toc-sticky {
1660
+ display: flex;
1661
+ flex-direction: column;
1662
+
1663
+ /* Exclude header height and top/bottom padding of #table-of-contents */
1664
+ height: calc(100vh - var(--layout-header-height) - var(--space-8) * 2);
1665
+ }
1666
+
1667
+ #table-of-contents .toc-nav {
1668
+ flex: 1 1 auto;
1669
+ min-height: 0;
1670
+ overflow-y: auto;
1671
+ scrollbar-width: thin;
1672
+ scrollbar-color: var(--color-border-default) transparent;
1673
+ }
1674
+
1675
+ #table-of-contents .toc-list > .toc-h2 {
1676
+ margin-left: var(--space-4);
1677
+ }
1678
+
1679
+ #table-of-contents .toc-list > .toc-h3 {
1680
+ margin-left: var(--space-8);
1681
+ }
1682
+
1683
+ /* Hide TOC on mobile/tablet */
1684
+ @media (width <= 1279px) {
1685
+ #table-of-contents {
1686
+ display: none;
1687
+ }
600
1688
  }
601
1689
 
602
- .ruby-constant { color: #7fffd4; background: transparent; }
603
- .ruby-keyword { color: #00ffff; background: transparent; }
604
- .ruby-ivar { color: #eedd82; background: transparent; }
605
- .ruby-operator { color: #00ffee; background: transparent; }
606
- .ruby-identifier { color: #ffdead; background: transparent; }
607
- .ruby-node { color: #ffa07a; background: transparent; }
608
- .ruby-comment { color: #dc0000; background: transparent; }
609
- .ruby-regexp { color: #ffa07a; background: transparent; }
610
- .ruby-value { color: #7fffd4; background: transparent; }
1690
+ /* Preserve the desktop sidebar/content grid when the TOC is hidden */
1691
+ @media (width >= 1024px) and (width <= 1279px) {
1692
+ body.has-toc {
1693
+ grid-template-columns: var(--layout-sidebar-width) 1fr;
1694
+ grid-template-areas:
1695
+ "header header"
1696
+ "nav main"
1697
+ "nav footer";
1698
+ }
1699
+ }
611
1700
 
612
- /* @end */
1701
+ /* Tablet adjustments (between mobile and desktop) */
1702
+ @media (width >= 768px) and (width <= 1023px) {
1703
+ header.top-navbar {
1704
+ padding: 0 var(--space-6);
1705
+ }
613
1706
 
1707
+ main {
1708
+ padding: var(--space-8) var(--space-6);
1709
+ max-width: 100%;
1710
+ }
1711
+ }
1712
+
1713
+ #table-of-contents h3 {
1714
+ font-size: var(--font-size-lg);
1715
+ font-weight: var(--font-weight-semibold);
1716
+ margin: 0 0 var(--space-5) 0;
1717
+ color: var(--color-text-primary);
1718
+ }
614
1719
 
615
- /* @group search results */
616
- #search-results {
617
- font-family: Lato, sans-serif;
1720
+ #table-of-contents ul {
1721
+ margin: 0;
1722
+ padding: 0;
1723
+ list-style: none;
1724
+ }
1725
+
1726
+ #table-of-contents ul ul {
1727
+ margin-top: var(--space-3);
1728
+ margin-left: var(--space-5);
1729
+ border-left: 1px solid var(--color-border-default);
1730
+ padding-left: var(--space-4);
1731
+ }
1732
+
1733
+ #table-of-contents li {
1734
+ margin-bottom: var(--space-3);
1735
+ }
1736
+
1737
+ #table-of-contents a {
1738
+ display: block;
1739
+ color: var(--color-text-secondary);
1740
+ text-decoration: none;
1741
+ transition: color var(--transition-fast);
1742
+ line-height: var(--line-height-relaxed);
1743
+ overflow-wrap: break-word;
1744
+ hyphens: auto;
1745
+ }
1746
+
1747
+ /* Nav hover styles sit here to keep specificity ordering with TOC links */
1748
+ #sidebar-navigation a:hover {
1749
+ color: var(--color-link-hover);
1750
+ text-decoration: underline;
1751
+ }
1752
+
1753
+ #table-of-contents a:hover {
1754
+ color: var(--color-link-hover);
1755
+ text-decoration: underline;
1756
+ }
1757
+
1758
+ #table-of-contents a:focus-visible {
1759
+ outline: 2px solid var(--color-accent-primary);
1760
+ outline-offset: 2px;
1761
+ border-radius: var(--radius-sm);
1762
+ }
1763
+
1764
+ #table-of-contents a.active {
1765
+ color: var(--color-accent-primary);
1766
+ font-weight: var(--font-weight-medium);
1767
+ }
1768
+
1769
+ ol.breadcrumb {
1770
+ display: flex;
1771
+ flex-wrap: wrap;
1772
+ padding: 0;
1773
+ margin: 0 0 1em;
1774
+ }
1775
+
1776
+ ol.breadcrumb li {
1777
+ display: block;
1778
+ min-width: 0;
1779
+ list-style: none;
1780
+ font-size: 125%;
1781
+ }
1782
+
1783
+ ol.breadcrumb a,
1784
+ ol.breadcrumb li > span:not(.separator) {
1785
+ overflow-wrap: anywhere;
1786
+ }
1787
+
1788
+ /* 11. Footer */
1789
+ footer.site-footer {
1790
+ grid-area: footer;
1791
+ background: var(--color-background-secondary);
1792
+ border-top: 1px solid var(--color-border-default);
1793
+ padding: var(--space-12) var(--space-6);
1794
+ }
1795
+
1796
+ footer.site-footer .footer-content {
1797
+ max-width: 1200px;
1798
+ margin: 0 auto;
1799
+ display: grid;
1800
+ grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
1801
+ gap: var(--space-8);
1802
+ }
1803
+
1804
+ footer.site-footer h3 {
1805
+ font-size: var(--font-size-sm);
1806
+ font-weight: var(--font-weight-semibold);
1807
+ color: var(--color-text-primary);
1808
+ margin: 0 0 var(--space-4) 0;
1809
+ letter-spacing: 0.05em;
1810
+ }
1811
+
1812
+ footer.site-footer ul {
1813
+ list-style: none;
1814
+ margin: 0;
1815
+ padding: 0;
1816
+ }
1817
+
1818
+ footer.site-footer li {
1819
+ margin-bottom: var(--space-2);
1820
+ }
1821
+
1822
+ footer.site-footer a {
1823
+ color: var(--color-text-secondary);
1824
+ text-decoration: none;
1825
+ font-size: var(--font-size-sm);
1826
+ transition: color var(--transition-fast);
1827
+ }
1828
+
1829
+ footer.site-footer a:hover {
1830
+ color: var(--color-link-hover);
1831
+ }
1832
+
1833
+ footer.site-footer .footer-bottom {
1834
+ margin-top: var(--space-8);
1835
+ padding-top: var(--space-6);
1836
+ border-top: 1px solid var(--color-border-default);
1837
+ text-align: center;
1838
+ font-size: var(--font-size-xs);
1839
+ color: var(--color-text-tertiary);
1840
+ }
1841
+
1842
+ footer.site-footer .footer-bottom:first-child {
1843
+ margin-top: 0;
1844
+ padding-top: 0;
1845
+ border-top: none;
1846
+ }
1847
+
1848
+ /* Search */
1849
+ #search-section {
1850
+ padding: var(--space-6);
1851
+ background-color: var(--color-background-primary);
1852
+ border-bottom: 1px solid var(--color-border-default);
1853
+ }
1854
+
1855
+ #search-field-wrapper {
1856
+ position: relative;
1857
+ display: flex;
1858
+ align-items: center;
1859
+ }
1860
+
1861
+ #search-field {
1862
+ width: 100%;
1863
+ padding: var(--space-2) var(--space-4) var(--space-2) 2.5rem;
1864
+ border: 1px solid var(--color-border-default);
1865
+ border-radius: 1.25rem;
1866
+ font-size: var(--font-size-sm);
1867
+ outline: none;
1868
+ transition: border-color var(--transition-base);
1869
+ color: var(--color-text-primary);
1870
+ }
1871
+
1872
+ #search-field:focus {
1873
+ border-color: var(--color-accent-primary);
1874
+ }
1875
+
1876
+ #search-field::placeholder {
1877
+ color: var(--color-text-primary);
1878
+ }
1879
+
1880
+ #search-field-wrapper::before {
1881
+ content: "\1F50D";
1882
+ position: absolute;
1883
+ left: var(--space-3);
1884
+ top: 50%;
1885
+ transform: translateY(-50%);
1886
+ font-size: var(--font-size-sm);
1887
+ color: var(--color-text-primary);
1888
+ opacity: 0.6;
1889
+ }
1890
+
1891
+ /* Search Results */
1892
+ .search-results {
1893
+ font-family: var(--font-primary);
618
1894
  font-weight: 300;
619
1895
  }
620
1896
 
621
- #search-results .search-match {
622
- font-family: Helvetica, sans-serif;
1897
+ .search-results a {
1898
+ color: var(--color-text-primary);
1899
+ }
1900
+
1901
+ .search-results a:hover {
1902
+ color: var(--color-accent-primary);
1903
+ }
1904
+
1905
+ .search-results .search-match {
1906
+ font-family: var(--font-heading);
623
1907
  font-weight: normal;
624
1908
  }
625
1909
 
626
- #search-results .search-selected {
627
- background: #e8e8e8;
1910
+ .search-results .search-selected {
1911
+ background: var(--color-code-bg);
628
1912
  border-bottom: 1px solid transparent;
629
1913
  }
630
1914
 
631
- #search-results li {
1915
+ .search-results li {
1916
+ position: relative;
632
1917
  list-style: none;
633
- border-bottom: 1px solid #aaa;
1918
+ border-bottom: 1px solid var(--color-border-default);
634
1919
  margin-bottom: 0.5em;
1920
+ cursor: pointer;
635
1921
  }
636
1922
 
637
- #search-results li:last-child {
1923
+ .search-results li:last-child {
638
1924
  border-bottom: none;
639
1925
  margin-bottom: 0;
640
1926
  }
641
1927
 
642
- #search-results li p {
1928
+ .search-results li p {
643
1929
  padding: 0;
644
1930
  margin: 0.5em;
645
1931
  }
646
1932
 
647
- #search-results .search-namespace {
1933
+ .search-results .search-match a::after {
1934
+ content: "";
1935
+ position: absolute;
1936
+ inset: 0;
1937
+ }
1938
+
1939
+ .search-results li:focus-within {
1940
+ background: var(--color-code-bg);
1941
+ }
1942
+
1943
+ .search-results .search-namespace {
648
1944
  font-weight: bold;
649
1945
  }
650
1946
 
651
- #search-results li em {
652
- background: yellow;
1947
+ .search-results .search-type {
1948
+ display: inline-block;
1949
+ margin-left: var(--space-2);
1950
+ padding: 0 var(--space-2);
1951
+ font-size: var(--font-size-xs);
1952
+ font-weight: 500;
1953
+ border-radius: var(--radius-sm);
1954
+ vertical-align: middle;
1955
+ background: var(--color-background-tertiary);
1956
+ color: var(--color-text-secondary);
1957
+ }
1958
+
1959
+ .search-results .search-type-class {
1960
+ background: var(--color-search-type-class-bg);
1961
+ color: var(--color-search-type-class-text);
1962
+ }
1963
+
1964
+ .search-results .search-type-module {
1965
+ background: var(--color-search-type-module-bg);
1966
+ color: var(--color-search-type-module-text);
1967
+ }
1968
+
1969
+ .search-results .search-type-constant {
1970
+ background: var(--color-search-type-constant-bg);
1971
+ color: var(--color-search-type-constant-text);
1972
+ }
1973
+
1974
+ .search-results .search-type-instance-method,
1975
+ .search-results .search-type-class-method {
1976
+ background: var(--color-search-type-method-bg);
1977
+ color: var(--color-search-type-method-text);
1978
+ }
1979
+
1980
+ .search-results li em {
1981
+ background-color: var(--color-search-highlight-bg);
653
1982
  font-style: normal;
654
1983
  }
655
1984
 
656
- #search-results pre {
1985
+ .search-results pre {
657
1986
  margin: 0.5em;
658
- font-family: "Source Code Pro", Monaco, monospace;
1987
+ font-family: var(--font-code);
1988
+ }
1989
+
1990
+ header.top-navbar #search-field {
1991
+ display: block;
1992
+ box-sizing: border-box;
1993
+ width: 100%;
1994
+ padding: var(--space-2) var(--space-4);
1995
+ border: 1px solid var(--color-border-default);
1996
+ border-radius: var(--radius-md);
1997
+ font-size: var(--font-size-base);
1998
+ background: var(--color-background-primary);
1999
+ color: var(--color-text-primary);
2000
+ transition: border-color var(--transition-fast);
2001
+ }
2002
+
2003
+ header.top-navbar #search-field:focus {
2004
+ outline: none;
2005
+ border-color: var(--color-accent-primary);
2006
+ box-shadow: 0 0 0 3px var(--color-accent-subtle);
2007
+ }
2008
+
2009
+ header.top-navbar #search-field::placeholder {
2010
+ color: var(--color-text-tertiary);
2011
+ }
2012
+
2013
+ /* Search results dropdown in navbar */
2014
+ header.top-navbar #search-results {
2015
+ box-sizing: border-box;
2016
+ position: absolute;
2017
+ top: calc(100% + var(--space-2));
2018
+ left: 0;
2019
+ width: 100%;
2020
+ max-height: 60vh;
2021
+ background: var(--color-background-primary);
2022
+ border: 1px solid var(--color-border-default);
2023
+ border-radius: var(--radius-lg);
2024
+ box-shadow: var(--shadow-lg);
2025
+ overflow-y: auto;
2026
+ z-index: var(--z-popover);
2027
+ margin: 0;
2028
+ padding: 0;
659
2029
  }
660
2030
 
661
- /* @end */
2031
+ header.top-navbar #search-results.initially-hidden {
2032
+ display: none;
2033
+ }
662
2034
 
2035
+ header.top-navbar #search-results[aria-expanded="false"] {
2036
+ display: none;
2037
+ }
2038
+
2039
+ @media (width <= 1023px) {
2040
+ body:has(header.top-navbar .navbar-search.is-open) {
2041
+ overflow: hidden;
2042
+ }
2043
+
2044
+ body:has(header.top-navbar .navbar-search.is-open) header.top-navbar {
2045
+ z-index: var(--z-modal);
2046
+ }
2047
+
2048
+ header.top-navbar .navbar-search.is-open .search-backdrop {
2049
+ position: fixed;
2050
+ inset: 0;
2051
+ z-index: 1;
2052
+ display: block;
2053
+ background: var(--color-overlay);
2054
+ }
2055
+
2056
+ header.top-navbar .navbar-search.is-open .search-surface {
2057
+ position: fixed;
2058
+ top: var(--space-16);
2059
+ left: 50%;
2060
+ z-index: 2;
2061
+ display: flex;
2062
+ flex-direction: column;
2063
+ width: calc(100% - var(--space-8));
2064
+ max-width: 600px;
2065
+ max-height: 80vh;
2066
+ margin: 0;
2067
+ overflow: hidden;
2068
+ background: var(--color-background-primary);
2069
+ border-radius: var(--radius-lg);
2070
+ box-shadow: var(--shadow-xl);
2071
+ transform: translateX(-50%);
2072
+ }
2073
+
2074
+ header.top-navbar .navbar-search.is-open .search-form {
2075
+ display: flex;
2076
+ align-items: center;
2077
+ gap: var(--space-3);
2078
+ padding: var(--space-6);
2079
+ border-bottom: 1px solid var(--color-border-default);
2080
+ }
2081
+
2082
+ header.top-navbar .navbar-search.is-open .search-icon {
2083
+ display: inline;
2084
+ flex-shrink: 0;
2085
+ color: var(--color-text-secondary);
2086
+ font-size: 1.5rem;
2087
+ }
2088
+
2089
+ header.top-navbar .navbar-search.is-open #search-field {
2090
+ flex: 1;
2091
+ min-width: 0;
2092
+ padding: 0;
2093
+ border: none;
2094
+ outline: none;
2095
+ background: transparent;
2096
+ box-shadow: none;
2097
+ font-size: var(--font-size-lg);
2098
+ }
2099
+
2100
+ header.top-navbar .navbar-search.is-open .search-close {
2101
+ display: block;
2102
+ flex-shrink: 0;
2103
+ padding: var(--space-2) var(--space-4);
2104
+ border: 1px solid var(--color-border-default);
2105
+ border-radius: var(--radius-md);
2106
+ background: var(--color-background-secondary);
2107
+ color: var(--color-text-secondary);
2108
+ cursor: pointer;
2109
+ font-size: var(--font-size-sm);
2110
+ transition: background var(--transition-fast), border-color var(--transition-fast);
2111
+ }
2112
+
2113
+ header.top-navbar .navbar-search.is-open .search-close:hover {
2114
+ border-color: var(--color-border-default);
2115
+ background: var(--color-background-tertiary);
2116
+ }
2117
+
2118
+ header.top-navbar .navbar-search.is-open .search-body {
2119
+ display: flex;
2120
+ flex: 1;
2121
+ flex-direction: column;
2122
+ min-height: 0;
2123
+ overflow: hidden;
2124
+ }
2125
+
2126
+ header.top-navbar .navbar-search.is-open .search-empty {
2127
+ display: block;
2128
+ margin: var(--space-6);
2129
+ padding: var(--space-12) 0;
2130
+ color: var(--color-text-tertiary);
2131
+ text-align: center;
2132
+ }
2133
+
2134
+ header.top-navbar .navbar-search.is-open #search-results {
2135
+ flex: 1;
2136
+ min-height: 0;
2137
+ position: relative;
2138
+ max-height: none;
2139
+ margin: 0;
2140
+ padding: var(--space-6);
2141
+ overflow-y: auto;
2142
+ border: none;
2143
+ border-radius: 0;
2144
+ box-shadow: none;
2145
+ }
2146
+
2147
+ header.top-navbar .navbar-search.is-open #search-results.initially-hidden {
2148
+ display: block;
2149
+ }
2150
+
2151
+ header.top-navbar .navbar-search.is-open #search-results[aria-expanded="false"] {
2152
+ display: none;
2153
+ }
2154
+
2155
+ header.top-navbar .navbar-search.is-open .search-results li {
2156
+ margin-bottom: var(--space-2);
2157
+ padding: var(--space-3) var(--space-4);
2158
+ border-radius: var(--radius-md);
2159
+ transition: background var(--transition-fast);
2160
+ }
2161
+
2162
+ header.top-navbar .navbar-search.is-open .search-results li:hover {
2163
+ background: var(--color-background-secondary);
2164
+ }
2165
+
2166
+ header.top-navbar .navbar-search.is-open .search-match {
2167
+ margin: 0;
2168
+ font-size: var(--font-size-base);
2169
+ }
2170
+
2171
+ header.top-navbar .navbar-search.is-open .search-match a {
2172
+ text-decoration: none;
2173
+ }
2174
+
2175
+ header.top-navbar .navbar-search.is-open .search-snippet {
2176
+ margin: var(--space-1) 0 0 0;
2177
+ color: var(--color-text-tertiary);
2178
+ font-size: var(--font-size-sm);
2179
+ }
2180
+ }
2181
+
2182
+ @media (width <= 420px) {
2183
+ header.top-navbar .navbar-search.is-open .search-surface {
2184
+ top: var(--space-4);
2185
+ width: calc(100% - var(--space-6));
2186
+ border-radius: var(--radius-md);
2187
+ }
2188
+
2189
+ header.top-navbar .navbar-search.is-open .search-form,
2190
+ header.top-navbar .navbar-search.is-open #search-results {
2191
+ padding: var(--space-3);
2192
+ }
2193
+
2194
+ header.top-navbar .navbar-search.is-open .search-empty {
2195
+ margin: var(--space-3);
2196
+ }
2197
+
2198
+ header.top-navbar .navbar-search.is-open .search-form {
2199
+ gap: var(--space-2);
2200
+ }
2201
+
2202
+ header.top-navbar .navbar-search.is-open #search-field {
2203
+ font-size: var(--font-size-base);
2204
+ }
2205
+
2206
+ header.top-navbar .navbar-search.is-open .search-close {
2207
+ padding: var(--space-1) var(--space-3);
2208
+ font-size: 0.75rem;
2209
+ }
2210
+ }