@opentf/afw-docs 0.0.0-stage → 0.31.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 (61) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +141 -2
  3. package/build/blog-posts-plugin.js +154 -0
  4. package/build/docs-nav-plugin.js +200 -0
  5. package/build/feed.js +176 -0
  6. package/build/frontmatter.js +45 -0
  7. package/build/host.js +54 -0
  8. package/build/index.js +13 -0
  9. package/build/last-updated-plugin.js +107 -0
  10. package/build/last-updated.js +40 -0
  11. package/build/llms.js +176 -0
  12. package/build/publish.js +29 -0
  13. package/build/reading-time.js +16 -0
  14. package/build/search.js +27 -0
  15. package/components/BlogLayout.jsx +104 -0
  16. package/components/Breadcrumbs.jsx +71 -0
  17. package/components/Callout.jsx +29 -0
  18. package/components/Card.jsx +21 -0
  19. package/components/Cards.jsx +11 -0
  20. package/components/CodeBlock.jsx +39 -0
  21. package/components/DocsLayout.jsx +106 -0
  22. package/components/FeedLinks.jsx +47 -0
  23. package/components/Footer.jsx +25 -0
  24. package/components/LastUpdated.jsx +20 -0
  25. package/components/NavIcon.jsx +34 -0
  26. package/components/Navbar.jsx +64 -0
  27. package/components/NavbarLink.jsx +40 -0
  28. package/components/Pagination.jsx +49 -0
  29. package/components/PostBanner.jsx +25 -0
  30. package/components/PostCard.jsx +24 -0
  31. package/components/PostList.jsx +25 -0
  32. package/components/PostMeta.jsx +37 -0
  33. package/components/ReadingTime.jsx +6 -0
  34. package/components/Search.jsx +191 -0
  35. package/components/SearchTrigger.jsx +32 -0
  36. package/components/Sidebar.jsx +199 -0
  37. package/components/SidebarNode.jsx +143 -0
  38. package/components/SidebarToggle.jsx +47 -0
  39. package/components/Steps.jsx +14 -0
  40. package/components/Table.jsx +10 -0
  41. package/components/Tabs.jsx +77 -0
  42. package/components/ThemeToggle.jsx +164 -0
  43. package/components/Toc.jsx +106 -0
  44. package/components/Tooltip.jsx +19 -0
  45. package/components/format.js +21 -0
  46. package/components/post-dates.js +21 -0
  47. package/components/sidebar-collapse.js +38 -0
  48. package/config.js +77 -0
  49. package/index.js +69 -0
  50. package/nav-virtual.js +18 -0
  51. package/package.json +79 -4
  52. package/posts-virtual.js +17 -0
  53. package/search.js +285 -0
  54. package/theme/index.css +1843 -0
  55. package/types/config.d.ts +39 -0
  56. package/types/index.d.ts +70 -0
  57. package/types/nav.d.ts +9 -0
  58. package/types/posts.d.ts +17 -0
  59. package/types/search.d.ts +28 -0
  60. package/types/updated.d.ts +4 -0
  61. package/updated-virtual.js +10 -0
@@ -0,0 +1,1843 @@
1
+ /* @opentf/afw-docs — default theme.
2
+ *
3
+ * Plain CSS (no Tailwind directives) so it can be `@import`ed by an app's stylesheet
4
+ * and inlined at build time, independent of the consumer's utility-class scanner.
5
+ * Components use semantic `afwd-*` class names; everything below is driven by the
6
+ * design-token CSS variables, which flip on `[data-theme='dark']`.
7
+ *
8
+ * Two class namespaces, never mixed:
9
+ * - `afw-<kebab>` — the host hook the compiler stamps on every component host
10
+ * (`<Navbar>` → `.afw-navbar`), plus classes the compiler emits
11
+ * itself (`.afw-code`, `.afw-table-wrap`, `.afw-heading-anchor`…).
12
+ * - `afwd-*` — this theme's own elements (`<header class="afwd-navbar">`).
13
+ * A theme element must not reuse `afw-<component>`: the host and its root element
14
+ * would both match, so a host rule like `display: contents` would also flatten the
15
+ * element it wraps.
16
+ */
17
+
18
+ /* Everything sits in the `afw-docs` cascade layer, so any unlayered site stylesheet
19
+ * overrides the theme regardless of selector specificity — no `!important` or
20
+ * doubled selectors needed. Imported after Tailwind, the layer still ranks above
21
+ * Tailwind's own layers (preflight, utilities). */
22
+ @layer afw-docs {
23
+ :root {
24
+ --afw-bg: #ffffff;
25
+ --afw-bg-surface: #f8fafc;
26
+ --afw-bg-elevated: #ffffff;
27
+ --afw-text: #0f172a;
28
+ --afw-text-muted: #64748b;
29
+ --afw-border: #e2e8f0;
30
+ --afw-accent: #ff851b;
31
+ --afw-accent-contrast: #ffffff;
32
+ --afw-accent-soft: rgba(255, 133, 27, 0.12);
33
+ --afw-code-bg: #f1f5f9;
34
+ --afw-code-text: #be4f0c;
35
+ --afw-selection: rgba(255, 133, 27, 0.22);
36
+
37
+ --afw-sidebar-width: 17rem;
38
+ --afw-toc-width: 15rem;
39
+ --afw-content-max: 48rem;
40
+ --afw-navbar-height: 3.75rem;
41
+ --afw-radius: 0.625rem;
42
+ --afw-font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
43
+ --afw-mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, monospace;
44
+ }
45
+
46
+ [data-theme="dark"] {
47
+ --afw-bg: #020617;
48
+ --afw-bg-surface: #0b1220;
49
+ --afw-bg-elevated: #0f172a;
50
+ --afw-text: #e2e8f0;
51
+ --afw-text-muted: #94a3b8;
52
+ --afw-border: #1e293b;
53
+ --afw-accent: #ff943d;
54
+ --afw-accent-contrast: #0b1220;
55
+ --afw-accent-soft: rgba(255, 148, 61, 0.16);
56
+ --afw-code-bg: #0f172a;
57
+ --afw-code-text: #ffb784;
58
+ --afw-selection: rgba(255, 148, 61, 0.3);
59
+ }
60
+
61
+ html {
62
+ scroll-behavior: smooth;
63
+ scroll-padding-top: calc(var(--afw-navbar-height) + 1rem);
64
+ }
65
+
66
+ body {
67
+ margin: 0;
68
+ font-family: var(--afw-font);
69
+ background: var(--afw-bg);
70
+ color: var(--afw-text);
71
+ -webkit-font-smoothing: antialiased;
72
+ transition: background-color 0.2s ease, color 0.2s ease;
73
+ }
74
+
75
+ ::selection {
76
+ background: var(--afw-selection);
77
+ }
78
+
79
+ /* Custom elements are inline by default. Structural hosts become block-level grid
80
+ * items; pure wrapper hosts (a link, a list node) become layout-transparent
81
+ * (`display: contents`) so their inner semantic element participates directly in the
82
+ * surrounding flex/grid/list. Hosts are addressed by the stable `afw-<kebab>` class
83
+ * the compiler stamps on every component (the element tag itself is module-hashed
84
+ * to stay collision-free, so it is not a reliable selector). */
85
+ .afw-docs-layout,
86
+ .afw-toc,
87
+ .afw-footer,
88
+ .afw-breadcrumbs,
89
+ .afw-pagination,
90
+ .afw-callout,
91
+ .afw-tabs,
92
+ .afw-table {
93
+ display: block;
94
+ }
95
+ /* The navbar host must be transparent so its sticky <header> sticks to the page
96
+ * scroll container, not to its own wrapper. Link hosts are transparent so the inner
97
+ * <a> participates directly in the navbar/list flex layout. The sidebar host (and its
98
+ * shell wrapper) are transparent so the inner <aside> is the docs-grid column on
99
+ * desktop and a fixed off-canvas drawer on mobile; the burger host so the button sits
100
+ * directly in the navbar lead flow. */
101
+ .afw-navbar,
102
+ .afw-navbar-link,
103
+ .afw-link,
104
+ .afw-sidebar-node,
105
+ .afw-sidebar,
106
+ .afw-sidebar-toggle,
107
+ .afwd-sidebar-shell {
108
+ display: contents;
109
+ }
110
+
111
+ /* ── Shell ─────────────────────────────────────────────────────────────────── */
112
+ .afwd-shell {
113
+ display: flex;
114
+ flex-direction: column;
115
+ min-height: 100vh;
116
+ }
117
+ .afwd-shell-body {
118
+ flex: 1;
119
+ }
120
+
121
+ /* ── Navbar ────────────────────────────────────────────────────────────────── */
122
+ .afwd-navbar {
123
+ position: sticky;
124
+ top: 0;
125
+ z-index: 50;
126
+ height: var(--afw-navbar-height);
127
+ background: color-mix(in srgb, var(--afw-bg) 85%, transparent);
128
+ backdrop-filter: blur(8px);
129
+ border-bottom: 1px solid var(--afw-border);
130
+ }
131
+ .afwd-navbar-inner {
132
+ height: 100%;
133
+ max-width: 90rem;
134
+ margin: 0 auto;
135
+ padding: 0 1.5rem;
136
+ /* Three zones: brand (left) · search (centered) · nav + actions (right). The auto
137
+ * center column keeps the search trigger centered in the bar regardless of how wide
138
+ * the side zones are. */
139
+ display: grid;
140
+ grid-template-columns: 1fr auto 1fr;
141
+ align-items: center;
142
+ gap: 1.5rem;
143
+ }
144
+ .afwd-navbar-search {
145
+ justify-self: center;
146
+ }
147
+ .afwd-navbar-right {
148
+ justify-self: end;
149
+ display: flex;
150
+ align-items: center;
151
+ gap: 1.5rem;
152
+ }
153
+ .afwd-navbar-brand {
154
+ display: flex;
155
+ align-items: center;
156
+ gap: 0.5rem;
157
+ font-weight: 700;
158
+ font-size: 1.05rem;
159
+ color: var(--afw-text);
160
+ text-decoration: none;
161
+ }
162
+ .afwd-navbar-logo {
163
+ width: 1.75rem;
164
+ height: 1.75rem;
165
+ }
166
+ .afwd-navbar-version {
167
+ display: inline-flex;
168
+ align-items: center;
169
+ line-height: 1;
170
+ padding: 0.22rem 0.45rem;
171
+ border-radius: 0.4rem;
172
+ border: 1px solid var(--afw-border);
173
+ background: var(--afw-bg-surface);
174
+ color: var(--afw-text-muted);
175
+ font-size: 0.62rem;
176
+ font-weight: 700;
177
+ letter-spacing: 0.03em;
178
+ text-transform: uppercase;
179
+ }
180
+ /* Brand sits at the start of the left grid zone. */
181
+ .afwd-navbar-brand {
182
+ justify-self: start;
183
+ }
184
+ .afwd-navbar-nav {
185
+ display: flex;
186
+ align-items: center;
187
+ gap: 1.5rem;
188
+ font-size: 0.9rem;
189
+ }
190
+ .afwd-navbar-link {
191
+ position: relative;
192
+ display: inline-flex;
193
+ align-items: center;
194
+ gap: 0.4rem;
195
+ color: var(--afw-text-muted);
196
+ text-decoration: none;
197
+ font-weight: 500;
198
+ transition: color 0.15s;
199
+ }
200
+ /* Subtle accent underline beneath the link; scales in on the active route (and
201
+ * faintly on hover). */
202
+ .afwd-navbar-link::after {
203
+ content: "";
204
+ position: absolute;
205
+ left: 0;
206
+ right: 0;
207
+ bottom: -0.45rem;
208
+ height: 2px;
209
+ border-radius: 2px;
210
+ background: var(--afw-accent);
211
+ transform: scaleX(0);
212
+ transition: transform 0.18s ease, opacity 0.18s ease;
213
+ }
214
+ .afwd-navbar-link:hover {
215
+ color: var(--afw-text);
216
+ }
217
+ .afwd-navbar-link:hover::after {
218
+ transform: scaleX(1);
219
+ opacity: 0.35;
220
+ }
221
+ .afwd-navbar-link.afwd-active {
222
+ color: var(--afw-text);
223
+ font-weight: 600;
224
+ }
225
+ .afwd-navbar-link.afwd-active::after {
226
+ transform: scaleX(1);
227
+ opacity: 1;
228
+ }
229
+ .afwd-nav-icon {
230
+ display: inline-flex;
231
+ }
232
+ .afwd-nav-icon svg {
233
+ display: block;
234
+ }
235
+ .afwd-navbar-actions {
236
+ display: flex;
237
+ align-items: center;
238
+ gap: 0.5rem;
239
+ }
240
+ /* GitHub link and theme toggle are uniform ghost icon buttons (no border/fill, subtle
241
+ * hover background), so the whole right cluster (links + icons) reads as one aligned
242
+ * row. */
243
+ .afwd-navbar-icon {
244
+ display: inline-flex;
245
+ align-items: center;
246
+ justify-content: center;
247
+ width: 2rem;
248
+ height: 2rem;
249
+ padding: 0;
250
+ border: none;
251
+ background: none;
252
+ border-radius: 0.5rem;
253
+ color: var(--afw-text-muted);
254
+ cursor: pointer;
255
+ font-family: inherit;
256
+ /* Icons compile to inline custom-element hosts with the inherited 1.5 line-height,
257
+ * which baseline-aligns the SVG and pushes it a few px above center. Zero the line
258
+ * box so the flex centering is exact. */
259
+ line-height: 0;
260
+ }
261
+ .afwd-navbar-icon > * {
262
+ display: inline-flex;
263
+ align-items: center;
264
+ }
265
+ .afwd-navbar-icon:hover {
266
+ color: var(--afw-text);
267
+ background: var(--afw-bg-surface);
268
+ }
269
+
270
+ /* Left zone of the navbar: an optional mobile drawer burger followed by the brand. */
271
+ .afwd-navbar-lead {
272
+ justify-self: start;
273
+ display: flex;
274
+ align-items: center;
275
+ gap: 0.5rem;
276
+ min-width: 0;
277
+ }
278
+ /* The burger reuses `.afwd-navbar-icon` styling; this rule (after it, so it wins the
279
+ * display cascade) hides it except on small screens that actually have a sidebar
280
+ * mounted — the <Sidebar> sets `data-afw-has-sidebar` on the root while present. */
281
+ .afwd-navbar-burger {
282
+ display: none;
283
+ }
284
+ @media (max-width: 767px) {
285
+ :root[data-afw-has-sidebar] .afwd-navbar-burger {
286
+ display: inline-flex;
287
+ }
288
+ }
289
+
290
+ /* ── Navbar: mobile layout ─────────────────────────────────────────────────── */
291
+ /* Below the sidebar breakpoint the centered three-column grid gets cramped, so the bar
292
+ * becomes a simple flex row: brand (with burger) at the start, a compact action cluster
293
+ * (search · GitHub · theme) at the end. On pages that have a sidebar the top-level links
294
+ * move into the drawer (see `.afwd-drawer-links`), so they're dropped from the bar here. */
295
+ @media (max-width: 767px) {
296
+ .afwd-navbar-inner {
297
+ display: flex;
298
+ align-items: center;
299
+ gap: 0.5rem;
300
+ padding: 0 1rem;
301
+ }
302
+ .afwd-navbar-lead {
303
+ margin-right: auto; /* push the action cluster to the far end */
304
+ }
305
+ .afwd-navbar-search {
306
+ justify-self: auto;
307
+ }
308
+ .afwd-navbar-right {
309
+ gap: 0.5rem;
310
+ }
311
+ .afwd-navbar-version {
312
+ display: none; /* reclaim brand width on small screens */
313
+ }
314
+ :root[data-afw-has-sidebar] .afwd-navbar-nav {
315
+ display: none; /* surfaced in the drawer instead */
316
+ }
317
+ }
318
+
319
+ /* Theme switcher: trigger reuses `.afwd-navbar-icon` so it matches the GitHub button;
320
+ * it just grows a little to fit the System-mode pair of icons, and anchors the menu. */
321
+ .afwd-theme {
322
+ position: relative;
323
+ display: inline-flex;
324
+ }
325
+ .afwd-theme-trigger {
326
+ width: auto;
327
+ min-width: 2rem;
328
+ padding: 0 0.3rem;
329
+ }
330
+ .afwd-theme-trigger-system {
331
+ display: inline-flex;
332
+ align-items: center;
333
+ gap: 0.3rem;
334
+ }
335
+ .afwd-theme-trigger-badge {
336
+ display: inline-flex;
337
+ align-items: center;
338
+ padding-left: 0.3rem;
339
+ border-left: 1px solid var(--afw-border);
340
+ opacity: 0.85;
341
+ }
342
+ .afwd-theme-menu {
343
+ position: absolute;
344
+ top: calc(100% + 0.4rem);
345
+ right: 0;
346
+ z-index: 60;
347
+ min-width: 9rem;
348
+ padding: 0.3rem;
349
+ display: flex;
350
+ flex-direction: column;
351
+ gap: 0.1rem;
352
+ background: var(--afw-bg-elevated);
353
+ border: 1px solid var(--afw-border);
354
+ border-radius: 0.6rem;
355
+ box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
356
+ }
357
+ .afwd-theme-item {
358
+ display: flex;
359
+ width: 100%;
360
+ align-items: center;
361
+ gap: 0.55rem;
362
+ padding: 0.45rem 0.6rem;
363
+ border: none;
364
+ background: none;
365
+ border-radius: 0.4rem;
366
+ color: var(--afw-text-muted);
367
+ font: inherit;
368
+ font-size: 0.85rem;
369
+ text-align: left;
370
+ cursor: pointer;
371
+ }
372
+ .afwd-theme-item:hover {
373
+ background: var(--afw-bg-surface);
374
+ color: var(--afw-text);
375
+ }
376
+ .afwd-theme-item.is-active {
377
+ color: var(--afw-accent);
378
+ font-weight: 600;
379
+ }
380
+
381
+ /* Tooltip (hover/focus) — a small contrasting bubble. */
382
+ .afwd-tooltip {
383
+ position: relative;
384
+ display: inline-flex;
385
+ }
386
+ .afwd-tooltip-bubble {
387
+ position: absolute;
388
+ left: 50%;
389
+ transform: translateX(-50%) translateY(3px);
390
+ white-space: nowrap;
391
+ padding: 0.28rem 0.5rem;
392
+ border-radius: 0.4rem;
393
+ background: var(--afw-text);
394
+ color: var(--afw-bg);
395
+ font-size: 0.72rem;
396
+ font-weight: 500;
397
+ opacity: 0;
398
+ pointer-events: none;
399
+ transition: opacity 0.12s ease, transform 0.12s ease;
400
+ z-index: 70;
401
+ }
402
+ .afwd-tooltip-bottom .afwd-tooltip-bubble {
403
+ top: 100%;
404
+ margin-top: 0.45rem;
405
+ }
406
+ .afwd-tooltip-top .afwd-tooltip-bubble {
407
+ bottom: 100%;
408
+ margin-bottom: 0.45rem;
409
+ }
410
+ .afwd-tooltip:hover .afwd-tooltip-bubble,
411
+ .afwd-tooltip:focus-within .afwd-tooltip-bubble {
412
+ opacity: 1;
413
+ transform: translateX(-50%) translateY(0);
414
+ }
415
+
416
+ .afwd-search-trigger {
417
+ display: inline-flex;
418
+ align-items: center;
419
+ gap: 0.4rem;
420
+ border: 1px solid var(--afw-border);
421
+ background: var(--afw-bg-surface);
422
+ color: var(--afw-text-muted);
423
+ border-radius: 0.5rem;
424
+ cursor: pointer;
425
+ font-family: inherit;
426
+ padding: 0.4rem 0.65rem;
427
+ font-size: 0.82rem;
428
+ }
429
+ .afwd-search-trigger:hover {
430
+ color: var(--afw-accent);
431
+ border-color: var(--afw-accent);
432
+ }
433
+ .afwd-search-kbd {
434
+ display: none;
435
+ align-items: center;
436
+ height: 1.25rem;
437
+ padding: 0 0.35rem;
438
+ border: 1px solid var(--afw-border);
439
+ border-radius: 0.3rem;
440
+ background: var(--afw-bg);
441
+ color: var(--afw-text-muted);
442
+ font-family: var(--afw-mono);
443
+ font-size: 0.68rem;
444
+ line-height: 1;
445
+ }
446
+ @media (min-width: 768px) {
447
+ .afwd-search-kbd {
448
+ display: inline-flex;
449
+ }
450
+ }
451
+ .afwd-search-label {
452
+ display: none;
453
+ }
454
+ @media (min-width: 768px) {
455
+ .afwd-search-label {
456
+ display: inline;
457
+ }
458
+ }
459
+
460
+ /* ── Search modal (AFW Search) ───────────────────────────────────────────────── */
461
+ .afw-search {
462
+ display: contents;
463
+ }
464
+ .afwd-search-modal {
465
+ position: fixed;
466
+ inset: 0;
467
+ z-index: 100;
468
+ display: none;
469
+ align-items: flex-start;
470
+ justify-content: center;
471
+ padding: 12vh 1rem 1rem;
472
+ background: color-mix(in srgb, #000 45%, transparent);
473
+ backdrop-filter: blur(2px);
474
+ }
475
+ .afwd-search-modal.is-open {
476
+ display: flex;
477
+ }
478
+ .afwd-search-panel {
479
+ width: 100%;
480
+ max-width: 36rem;
481
+ max-height: 70vh;
482
+ display: flex;
483
+ flex-direction: column;
484
+ background: var(--afw-bg-elevated);
485
+ border: 1px solid var(--afw-border);
486
+ border-radius: 0.9rem;
487
+ box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
488
+ overflow: hidden;
489
+ }
490
+ .afwd-search-field {
491
+ display: flex;
492
+ align-items: center;
493
+ gap: 0.6rem;
494
+ padding: 0.85rem 1rem;
495
+ border-bottom: 1px solid var(--afw-border);
496
+ color: var(--afw-text-muted);
497
+ }
498
+ .afwd-search-input-field {
499
+ flex: 1;
500
+ min-width: 0;
501
+ border: none;
502
+ background: none;
503
+ outline: none;
504
+ font: inherit;
505
+ font-size: 1rem;
506
+ color: var(--afw-text);
507
+ }
508
+ /* Keyboard hint row beneath the input / results. */
509
+ .afwd-search-hint {
510
+ display: flex;
511
+ flex-wrap: wrap;
512
+ gap: 1rem;
513
+ padding: 0.6rem 1rem;
514
+ border-top: 1px solid var(--afw-border);
515
+ color: var(--afw-text-muted);
516
+ font-size: 0.72rem;
517
+ }
518
+ .afwd-search-hint-item {
519
+ display: inline-flex;
520
+ align-items: center;
521
+ gap: 0.3rem;
522
+ }
523
+ .afwd-search-hint kbd {
524
+ display: inline-flex;
525
+ align-items: center;
526
+ justify-content: center;
527
+ min-width: 1.3rem;
528
+ height: 1.3rem;
529
+ padding: 0 0.35rem;
530
+ border: 1px solid var(--afw-border);
531
+ border-bottom-width: 2px;
532
+ border-radius: 0.3rem;
533
+ background: var(--afw-bg-surface);
534
+ color: var(--afw-text);
535
+ font-family: var(--afw-mono);
536
+ font-size: 0.7rem;
537
+ line-height: 1;
538
+ }
539
+ .afwd-search-results {
540
+ list-style: none;
541
+ margin: 0;
542
+ padding: 0.4rem;
543
+ overflow-y: auto;
544
+ }
545
+ .afwd-search-result {
546
+ display: block;
547
+ padding: 0.6rem 0.75rem;
548
+ border-radius: 0.5rem;
549
+ text-decoration: none;
550
+ color: var(--afw-text);
551
+ }
552
+ .afwd-search-result.is-active {
553
+ background: var(--afw-accent-soft);
554
+ }
555
+ .afwd-search-result-crumb {
556
+ display: block;
557
+ font-size: 0.72rem;
558
+ color: var(--afw-text-muted);
559
+ letter-spacing: 0.01em;
560
+ margin-bottom: 0.1rem;
561
+ }
562
+ .afwd-search-result-title {
563
+ display: block;
564
+ font-weight: 600;
565
+ font-size: 0.9rem;
566
+ }
567
+ /* The matched section heading, under the page/post title. */
568
+ .afwd-search-result-section {
569
+ display: flex;
570
+ align-items: center;
571
+ gap: 0.3rem;
572
+ font-size: 0.8rem;
573
+ color: var(--afw-text-muted);
574
+ margin-top: 0.05rem;
575
+ }
576
+ .afwd-search-result-section::before {
577
+ content: "#";
578
+ color: var(--afw-accent);
579
+ font-weight: 700;
580
+ }
581
+ .afwd-search-result-excerpt {
582
+ display: block;
583
+ font-size: 0.8rem;
584
+ color: var(--afw-text-muted);
585
+ margin-top: 0.15rem;
586
+ line-height: 1.5;
587
+ }
588
+ .afwd-search-result-excerpt mark {
589
+ background: var(--afw-accent-soft);
590
+ color: var(--afw-accent);
591
+ border-radius: 0.2rem;
592
+ padding: 0 0.1rem;
593
+ }
594
+ .afwd-search-empty {
595
+ padding: 1.5rem 1rem;
596
+ text-align: center;
597
+ color: var(--afw-text-muted);
598
+ font-size: 0.9rem;
599
+ }
600
+
601
+ /* ── Docs grid ─────────────────────────────────────────────────────────────── */
602
+ .afwd-docs {
603
+ max-width: 90rem;
604
+ margin: 0 auto;
605
+ padding: 0 1.5rem;
606
+ display: grid;
607
+ grid-template-columns: 1fr;
608
+ gap: 2.5rem;
609
+ }
610
+ @media (min-width: 768px) {
611
+ .afwd-docs {
612
+ grid-template-columns: var(--afw-sidebar-width) minmax(0, 1fr);
613
+ }
614
+ }
615
+ @media (min-width: 1280px) {
616
+ .afwd-docs {
617
+ grid-template-columns: var(--afw-sidebar-width) minmax(0, 1fr) var(--afw-toc-width);
618
+ }
619
+ }
620
+
621
+ /* ── Sidebar ───────────────────────────────────────────────────────────────── */
622
+ /* Mobile-first: the sidebar is an off-canvas drawer below the navbar, slid in over a
623
+ * backdrop. It sits *under* the navbar (z < navbar's 50) so the burger stays tappable
624
+ * to toggle it. The desktop block below turns it back into the sticky grid column. */
625
+ .afwd-sidebar {
626
+ position: fixed;
627
+ top: var(--afw-navbar-height);
628
+ bottom: 0;
629
+ left: 0;
630
+ z-index: 40;
631
+ width: min(19rem, 80vw);
632
+ padding: 1.25rem 1.1rem 2rem;
633
+ overflow-y: auto;
634
+ overscroll-behavior: contain;
635
+ background: var(--afw-bg);
636
+ border-right: 1px solid var(--afw-border);
637
+ transform: translateX(-100%);
638
+ visibility: hidden;
639
+ transition: transform 0.25s ease, visibility 0.25s ease;
640
+ }
641
+ .afwd-sidebar.is-open {
642
+ transform: translateX(0);
643
+ visibility: visible;
644
+ }
645
+ .afwd-sidebar-backdrop {
646
+ position: fixed;
647
+ top: var(--afw-navbar-height);
648
+ inset-inline: 0;
649
+ bottom: 0;
650
+ z-index: 39;
651
+ background: color-mix(in srgb, var(--afw-text) 45%, transparent);
652
+ opacity: 0;
653
+ pointer-events: none;
654
+ transition: opacity 0.25s ease;
655
+ }
656
+ .afwd-sidebar-backdrop.is-open {
657
+ opacity: 1;
658
+ pointer-events: auto;
659
+ }
660
+ @media (min-width: 768px) {
661
+ .afwd-sidebar {
662
+ position: sticky;
663
+ top: var(--afw-navbar-height);
664
+ bottom: auto;
665
+ left: auto;
666
+ z-index: auto;
667
+ width: auto;
668
+ align-self: start;
669
+ max-height: calc(100vh - var(--afw-navbar-height));
670
+ overflow-y: auto;
671
+ padding: 2rem 0.5rem 2rem 0;
672
+ background: none;
673
+ border-right: none;
674
+ transform: none;
675
+ visibility: visible;
676
+ }
677
+ .afwd-sidebar-backdrop {
678
+ display: none;
679
+ }
680
+ }
681
+ @media (prefers-reduced-motion: reduce) {
682
+ .afwd-sidebar,
683
+ .afwd-sidebar-backdrop {
684
+ transition: none;
685
+ }
686
+ }
687
+
688
+ /* Top-level site links shown at the top of the mobile drawer (the navbar hides its own
689
+ * copy there). Hidden on desktop, where those links stay in the navbar and the sidebar
690
+ * shows only the section tree. The links are NavbarLink elements, stacked into a column
691
+ * and separated from the tree by a divider. */
692
+ .afwd-drawer-links {
693
+ display: none;
694
+ }
695
+ @media (max-width: 767px) {
696
+ .afwd-drawer-links {
697
+ display: flex;
698
+ flex-direction: column;
699
+ align-items: flex-start;
700
+ gap: 0.9rem;
701
+ margin-bottom: 1.25rem;
702
+ padding-bottom: 1.25rem;
703
+ border-bottom: 1px solid var(--afw-border);
704
+ font-size: 0.95rem;
705
+ }
706
+ }
707
+
708
+ /* Collapse-all toolbar — one ghost icon button, right-aligned above the tree. */
709
+ .afwd-sidebar-tools {
710
+ display: flex;
711
+ justify-content: flex-end;
712
+ margin-bottom: 0.15rem;
713
+ }
714
+ .afwd-sidebar-collapse-all {
715
+ display: inline-flex;
716
+ align-items: center;
717
+ justify-content: center;
718
+ padding: 0.3rem;
719
+ border: 0;
720
+ border-radius: 0.4rem;
721
+ background: transparent;
722
+ color: var(--afw-text-muted);
723
+ cursor: pointer;
724
+ opacity: 0.7;
725
+ transition: color 0.12s, background 0.12s, opacity 0.12s;
726
+ }
727
+ .afwd-sidebar-collapse-all:hover {
728
+ color: var(--afw-text);
729
+ background: var(--afw-bg-surface);
730
+ opacity: 1;
731
+ }
732
+ .afwd-sidebar-collapse-all:focus-visible {
733
+ outline: 2px solid var(--afw-accent);
734
+ outline-offset: 2px;
735
+ opacity: 1;
736
+ }
737
+
738
+ .afwd-sidebar-list,
739
+ .afwd-sidebar-sublist {
740
+ list-style: none;
741
+ margin: 0;
742
+ padding: 0;
743
+ }
744
+ .afwd-sidebar-sublist {
745
+ margin: 0.25rem 0 0.75rem 0.25rem;
746
+ padding-left: 0.75rem;
747
+ border-left: 1px solid var(--afw-border);
748
+ }
749
+ .afwd-sidebar-node {
750
+ margin: 0.1rem 0;
751
+ }
752
+ .afwd-sidebar-group-title {
753
+ display: block;
754
+ margin: 1.1rem 0 0.4rem;
755
+ font-size: 0.72rem;
756
+ font-weight: 700;
757
+ text-transform: uppercase;
758
+ letter-spacing: 0.05em;
759
+ color: var(--afw-text-muted);
760
+ }
761
+ /* Collapsible group — a section title that toggles its child list open/closed. */
762
+ .afwd-sidebar-group {
763
+ margin: 0.15rem 0;
764
+ }
765
+ .afwd-sidebar-group-toggle {
766
+ display: flex;
767
+ align-items: center;
768
+ gap: 0.45rem;
769
+ width: 100%;
770
+ margin: 0.85rem 0 0.35rem;
771
+ padding: 0.25rem 0.35rem;
772
+ border: 0;
773
+ border-radius: 0.4rem;
774
+ background: transparent;
775
+ font: inherit;
776
+ font-size: 0.72rem;
777
+ font-weight: 700;
778
+ text-transform: uppercase;
779
+ letter-spacing: 0.05em;
780
+ color: var(--afw-text-muted);
781
+ cursor: pointer;
782
+ text-align: left;
783
+ transition: color 0.12s, background 0.12s;
784
+ }
785
+ .afwd-sidebar-group-toggle:hover {
786
+ color: var(--afw-text);
787
+ background: var(--afw-bg-surface);
788
+ }
789
+ .afwd-sidebar-group-toggle:focus-visible {
790
+ outline: 2px solid var(--afw-accent);
791
+ outline-offset: 2px;
792
+ }
793
+ .afwd-sidebar-group-label {
794
+ flex: 1;
795
+ min-width: 0;
796
+ }
797
+ /* Group that is also a page: link + a slim icon-only toggle sharing one row. */
798
+ .afwd-sidebar-group-row {
799
+ display: flex;
800
+ align-items: center;
801
+ gap: 0.1rem;
802
+ margin-top: 0.35rem;
803
+ }
804
+ .afwd-sidebar-group-row .afwd-sidebar-link {
805
+ flex: 1;
806
+ min-width: 0;
807
+ /* The leading chevron button supplies the left inset; trim the link's own so its text
808
+ * lines up with the label-only group labels above/below. */
809
+ padding-left: 0.2rem;
810
+ }
811
+ /* Leading icon-only chevron for a group that is also a page — left-aligned to match the
812
+ * label-only group toggles (padding mirrors their 0.35rem chevron inset). */
813
+ .afwd-sidebar-group-toggle--icon {
814
+ flex: none;
815
+ width: auto;
816
+ margin: 0;
817
+ padding: 0.35rem;
818
+ justify-content: center;
819
+ color: var(--afw-text-muted);
820
+ }
821
+ .afwd-sidebar-chevron {
822
+ flex: none;
823
+ transition: transform 0.18s ease;
824
+ }
825
+ .afwd-sidebar-chevron.is-open {
826
+ transform: rotate(90deg);
827
+ }
828
+ /* Defined after `.afwd-sidebar-chevron` so it wins on source order — a media query adds
829
+ * no specificity, so an earlier reduced-motion rule would be overridden by the transition
830
+ * above. */
831
+ @media (prefers-reduced-motion: reduce) {
832
+ .afwd-sidebar-chevron {
833
+ transition: none;
834
+ }
835
+ }
836
+ .afwd-sidebar-link {
837
+ display: flex;
838
+ align-items: center;
839
+ gap: 0.6rem;
840
+ padding: 0.35rem 0.6rem;
841
+ border-radius: 0.45rem;
842
+ font-size: 0.875rem;
843
+ color: var(--afw-text-muted);
844
+ text-decoration: none;
845
+ transition: color 0.12s, background 0.12s;
846
+ }
847
+ .afwd-sidebar-dot {
848
+ flex: none;
849
+ width: 5px;
850
+ height: 5px;
851
+ border-radius: 99px;
852
+ background: currentColor;
853
+ opacity: 0.35;
854
+ transition: opacity 0.12s;
855
+ }
856
+ .afwd-sidebar-link:hover {
857
+ color: var(--afw-text);
858
+ background: var(--afw-bg-surface);
859
+ }
860
+ .afwd-sidebar-link:hover .afwd-sidebar-dot {
861
+ opacity: 0.6;
862
+ }
863
+ .afwd-sidebar-link.afwd-active {
864
+ color: var(--afw-accent);
865
+ background: var(--afw-accent-soft);
866
+ font-weight: 600;
867
+ }
868
+ .afwd-sidebar-link.afwd-active .afwd-sidebar-dot {
869
+ opacity: 1;
870
+ }
871
+
872
+ /* ── Content ───────────────────────────────────────────────────────────────── */
873
+ .afwd-content {
874
+ min-width: 0;
875
+ padding: 2.25rem 0 4rem;
876
+ }
877
+ .afwd-prose {
878
+ max-width: var(--afw-content-max);
879
+ }
880
+ .afwd-prose h1 {
881
+ font-size: 2.1rem;
882
+ font-weight: 800;
883
+ line-height: 1.15;
884
+ margin: 0 0 1rem;
885
+ letter-spacing: -0.02em;
886
+ }
887
+ .afwd-prose h2 {
888
+ font-size: 1.5rem;
889
+ font-weight: 700;
890
+ margin: 2.5rem 0 1rem;
891
+ padding-bottom: 0.4rem;
892
+ border-bottom: 1px solid var(--afw-border);
893
+ letter-spacing: -0.01em;
894
+ }
895
+ .afwd-prose h3 {
896
+ font-size: 1.2rem;
897
+ font-weight: 700;
898
+ margin: 2rem 0 0.75rem;
899
+ }
900
+ .afwd-prose h4 {
901
+ font-size: 1.05rem;
902
+ font-weight: 700;
903
+ margin: 1.6rem 0 0.6rem;
904
+ }
905
+ .afwd-prose h5 {
906
+ font-size: 0.95rem;
907
+ font-weight: 700;
908
+ margin: 1.4rem 0 0.5rem;
909
+ }
910
+ .afwd-prose h6 {
911
+ font-size: 0.85rem;
912
+ font-weight: 700;
913
+ text-transform: uppercase;
914
+ letter-spacing: 0.04em;
915
+ color: var(--afw-text-muted);
916
+ margin: 1.3rem 0 0.5rem;
917
+ }
918
+ .afwd-prose h1,
919
+ .afwd-prose h2,
920
+ .afwd-prose h3,
921
+ .afwd-prose h4,
922
+ .afwd-prose h5,
923
+ .afwd-prose h6 {
924
+ scroll-margin-top: calc(var(--afw-navbar-height) + 1rem);
925
+ }
926
+
927
+ /* Self-linking heading anchor (the hover `#`). Hidden until the heading is
928
+ hovered or the anchor itself is focused, so it doesn't clutter the page. */
929
+ .afw-heading-anchor {
930
+ margin-left: 0.4rem;
931
+ color: var(--afw-text-muted);
932
+ font-weight: 400;
933
+ text-decoration: none;
934
+ opacity: 0;
935
+ transition: opacity 0.12s ease;
936
+ }
937
+ /* The `#` is presentational only — drawn here, not as a DOM text node, so it never
938
+ leaks into heading text read by the TOC or the search index. */
939
+ .afw-heading-anchor::before {
940
+ content: "#";
941
+ }
942
+ .afwd-prose :is(h1, h2, h3, h4, h5, h6):hover .afw-heading-anchor,
943
+ .afw-heading-anchor:focus-visible {
944
+ opacity: 1;
945
+ }
946
+ .afw-heading-anchor:hover {
947
+ color: var(--afw-accent);
948
+ }
949
+ .afwd-prose p,
950
+ .afwd-prose ul,
951
+ .afwd-prose ol {
952
+ line-height: 1.75;
953
+ margin: 0 0 1.1rem;
954
+ color: var(--afw-text);
955
+ }
956
+ .afwd-prose ul,
957
+ .afwd-prose ol {
958
+ padding-left: 1.4rem;
959
+ }
960
+ /* Restore list markers: the Tailwind preflight reset (@import "tailwindcss") sets
961
+ * `list-style: none` on every ul/ol, which strips bullets and numbers from prose. */
962
+ .afwd-prose ul {
963
+ list-style: disc;
964
+ }
965
+ .afwd-prose ul ul {
966
+ list-style: circle;
967
+ }
968
+ .afwd-prose ol {
969
+ list-style: decimal;
970
+ }
971
+ .afwd-prose li {
972
+ margin: 0.35rem 0;
973
+ }
974
+ /* Loose list items wrap their content in <p>; keep that from adding block spacing. */
975
+ .afwd-prose li > p {
976
+ margin: 0;
977
+ }
978
+ /* GFM task list: drop the bullet and keep the checkbox inline with its label
979
+ * (the label is a block <p>, which would otherwise wrap to the next line). */
980
+ .afwd-prose li:has(> input[type="checkbox"]) {
981
+ list-style: none;
982
+ }
983
+ .afwd-prose li:has(> input[type="checkbox"]) > p {
984
+ display: inline;
985
+ }
986
+ /* Custom checkbox so checked vs. unchecked read at a glance (the native disabled
987
+ * box is nearly identical in both states). Unchecked is an empty bordered box;
988
+ * checked fills with the accent and draws a white tick. */
989
+ .afwd-prose li > input[type="checkbox"] {
990
+ appearance: none;
991
+ -webkit-appearance: none;
992
+ width: 1.05rem;
993
+ height: 1.05rem;
994
+ margin: 0 0.55em 0 0;
995
+ border: 1.5px solid var(--afw-border);
996
+ border-radius: 0.3rem;
997
+ background: var(--afw-bg-surface);
998
+ vertical-align: -0.18em;
999
+ position: relative;
1000
+ opacity: 1; /* override the browser's disabled-input dimming */
1001
+ cursor: default;
1002
+ }
1003
+ .afwd-prose li > input[type="checkbox"]:checked {
1004
+ background: var(--afw-accent);
1005
+ border-color: var(--afw-accent);
1006
+ }
1007
+ .afwd-prose li > input[type="checkbox"]:checked::after {
1008
+ content: "";
1009
+ position: absolute;
1010
+ left: 0.34rem;
1011
+ top: 0.13rem;
1012
+ width: 0.26rem;
1013
+ height: 0.52rem;
1014
+ border: solid #fff;
1015
+ border-width: 0 2px 2px 0;
1016
+ transform: rotate(45deg);
1017
+ }
1018
+ /* Completed items: mute the label (the filled check already marks it done). */
1019
+ .afwd-prose li:has(> input[type="checkbox"]:checked) > p {
1020
+ color: var(--afw-text-muted);
1021
+ }
1022
+ /* An unclassed <button> in prose (e.g. an inline interactive demo). Component
1023
+ * buttons carry their own class, so this only catches bare demo buttons. */
1024
+ .afwd-prose button:not([class]) {
1025
+ font: inherit;
1026
+ cursor: pointer;
1027
+ padding: 0.4rem 0.9rem;
1028
+ border: 1px solid var(--afw-border);
1029
+ border-radius: 0.5rem;
1030
+ background: var(--afw-bg-surface);
1031
+ color: inherit;
1032
+ transition: border-color 0.15s ease, background 0.15s ease;
1033
+ }
1034
+ .afwd-prose button:not([class]):hover {
1035
+ border-color: var(--afw-accent);
1036
+ }
1037
+ .afwd-prose a {
1038
+ color: var(--afw-accent);
1039
+ text-decoration: none;
1040
+ font-weight: 500;
1041
+ }
1042
+ .afwd-prose a:hover {
1043
+ text-decoration: underline;
1044
+ }
1045
+ .afwd-prose strong {
1046
+ font-weight: 700;
1047
+ }
1048
+ .afwd-prose code {
1049
+ font-family: var(--afw-mono);
1050
+ font-size: 0.86em;
1051
+ background: var(--afw-code-bg);
1052
+ color: var(--afw-code-text);
1053
+ padding: 0.15em 0.4em;
1054
+ border-radius: 0.35rem;
1055
+ }
1056
+ .afwd-prose pre {
1057
+ margin: 0 0 1.4rem;
1058
+ padding: 1rem 1.1rem;
1059
+ border-radius: var(--afw-radius);
1060
+ border: 1px solid var(--afw-border);
1061
+ overflow-x: auto;
1062
+ font-family: var(--afw-mono);
1063
+ font-size: 0.85rem;
1064
+ line-height: 1.6;
1065
+ }
1066
+ /* Build-time highlighted code (syntect) sets its own inline background. */
1067
+ .afwd-prose pre code {
1068
+ background: none;
1069
+ color: inherit;
1070
+ padding: 0;
1071
+ font-size: inherit;
1072
+ }
1073
+ /* Titled code block (built by the MDX front-end): a header bar — language label,
1074
+ * optional filename, and a copy button on the right — above the highlighted <pre>.
1075
+ * The wrapper owns the radius and clips the corners of the dark header and code. */
1076
+ .afw-code {
1077
+ margin: 0 0 1.4rem;
1078
+ border: 1px solid var(--afw-border);
1079
+ border-radius: var(--afw-radius);
1080
+ overflow: hidden;
1081
+ background: #2b303b;
1082
+ }
1083
+ .afw-code-head {
1084
+ display: flex;
1085
+ align-items: center;
1086
+ gap: 0.55rem;
1087
+ padding: 0.4rem 0.5rem 0.4rem 0.95rem;
1088
+ background: #23272f;
1089
+ border-bottom: 1px solid rgba(255, 255, 255, 0.07);
1090
+ }
1091
+ .afw-code-lang {
1092
+ text-transform: uppercase;
1093
+ letter-spacing: 0.05em;
1094
+ font-size: 0.66rem;
1095
+ font-weight: 700;
1096
+ color: rgba(255, 255, 255, 0.45);
1097
+ }
1098
+ .afw-code-name {
1099
+ font-family: var(--afw-mono);
1100
+ font-size: 0.78rem;
1101
+ color: rgba(255, 255, 255, 0.82);
1102
+ }
1103
+ .afw-code pre {
1104
+ margin: 0;
1105
+ border: none;
1106
+ border-radius: 0;
1107
+ /* Readable default for blocks without build-time highlighting (e.g. string content
1108
+ * rendered by Tabs via CodeBlock). Fenced blocks carry inline syntect
1109
+ * colors, which override this. */
1110
+ color: #e2e8f0;
1111
+ }
1112
+ .afw-copy {
1113
+ margin-left: auto;
1114
+ display: inline-flex;
1115
+ align-items: center;
1116
+ gap: 0.35rem;
1117
+ padding: 0.28rem 0.6rem;
1118
+ border: 1px solid rgba(255, 255, 255, 0.16);
1119
+ border-radius: 999px;
1120
+ background: rgba(255, 255, 255, 0.06);
1121
+ color: rgba(255, 255, 255, 0.78);
1122
+ font-family: var(--afw-font);
1123
+ font-size: 0.72rem;
1124
+ font-weight: 600;
1125
+ line-height: 1;
1126
+ cursor: pointer;
1127
+ transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
1128
+ }
1129
+ .afw-copy:hover {
1130
+ background: rgba(255, 255, 255, 0.14);
1131
+ color: #fff;
1132
+ }
1133
+ .afw-copy.is-copied {
1134
+ background: color-mix(in srgb, #10b981 22%, transparent);
1135
+ border-color: color-mix(in srgb, #10b981 55%, transparent);
1136
+ color: #34d399;
1137
+ }
1138
+ .afw-copy .afw-check-icon {
1139
+ display: none;
1140
+ }
1141
+ .afw-copy.is-copied .afw-copy-icon {
1142
+ display: none;
1143
+ }
1144
+ .afw-copy.is-copied .afw-check-icon {
1145
+ display: inline;
1146
+ }
1147
+ .afwd-prose blockquote {
1148
+ margin: 0 0 1.2rem;
1149
+ padding: 0.25rem 1.1rem;
1150
+ border-left: 3px solid var(--afw-accent);
1151
+ color: var(--afw-text-muted);
1152
+ }
1153
+ .afwd-prose hr {
1154
+ border: none;
1155
+ border-top: 1px solid var(--afw-border);
1156
+ margin: 2rem 0;
1157
+ }
1158
+ .afwd-prose img {
1159
+ max-width: 100%;
1160
+ border-radius: var(--afw-radius);
1161
+ }
1162
+ .afwd-prose table {
1163
+ width: 100%;
1164
+ border-collapse: collapse;
1165
+ margin: 0 0 1.4rem;
1166
+ font-size: 0.9rem;
1167
+ }
1168
+ .afwd-prose th,
1169
+ .afwd-prose td {
1170
+ text-align: left;
1171
+ padding: 0.55rem 0.8rem;
1172
+ border: 1px solid var(--afw-border);
1173
+ }
1174
+ .afwd-prose th {
1175
+ background: var(--afw-bg-surface);
1176
+ font-weight: 600;
1177
+ }
1178
+ /* Wrapped tables (GFM tables and <Table>) let the wrapper carry the block
1179
+ * margin, so the two do not stack. */
1180
+ .afw-table-wrap > table {
1181
+ margin: 0;
1182
+ }
1183
+
1184
+ /* ── TOC ───────────────────────────────────────────────────────────────────── */
1185
+ .afwd-toc {
1186
+ display: none;
1187
+ }
1188
+ @media (min-width: 1280px) {
1189
+ .afwd-toc {
1190
+ display: block;
1191
+ position: sticky;
1192
+ top: var(--afw-navbar-height);
1193
+ align-self: start;
1194
+ max-height: calc(100vh - var(--afw-navbar-height));
1195
+ overflow-y: auto;
1196
+ padding: 2.25rem 0 2rem;
1197
+ }
1198
+ }
1199
+ .afwd-toc-heading {
1200
+ font-size: 0.72rem;
1201
+ font-weight: 700;
1202
+ text-transform: uppercase;
1203
+ letter-spacing: 0.05em;
1204
+ color: var(--afw-text-muted);
1205
+ margin-bottom: 0.6rem;
1206
+ }
1207
+ .afwd-toc-list {
1208
+ list-style: none;
1209
+ margin: 0;
1210
+ padding: 0;
1211
+ border-left: 1px solid var(--afw-border);
1212
+ }
1213
+ .afwd-toc-item {
1214
+ margin: 0;
1215
+ }
1216
+ .afwd-toc-sub .afwd-toc-link {
1217
+ padding-left: 1.5rem;
1218
+ }
1219
+ .afwd-toc-link {
1220
+ display: block;
1221
+ padding: 0.25rem 0 0.25rem 0.85rem;
1222
+ margin-left: -1px;
1223
+ border-left: 2px solid transparent;
1224
+ font-size: 0.82rem;
1225
+ color: var(--afw-text-muted);
1226
+ text-decoration: none;
1227
+ }
1228
+ .afwd-toc-link:hover {
1229
+ color: var(--afw-text);
1230
+ }
1231
+ .afwd-toc-link.afwd-active {
1232
+ color: var(--afw-accent);
1233
+ border-left-color: var(--afw-accent);
1234
+ font-weight: 600;
1235
+ }
1236
+
1237
+ /* ── Breadcrumbs ───────────────────────────────────────────────────────────── */
1238
+ .afwd-breadcrumbs {
1239
+ display: flex;
1240
+ flex-wrap: wrap;
1241
+ align-items: center;
1242
+ gap: 0.35rem;
1243
+ margin-bottom: 1.25rem;
1244
+ font-size: 0.8rem;
1245
+ color: var(--afw-text-muted);
1246
+ }
1247
+ .afwd-crumb {
1248
+ display: inline-flex;
1249
+ align-items: center;
1250
+ gap: 0.35rem;
1251
+ }
1252
+ .afwd-crumb-sep {
1253
+ opacity: 0.5;
1254
+ }
1255
+ .afwd-crumb-link {
1256
+ color: var(--afw-text-muted);
1257
+ text-decoration: none;
1258
+ }
1259
+ .afwd-crumb-link:hover {
1260
+ color: var(--afw-accent);
1261
+ }
1262
+
1263
+ /* ── Page meta (last updated · edit link) ──────────────────────────────────── */
1264
+ .afwd-page-meta {
1265
+ display: flex;
1266
+ align-items: center;
1267
+ justify-content: space-between;
1268
+ gap: 1rem;
1269
+ flex-wrap: wrap;
1270
+ margin-top: 2.5rem;
1271
+ }
1272
+ /* Empty when a page has neither bit of meta — collapse the top margin then. */
1273
+ .afwd-page-meta:empty {
1274
+ margin-top: 0;
1275
+ }
1276
+ .afwd-last-updated {
1277
+ font-size: 0.8rem;
1278
+ color: var(--afw-text-muted);
1279
+ }
1280
+ .afwd-last-updated-time {
1281
+ font-weight: 600;
1282
+ color: var(--afw-text);
1283
+ }
1284
+ .afwd-edit-page {
1285
+ display: inline-flex;
1286
+ align-items: center;
1287
+ gap: 0.35rem;
1288
+ font-size: 0.8rem;
1289
+ font-weight: 500;
1290
+ color: var(--afw-text-muted);
1291
+ text-decoration: none;
1292
+ }
1293
+ .afwd-edit-page:hover {
1294
+ color: var(--afw-accent);
1295
+ }
1296
+ .afwd-page-meta + .afwd-pagination {
1297
+ margin-top: 1.5rem;
1298
+ }
1299
+
1300
+ /* ── Pagination ────────────────────────────────────────────────────────────── */
1301
+ .afwd-pagination {
1302
+ display: flex;
1303
+ justify-content: space-between;
1304
+ gap: 1rem;
1305
+ margin-top: 3rem;
1306
+ padding-top: 1.5rem;
1307
+ border-top: 1px solid var(--afw-border);
1308
+ }
1309
+ .afwd-page-link {
1310
+ display: flex;
1311
+ flex-direction: column;
1312
+ gap: 0.2rem;
1313
+ padding: 0.85rem 1.1rem;
1314
+ border: 1px solid var(--afw-border);
1315
+ border-radius: var(--afw-radius);
1316
+ text-decoration: none;
1317
+ min-width: 0;
1318
+ transition: border-color 0.15s;
1319
+ }
1320
+ .afwd-page-link:hover {
1321
+ border-color: var(--afw-accent);
1322
+ }
1323
+ .afwd-page-next {
1324
+ text-align: right;
1325
+ margin-left: auto;
1326
+ }
1327
+ .afwd-page-dir {
1328
+ font-size: 0.75rem;
1329
+ color: var(--afw-text-muted);
1330
+ }
1331
+ .afwd-page-title {
1332
+ font-weight: 600;
1333
+ color: var(--afw-text);
1334
+ }
1335
+ .afwd-page-spacer {
1336
+ display: block;
1337
+ }
1338
+
1339
+ /* ── Footer ────────────────────────────────────────────────────────────────── */
1340
+ .afwd-footer {
1341
+ border-top: 1px solid var(--afw-border);
1342
+ background: var(--afw-bg-surface);
1343
+ margin-top: 2rem;
1344
+ }
1345
+ .afwd-footer-inner {
1346
+ max-width: 90rem;
1347
+ margin: 0 auto;
1348
+ padding: 2rem 1.5rem;
1349
+ display: flex;
1350
+ flex-wrap: wrap;
1351
+ justify-content: space-between;
1352
+ gap: 1rem;
1353
+ font-size: 0.85rem;
1354
+ color: var(--afw-text-muted);
1355
+ }
1356
+ .afwd-footer-links {
1357
+ display: flex;
1358
+ gap: 1.25rem;
1359
+ }
1360
+ .afwd-footer-link {
1361
+ color: var(--afw-text-muted);
1362
+ text-decoration: none;
1363
+ }
1364
+ .afwd-footer-link:hover {
1365
+ color: var(--afw-text);
1366
+ }
1367
+
1368
+ /* ── Callout ───────────────────────────────────────────────────────────────── */
1369
+ /* Per-type accent color `--c` drives a tinted fill, border, title color and a
1370
+ * filled icon chip — all derived from the one color via color-mix, so the same
1371
+ * rule adapts to light and dark automatically. */
1372
+ .afwd-callout {
1373
+ --c: var(--afw-text-muted);
1374
+ display: grid;
1375
+ grid-template-columns: auto 1fr;
1376
+ gap: 0.85rem;
1377
+ margin: 1.5rem 0;
1378
+ padding: 1rem 1.1rem;
1379
+ border: 1px solid color-mix(in srgb, var(--c) 28%, var(--afw-border));
1380
+ border-left: 3px solid var(--c);
1381
+ border-radius: 0.75rem;
1382
+ background: color-mix(in srgb, var(--c) 7%, var(--afw-bg));
1383
+ }
1384
+ /* Plain icon (design default): the glyph is tinted with the accent, no filled chip. */
1385
+ .afwd-callout-icon {
1386
+ display: grid;
1387
+ place-items: center;
1388
+ flex: none;
1389
+ width: 1.65rem;
1390
+ height: 1.65rem;
1391
+ color: var(--c);
1392
+ font-size: 1.15rem;
1393
+ line-height: 1;
1394
+ }
1395
+ .afwd-callout-title {
1396
+ font-weight: 700;
1397
+ font-size: 0.9rem;
1398
+ color: color-mix(in srgb, var(--c) 60%, var(--afw-text));
1399
+ margin-bottom: 0.25rem;
1400
+ }
1401
+ .afwd-callout-content {
1402
+ min-width: 0;
1403
+ }
1404
+ .afwd-callout-body {
1405
+ font-size: 0.92rem;
1406
+ line-height: 1.65;
1407
+ }
1408
+ .afwd-callout-body > :last-child {
1409
+ margin-bottom: 0;
1410
+ }
1411
+ .afwd-callout-note {
1412
+ --c: var(--afw-text-muted);
1413
+ }
1414
+ .afwd-callout-tip {
1415
+ --c: #10b981;
1416
+ }
1417
+ .afwd-callout-info {
1418
+ --c: #3b82f6;
1419
+ }
1420
+ .afwd-callout-warning {
1421
+ --c: #f59e0b;
1422
+ }
1423
+ .afwd-callout-danger {
1424
+ --c: #ef4444;
1425
+ }
1426
+
1427
+ /* ── Tabs ──────────────────────────────────────────────────────────────────── */
1428
+ .afwd-tabs {
1429
+ margin: 1.5rem 0;
1430
+ border: 1px solid var(--afw-border);
1431
+ border-radius: var(--afw-radius);
1432
+ overflow: hidden;
1433
+ }
1434
+ .afwd-tabs-list {
1435
+ display: flex;
1436
+ gap: 0.25rem;
1437
+ padding: 0.4rem;
1438
+ background: var(--afw-bg-surface);
1439
+ border-bottom: 1px solid var(--afw-border);
1440
+ }
1441
+ .afwd-tab {
1442
+ padding: 0.35rem 0.85rem;
1443
+ border: none;
1444
+ border-radius: 0.4rem;
1445
+ background: transparent;
1446
+ color: var(--afw-text-muted);
1447
+ font-family: inherit;
1448
+ font-size: 0.85rem;
1449
+ font-weight: 600;
1450
+ cursor: pointer;
1451
+ }
1452
+ .afwd-tab.afwd-active {
1453
+ background: var(--afw-bg);
1454
+ color: var(--afw-accent);
1455
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
1456
+ }
1457
+ .afwd-tabs-panels {
1458
+ padding: 1rem 1.1rem;
1459
+ }
1460
+ .afwd-tabs-panels pre {
1461
+ margin: 0;
1462
+ border: none;
1463
+ }
1464
+ /* A CodeBlock filling a panel shouldn't add its own trailing margin on top of the
1465
+ * panel's padding. */
1466
+ .afwd-tab-panel > .afw-code {
1467
+ margin: 0;
1468
+ }
1469
+ .afwd-hidden {
1470
+ display: none;
1471
+ }
1472
+
1473
+ /* ── Steps ─────────────────────────────────────────────────────────────────── */
1474
+ .afwd-steps {
1475
+ counter-reset: afw-step;
1476
+ margin: 1.5rem 0;
1477
+ padding-left: 1.75rem;
1478
+ border-left: 1px solid var(--afw-border);
1479
+ }
1480
+ .afwd-steps > h3,
1481
+ .afwd-steps > h4 {
1482
+ position: relative;
1483
+ counter-increment: afw-step;
1484
+ margin-top: 1.6rem;
1485
+ font-size: 1.05rem;
1486
+ }
1487
+ .afwd-steps > h3:first-child,
1488
+ .afwd-steps > h4:first-child {
1489
+ margin-top: 0;
1490
+ }
1491
+ .afwd-steps > h3::before,
1492
+ .afwd-steps > h4::before {
1493
+ content: counter(afw-step);
1494
+ position: absolute;
1495
+ left: calc(-1.75rem - 1px);
1496
+ top: 50%;
1497
+ transform: translate(-50%, -50%);
1498
+ display: grid;
1499
+ place-items: center;
1500
+ width: 1.7rem;
1501
+ height: 1.7rem;
1502
+ border-radius: 999px;
1503
+ background: var(--afw-bg);
1504
+ border: 1px solid var(--afw-border);
1505
+ color: var(--afw-text-muted);
1506
+ font-size: 0.8rem;
1507
+ font-weight: 700;
1508
+ }
1509
+ .afwd-steps > h3:hover::before,
1510
+ .afwd-steps > h4:hover::before {
1511
+ border-color: var(--afw-accent);
1512
+ color: var(--afw-accent);
1513
+ }
1514
+
1515
+ /* ── Table wrapper ─────────────────────────────────────────────────────────── */
1516
+ .afw-table-wrap {
1517
+ overflow-x: auto;
1518
+ max-width: 100%;
1519
+ margin: 0 0 1.4rem;
1520
+ }
1521
+ /* The wrapper is focusable (tabindex="0") so the scroll area is keyboard
1522
+ * reachable; only show the ring for keyboard focus. */
1523
+ .afw-table-wrap:focus {
1524
+ outline: none;
1525
+ }
1526
+ .afw-table-wrap:focus-visible {
1527
+ outline: 2px solid var(--afw-accent);
1528
+ outline-offset: 2px;
1529
+ }
1530
+ .afwd-table {
1531
+ width: 100%;
1532
+ border-collapse: collapse;
1533
+ font-size: 0.9rem;
1534
+ }
1535
+ .afwd-table th,
1536
+ .afwd-table td {
1537
+ text-align: left;
1538
+ padding: 0.55rem 0.8rem;
1539
+ border: 1px solid var(--afw-border);
1540
+ }
1541
+ .afwd-table th {
1542
+ background: var(--afw-bg-surface);
1543
+ font-weight: 600;
1544
+ }
1545
+
1546
+ /* ── Cards (index grids, e.g. the API overview) ────────────────────────────── */
1547
+ .afwd-cards {
1548
+ display: grid;
1549
+ grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
1550
+ gap: 1rem;
1551
+ margin: 1.5rem 0;
1552
+ }
1553
+ .afwd-card {
1554
+ display: flex;
1555
+ flex-direction: column;
1556
+ gap: 0.35rem;
1557
+ padding: 1.1rem 1.25rem;
1558
+ border: 1px solid var(--afw-border);
1559
+ border-radius: 0.75rem;
1560
+ background: var(--afw-bg-surface);
1561
+ text-decoration: none;
1562
+ transition: border-color 0.15s, transform 0.15s;
1563
+ }
1564
+ .afwd-card:hover {
1565
+ border-color: var(--afw-accent);
1566
+ transform: translateY(-2px);
1567
+ }
1568
+ .afwd-card-title {
1569
+ font-weight: 700;
1570
+ color: var(--afw-text);
1571
+ }
1572
+ .afwd-card-desc {
1573
+ font-size: 0.85rem;
1574
+ line-height: 1.5;
1575
+ color: var(--afw-text-muted);
1576
+ }
1577
+
1578
+ /* ── Blog ──────────────────────────────────────────────────────────────────── */
1579
+ .afwd-blog {
1580
+ max-width: 90rem;
1581
+ margin: 0 auto;
1582
+ padding: 0 1.5rem;
1583
+ }
1584
+ .afwd-blog-main {
1585
+ width: 100%;
1586
+ max-width: var(--afw-content-max);
1587
+ margin: 0 auto;
1588
+ padding: 3rem 0;
1589
+ }
1590
+ /* A post gets content + a sticky "On this page" TOC on wide screens. */
1591
+ .afwd-blog-post {
1592
+ display: grid;
1593
+ grid-template-columns: 1fr;
1594
+ gap: 2.5rem;
1595
+ }
1596
+ @media (min-width: 1280px) {
1597
+ .afwd-blog-post {
1598
+ grid-template-columns: minmax(0, 1fr) var(--afw-toc-width);
1599
+ /* No `align-items: start` — the TOC column is a <afw-toc> custom element that
1600
+ must stretch to the row height so its inner `position: sticky` nav has travel
1601
+ room (mirrors `.afwd-docs`). With `start` the host shrinks to content and the
1602
+ TOC scrolls away with the page. */
1603
+ }
1604
+ .afwd-blog-post .afwd-blog-main {
1605
+ margin: 0;
1606
+ justify-self: end;
1607
+ }
1608
+ }
1609
+ /* Subscribe links: icons at the top of the index, a line under each post. */
1610
+ .afwd-feed-links {
1611
+ display: flex;
1612
+ justify-content: flex-end;
1613
+ gap: 0.5rem;
1614
+ margin-bottom: 0.75rem;
1615
+ }
1616
+ .afwd-feed-link {
1617
+ display: inline-flex;
1618
+ align-items: center;
1619
+ gap: 0.35rem;
1620
+ padding: 0.25rem 0.6rem;
1621
+ border: 1px solid var(--afw-border);
1622
+ border-radius: 9999px;
1623
+ font-size: 0.78rem;
1624
+ font-weight: 600;
1625
+ color: var(--afw-text-muted);
1626
+ text-decoration: none;
1627
+ transition: color 0.15s, border-color 0.15s;
1628
+ }
1629
+ .afwd-feed-link:hover,
1630
+ .afwd-feed-link:focus-visible {
1631
+ color: var(--afw-accent);
1632
+ border-color: var(--afw-accent);
1633
+ }
1634
+ .afwd-feed-icon {
1635
+ flex: none;
1636
+ }
1637
+ .afwd-feed-inline {
1638
+ margin-top: 2.5rem;
1639
+ padding-top: 1rem;
1640
+ border-top: 1px solid var(--afw-border);
1641
+ font-size: 0.85rem;
1642
+ color: var(--afw-text-muted);
1643
+ }
1644
+ .afwd-feed-inline a {
1645
+ color: var(--afw-accent);
1646
+ }
1647
+
1648
+ .afwd-blog-back {
1649
+ display: inline-block;
1650
+ margin-bottom: 1.5rem;
1651
+ font-size: 0.85rem;
1652
+ color: var(--afw-text-muted);
1653
+ text-decoration: none;
1654
+ }
1655
+ .afwd-blog-back:hover {
1656
+ color: var(--afw-text);
1657
+ }
1658
+
1659
+ /* Post banner (title + description + meta). */
1660
+ .afwd-post-banner {
1661
+ margin-bottom: 2.5rem;
1662
+ padding-bottom: 1.75rem;
1663
+ border-bottom: 1px solid var(--afw-border);
1664
+ }
1665
+ .afwd-post-title {
1666
+ font-size: clamp(2rem, 5vw, 2.75rem);
1667
+ font-weight: 800;
1668
+ letter-spacing: -0.02em;
1669
+ line-height: 1.1;
1670
+ color: var(--afw-text);
1671
+ }
1672
+ .afwd-post-desc {
1673
+ margin-top: 0.75rem;
1674
+ font-size: 1.15rem;
1675
+ color: var(--afw-text-muted);
1676
+ line-height: 1.5;
1677
+ }
1678
+
1679
+ /* Meta row: date · author · reading time. */
1680
+ .afwd-post-meta {
1681
+ display: flex;
1682
+ flex-wrap: wrap;
1683
+ align-items: center;
1684
+ gap: 0.75rem;
1685
+ margin-top: 1rem;
1686
+ font-size: 0.85rem;
1687
+ color: var(--afw-text-muted);
1688
+ }
1689
+ .afwd-post-meta > * + *::before {
1690
+ content: "·";
1691
+ margin-right: 0.75rem;
1692
+ color: var(--afw-border);
1693
+ }
1694
+ .afwd-reading-time,
1695
+ .afwd-post-author,
1696
+ .afwd-post-date,
1697
+ .afwd-post-updated {
1698
+ white-space: nowrap;
1699
+ }
1700
+ .afwd-post-meta > .afwd-post-draft::before {
1701
+ content: none;
1702
+ }
1703
+
1704
+ /* Tags. */
1705
+ .afwd-post-tags {
1706
+ display: flex;
1707
+ flex-wrap: wrap;
1708
+ gap: 0.5rem;
1709
+ margin-top: 1rem;
1710
+ }
1711
+ .afwd-post-tag {
1712
+ padding: 0.15rem 0.6rem;
1713
+ border-radius: 9999px;
1714
+ background: var(--afw-bg-surface);
1715
+ border: 1px solid var(--afw-border);
1716
+ font-size: 0.72rem;
1717
+ font-weight: 600;
1718
+ color: var(--afw-text-muted);
1719
+ }
1720
+
1721
+ .afwd-post-draft {
1722
+ padding: 0 0.5rem;
1723
+ border-radius: 9999px;
1724
+ border: 1px dashed var(--afw-border);
1725
+ font-size: 0.72rem;
1726
+ font-weight: 600;
1727
+ text-transform: uppercase;
1728
+ letter-spacing: 0.04em;
1729
+ }
1730
+
1731
+ /* Index listing. */
1732
+ .afwd-post-list {
1733
+ display: flex;
1734
+ flex-direction: column;
1735
+ }
1736
+ .afwd-post-card {
1737
+ display: block;
1738
+ padding: 1.6rem 0;
1739
+ border-top: 1px solid var(--afw-border);
1740
+ text-decoration: none;
1741
+ transition: opacity 0.15s;
1742
+ }
1743
+ .afwd-post-card:hover .afwd-post-card-title {
1744
+ color: var(--afw-accent);
1745
+ }
1746
+ .afwd-post-card .afwd-post-meta {
1747
+ margin-top: 0.75rem;
1748
+ }
1749
+ .afwd-post-card-title {
1750
+ margin: 0;
1751
+ line-height: 1.3;
1752
+ font-size: 1.35rem;
1753
+ font-weight: 700;
1754
+ color: var(--afw-text);
1755
+ transition: color 0.15s;
1756
+ }
1757
+ .afwd-post-card-desc {
1758
+ margin-top: 0.4rem;
1759
+ color: var(--afw-text-muted);
1760
+ line-height: 1.5;
1761
+ }
1762
+ .afwd-post-empty {
1763
+ padding: 2rem 0;
1764
+ color: var(--afw-text-muted);
1765
+ }
1766
+
1767
+ /* ── Blog: cover images & author ───────────────────────────────────────────── */
1768
+ .afwd-post-cover {
1769
+ display: block;
1770
+ width: 100%;
1771
+ aspect-ratio: 16 / 7;
1772
+ object-fit: cover;
1773
+ border-radius: 0.85rem;
1774
+ border: 1px solid var(--afw-border);
1775
+ margin-bottom: 1.75rem;
1776
+ }
1777
+ .afwd-post-author {
1778
+ display: inline-flex;
1779
+ align-items: center;
1780
+ gap: 0.4rem;
1781
+ }
1782
+ .afwd-post-avatar {
1783
+ width: 1.4rem;
1784
+ height: 1.4rem;
1785
+ border-radius: 9999px;
1786
+ object-fit: cover;
1787
+ border: 1px solid var(--afw-border);
1788
+ }
1789
+ .afwd-post-author-role {
1790
+ color: var(--afw-text-muted);
1791
+ opacity: 0.8;
1792
+ }
1793
+ /* Cards with a cover use a media + body two-row layout. */
1794
+ .afwd-post-card-cover {
1795
+ display: block;
1796
+ width: 100%;
1797
+ aspect-ratio: 16 / 8;
1798
+ object-fit: cover;
1799
+ border-radius: 0.6rem;
1800
+ border: 1px solid var(--afw-border);
1801
+ margin-bottom: 1rem;
1802
+ }
1803
+
1804
+ /* The newest post: the index's hero. */
1805
+ .afwd-post-card-featured {
1806
+ border-top: 0;
1807
+ padding-top: 0.5rem;
1808
+ }
1809
+ .afwd-post-card-featured .afwd-post-card-cover {
1810
+ margin-bottom: 1.25rem;
1811
+ }
1812
+ .afwd-post-card-featured .afwd-post-card-title {
1813
+ font-size: clamp(1.6rem, 4vw, 2.25rem);
1814
+ line-height: 1.2;
1815
+ }
1816
+ .afwd-post-card-featured .afwd-post-card-desc {
1817
+ font-size: 1.05rem;
1818
+ }
1819
+
1820
+ /* Every other post: a compact row with a thumbnail beside the text. */
1821
+ .afwd-post-rows .afwd-post-card.afwd-has-cover {
1822
+ display: grid;
1823
+ grid-template-columns: minmax(0, 1fr) 7rem;
1824
+ gap: 1rem;
1825
+ align-items: start;
1826
+ }
1827
+ .afwd-post-rows .afwd-post-card-cover {
1828
+ grid-column: 2;
1829
+ grid-row: 1;
1830
+ aspect-ratio: 16 / 10;
1831
+ margin: 0;
1832
+ }
1833
+ .afwd-post-rows .afwd-post-card-body {
1834
+ grid-column: 1;
1835
+ grid-row: 1;
1836
+ }
1837
+ @media (min-width: 640px) {
1838
+ .afwd-post-rows .afwd-post-card.afwd-has-cover {
1839
+ grid-template-columns: minmax(0, 1fr) 11rem;
1840
+ gap: 1.5rem;
1841
+ }
1842
+ }
1843
+ }