zenops 0.20.0

Declarative system configuration management for shell config and dotfiles.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
/* Schema explorer styles — scoped via the `.se-` prefix and the
 * `#schema-explorer` root so they don't clash with mdBook's own chrome.
 * The explorer takes the full chapter content width and renders a
 * search row on top with a tree sidebar + detail pane underneath.
 */

#schema-explorer[x-cloak] { display: none !important; }

#schema-explorer {
  --se-border: var(--theme-popup-border, #d1d5db);
  --se-border-strong: var(--theme-popup-border, #9ca3af);
  --se-surface: var(--quote-bg, #f5f5f5);
  --se-code-bg: var(--inline-code-color-bg, #f3f4f6);
  --se-muted: var(--sidebar-non-existant, #6b7280);
  --se-fg: var(--fg, #1d1f23);
  --se-fg-strong: var(--fg, #0b0c10);
  --se-accent: var(--links, #b25b00);
  --se-required: #b91c1c;
  --se-toml-bg: #f7f5f0;
  --se-toml-key: #2563eb;
  --se-toml-string: #15803d;
  --se-toml-section: #b25b00;
  --se-tag-section: #1e40af; --se-tag-section-bg: #dbeafe;
  --se-tag-enum: #6d28d9; --se-tag-enum-bg: #ede9fe;
  --se-tag-object: #047857; --se-tag-object-bg: #d1fae5;
  --se-tag-prim: #9a3412; --se-tag-prim-bg: #ffedd5;
}

.navy #schema-explorer, .ayu #schema-explorer, .coal #schema-explorer {
  --se-toml-bg: #181b21;
  --se-toml-key: #93c5fd;
  --se-toml-string: #6ee7b7;
  --se-toml-section: #f0d6a8;
  --se-required: #f87171;
  --se-fg-strong: #ffffff;
  --se-tag-section: #93c5fd; --se-tag-section-bg: #1e3a8a55;
  --se-tag-enum: #c4b5fd; --se-tag-enum-bg: #5b21b655;
  --se-tag-object: #6ee7b7; --se-tag-object-bg: #04785755;
  --se-tag-prim: #fdba74; --se-tag-prim-bg: #9a341255;
}

/* Search input — pill-shaped to match the mobile design. Lives inside
   the sidebar on desktop and inside the top bar on mobile. */
#schema-explorer .se-sidebar-search {
  position: relative;
  flex: none;
  padding: 0.6rem 0.6rem 0.4rem;
}
#schema-explorer .se-search {
  width: 100%;
  padding: 0.55rem 0.9rem 0.55rem 2.2rem;
  font-size: 0.92em;
  font-family: inherit;
  color: inherit;
  background: var(--se-code-bg);
  border: 1px solid transparent;
  border-radius: 999px;
  box-sizing: border-box;
  transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s;
}
#schema-explorer .se-search::placeholder { color: var(--se-muted); }
#schema-explorer .se-search:hover { background: var(--se-surface); }
#schema-explorer .se-search:focus {
  outline: none;
  background: var(--bg);
  border-color: var(--se-border-strong);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}
#schema-explorer .se-sidebar-search .se-search-icon {
  position: absolute; left: 1.2rem; top: 50%; transform: translateY(-50%);
  color: var(--se-muted); pointer-events: none; font-size: 1em;
}

/* Two-pane layout with bounded height so each pane scrolls independently. */
#schema-explorer .se-layout {
  display: grid;
  grid-template-columns: minmax(220px, 260px) 1fr;
  gap: 1rem;
  height: 78vh;
  margin: 0.5rem 0 2rem;
  border: 1px solid var(--se-border);
  border-radius: 6px;
  overflow: hidden;
}
#schema-explorer .se-sidebar {
  display: flex;
  flex-direction: column;
  background: var(--se-surface);
  border-right: 1px solid var(--se-border);
  overflow: hidden;
}
#schema-explorer .se-sidebar-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 0.5rem 0.6rem 1rem;
}
#schema-explorer .se-detail {
  overflow-y: auto;
  padding: 1.25rem 1.5rem 2rem;
}

/* Sidebar tabs: a segmented-control style. Both tabs sit inside a
   rounded pill container; the active one carries an inset white
   pill. */
#schema-explorer .se-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem;
  padding: 0.4rem 0.5rem 0.5rem;
  background: transparent;
  border-radius: 999px;
  flex: none;
}
#schema-explorer .se-tab {
  appearance: none;
  background: transparent;
  border: 0;
  border-radius: 999px;
  padding: 0.5rem 0.5rem;
  font: inherit;
  font-size: 0.85em;
  font-weight: 600;
  color: var(--se-muted);
  cursor: pointer;
  text-align: center;
  transition: background-color 0.15s, color 0.15s, box-shadow 0.15s;
}
#schema-explorer .se-tab:hover { color: var(--se-fg); background: rgba(0,0,0,0.04); }
#schema-explorer .se-tab.se-tab-active {
  color: var(--se-fg-strong);
  background: var(--bg);
  box-shadow: 0 1px 2px rgba(15,23,42,0.08),
              0 0 0 1px var(--se-border);
}
.navy #schema-explorer .se-tab:hover,
.ayu #schema-explorer .se-tab:hover,
.coal #schema-explorer .se-tab:hover { background: rgba(255,255,255,0.06); }

/* On the explorer page, mdBook's own chapter sidebar would be a
   competing nav, so hide it and let the explorer's tabbed sidebar slot
   into the same spot. The body class is set by schema-explorer.js
   init(). The page-wrapper's existing left offset (set by mdBook for
   the now-hidden sidebar) is left alone so the chapter content stays
   in the same place. mdBook's full-text book search would also be a
   competing search box, so hide its trigger and panels too — the
   schema explorer's own search filters this page's content. */
body.zo-explorer-page #mdbook-sidebar,
body.zo-explorer-page #mdbook-sidebar-resize-handle,
body.zo-explorer-page #mdbook-sidebar-toggle-anchor,
body.zo-explorer-page #mdbook-sidebar-toggle,
body.zo-explorer-page #mdbook-search-toggle,
body.zo-explorer-page #mdbook-search-wrapper {
  display: none !important;
}

/* The explorer's tabbed sidebar takes the spot mdBook's sidebar used
   to occupy: fixed to the left edge, full viewport height. Detached
   from the .se-layout grid (which collapses to detail-only) so the
   detail pane is the only thing left in the original column. Desktop
   only — the mobile rules below this block keep their drawer
   behaviour, with the tabs riding along inside the drawer. */
@media (min-width: 769px) {
  body.zo-explorer-page #schema-explorer .se-layout {
    display: block;
    height: auto;
    border: 0;
    border-radius: 0;
    overflow: visible;
  }
  body.zo-explorer-page #schema-explorer .se-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: var(--sidebar-width, 250px);
    border-right: 1px solid var(--se-border);
    border-radius: 0;
    z-index: 50;
  }
  body.zo-explorer-page #schema-explorer .se-detail {
    /* Match the bounded-scroll feel of the original layout. */
    height: 78vh;
    border: 1px solid var(--se-border);
    border-radius: 6px;
    margin: 0.5rem 0 2rem;
  }
}

/* Tree */
#schema-explorer .se-nav-empty {
  padding: 1rem 0.75rem; color: var(--se-muted); font-size: 0.9em;
}
/* Group headings separate Sections / Reusable rules / Types in the
   sidebar — small caps label, generous spacing above so they read as
   a divider rather than a row. */
#schema-explorer .se-tree-section-heading {
  font-size: 0.68em; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--se-muted); font-weight: 700;
  padding: 1.1rem 0.75rem 0.4rem;
}
#schema-explorer .se-tree-section-heading:first-child { padding-top: 0.4rem; }
/* Bucket headers ("Enums", "Objects", "Primitives") are non-routing
   rows — they only toggle expansion. Style them in the same family as
   section rows but lighter so they read as a sub-grouping. */
#schema-explorer .se-tree-bucket {
  cursor: default;
  color: var(--se-muted);
  font-weight: 600;
  text-transform: none;
  font-size: 0.85em;
}
#schema-explorer .se-tree-bucket:hover { background: transparent; }
#schema-explorer .se-tree-node { font-size: 0.95em; }
#schema-explorer .se-tree-row {
  display: flex; align-items: center; gap: 0.55rem;
  padding: 0.55rem 0.75rem; border-radius: 10px;
  min-height: 40px; box-sizing: border-box;
  color: var(--se-fg); cursor: pointer; user-select: none;
  text-decoration: none;
  transition: background-color 0.12s, color 0.12s;
}
#schema-explorer .se-tree-row:hover { background: rgba(15,23,42,0.05); text-decoration: none; color: var(--se-fg-strong); }
.navy #schema-explorer .se-tree-row:hover,
.ayu #schema-explorer .se-tree-row:hover,
.coal #schema-explorer .se-tree-row:hover { background: rgba(255,255,255,0.07); }
#schema-explorer .se-tree-row.se-selected {
  background: var(--se-tag-section-bg);
  color: var(--se-tag-section);
  font-weight: 600;
}
#schema-explorer .se-tree-toggle {
  width: 1rem; flex: none; color: var(--se-muted); font-size: 0.75em;
  text-align: center; line-height: 1;
}
#schema-explorer .se-tree-toggle.se-leaf { visibility: hidden; }
#schema-explorer .se-section-icon {
  flex: none;
  display: inline-flex; align-items: center;
  width: 16px; height: 16px;
  color: var(--se-muted);
}
#schema-explorer .se-tree-row:hover .se-section-icon,
#schema-explorer .se-tree-row.se-selected .se-section-icon {
  color: currentColor;
}
#schema-explorer .se-tree-name {
  flex: 1;
  font-family: var(--mono-font, ui-monospace, "SF Mono", Menlo, monospace);
  font-size: 0.92em;
  letter-spacing: -0.01em;
}
#schema-explorer .se-tree-kind {
  font-size: 0.7em; color: var(--se-muted); text-transform: lowercase;
  letter-spacing: 0;
}
#schema-explorer .se-tree-children { padding-left: 0.6rem; }

/* Detail typography */
#schema-explorer .se-detail h1 {
  font-size: 1.55rem; font-weight: 600;
  margin: 0 0 0.5rem; color: var(--se-fg-strong); letter-spacing: -0.01em;
  border-bottom: none;
}
#schema-explorer .se-type-name {
  font-family: var(--mono-font, ui-monospace, "SF Mono", Menlo, monospace);
}
#schema-explorer .se-detail h2 {
  font-size: 0.82em; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--se-muted); font-weight: 600;
  margin: 1.75rem 0 0.6rem;
  border-bottom: none;
}
#schema-explorer .se-detail h3 {
  font-size: 1rem; font-weight: 600; color: var(--se-fg-strong);
  margin: 1rem 0 0.5rem;
}
#schema-explorer .se-desc {
  color: var(--se-fg);
  margin: 0.5rem 0 1.25rem;
  font-size: 1em; line-height: 1.6;
}
#schema-explorer .se-desc-meta {
  color: var(--se-muted);
  font-size: 0.92em;
  margin-top: -0.5rem;
}
/* rustdoc-style landing: each group is a heading followed by a
   definition list of name → summary. Names align in a column on the
   left so the eye can scan, summaries flow to the right with a touch
   of grey muting so the names stay primary. */
#schema-explorer .se-welcome { padding-top: 0.5rem; }
#schema-explorer .se-landing-group { margin: 0 0 2rem; }
#schema-explorer .se-landing-group h2 {
  font-size: 0.78em; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--se-muted); font-weight: 700;
  margin: 0 0 0.6rem;
  border-bottom: 1px solid var(--se-border);
  padding-bottom: 0.35rem;
}
#schema-explorer .se-landing-list {
  display: grid;
  grid-template-columns: minmax(120px, auto) 1fr;
  column-gap: 1.25rem; row-gap: 0.55rem;
  margin: 0;
}
#schema-explorer .se-landing-list dt {
  margin: 0; font-weight: 600;
}
#schema-explorer .se-landing-list dt code {
  font-family: var(--mono-font, ui-monospace, "SF Mono", Menlo, monospace);
  font-size: 0.95em;
}
#schema-explorer .se-landing-list dd {
  margin: 0; color: var(--se-fg);
  font-size: 0.95em; line-height: 1.5;
}

/* Inline code chips in descriptions and field-description rows —
   GitHub-comment style: subtle background, tight padding, rounded
   corners. Code-in-link keeps its existing dotted-underline styling. */
#schema-explorer .se-desc code,
#schema-explorer .se-desc-row td code {
  background: var(--se-code-bg);
  padding: 0.12em 0.4em;
  border-radius: 5px;
  font-size: 0.92em;
}
/* Fenced code blocks inside descriptions: realistic, copy-pasteable
   examples that the per-variant snippets above the table can't
   capture (e.g. an [ssh] section that uses both fetch and manual
   entries together). No chip background on the inner code; the pre
   element handles the surface. */
#schema-explorer .se-desc pre.se-code-block,
#schema-explorer .se-desc-row td pre.se-code-block {
  background: var(--se-toml-bg);
  border: 1px solid var(--se-border);
  border-radius: 8px;
  padding: 0.85rem 1.05rem;
  overflow-x: auto;
  margin: 0.85rem 0 1.25rem;
  font-size: 0.9em;
  line-height: 1.55;
}
#schema-explorer .se-desc pre.se-code-block code,
#schema-explorer .se-desc-row td pre.se-code-block code {
  background: transparent;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
  font-family: var(--mono-font, ui-monospace, "SF Mono", Menlo, monospace);
}

/* Kind badge */
#schema-explorer .se-kind-badge {
  display: inline-block; font-size: 0.7em; text-transform: uppercase;
  letter-spacing: 0.07em; font-weight: 600;
  padding: 0.15rem 0.5rem; border-radius: 3px;
  background: var(--se-tag-section-bg); color: var(--se-tag-section);
  vertical-align: 0.3em; margin-left: 0.5rem;
}
#schema-explorer .se-kind-badge.se-kind-enum { background: var(--se-tag-enum-bg); color: var(--se-tag-enum); }
#schema-explorer .se-kind-badge.se-kind-object { background: var(--se-tag-object-bg); color: var(--se-tag-object); }
#schema-explorer .se-kind-badge.se-kind-primitive { background: var(--se-tag-prim-bg); color: var(--se-tag-prim); }

/* Signature summary block */
#schema-explorer .se-signature {
  font-family: var(--mono-font, ui-monospace, "SF Mono", Menlo, monospace);
  background: var(--se-toml-bg);
  border: 1px solid var(--se-border);
  border-radius: 6px;
  padding: 0.7rem 1.1rem;
  margin: 0.5rem 0 1.25rem;
  font-size: 0.95em; line-height: 1.55;
  color: var(--se-fg);
}
#schema-explorer .se-sig-keyword { color: var(--se-accent); }
#schema-explorer .se-sig-name { color: var(--se-fg-strong); font-weight: 600; }
#schema-explorer .se-sig-variant, #schema-explorer .se-sig-field { padding-left: 1.5em; }
#schema-explorer .se-sig-variant a, #schema-explorer .se-sig-field a {
  text-decoration: underline dotted rgba(0, 0, 0, 0.25);
  text-underline-offset: 3px;
}
.navy #schema-explorer .se-sig-variant a, .ayu #schema-explorer .se-sig-variant a, .coal #schema-explorer .se-sig-variant a,
.navy #schema-explorer .se-sig-field a, .ayu #schema-explorer .se-sig-field a, .coal #schema-explorer .se-sig-field a {
  text-decoration-color: rgba(255, 255, 255, 0.25);
}
#schema-explorer .se-sig-variant a { color: var(--se-toml-string); }
#schema-explorer .se-sig-field a { color: var(--se-toml-key); }
#schema-explorer .se-sig-variant a:hover, #schema-explorer .se-sig-field a:hover {
  text-decoration: underline solid currentColor;
}
#schema-explorer .se-sig-punct { color: var(--se-muted); }

/* Subtle dotted underline on code-tagged links (the type column in
   the field table, cross-refs in body prose) so the affordance reads
   even before hover. */
#schema-explorer a > code {
  color: var(--se-accent);
  background: var(--se-code-bg);
  text-decoration: underline dotted rgba(178, 91, 0, 0.45);
  text-underline-offset: 3px;
}
.navy #schema-explorer a > code, .ayu #schema-explorer a > code, .coal #schema-explorer a > code {
  text-decoration-color: rgba(245, 158, 44, 0.45);
}
#schema-explorer a:hover > code { text-decoration-style: solid; }

/* Field table */
#schema-explorer table.se-fields {
  width: 100%; border-collapse: collapse; margin-top: 0.5rem;
}
#schema-explorer table.se-fields th {
  text-align: left; font-size: 0.7em; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--se-muted); font-weight: 600;
  padding: 0.5rem 0.7rem; border-bottom: 1px solid var(--se-border-strong);
}
#schema-explorer table.se-fields td {
  padding: 0.6rem 0.7rem; vertical-align: top;
}
#schema-explorer table.se-fields tr.se-fld td { padding-bottom: 0.35rem; }
#schema-explorer table.se-fields tr.se-desc-row td {
  color: var(--se-muted);
  padding: 0 0.7rem 0.85rem;
  border-bottom: 1px solid var(--se-border);
}
#schema-explorer .se-field-name code {
  font-size: 0.95em; font-weight: 600; color: var(--se-fg-strong);
  background: var(--se-code-bg); padding: 2px 6px; border-radius: 3px;
}
#schema-explorer .se-field-type { white-space: nowrap; }
#schema-explorer .se-field-default { font-size: 0.9em; color: var(--se-muted); }
#schema-explorer .se-req-badge {
  font-size: 0.65em; color: var(--se-required); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  background: rgba(248, 113, 113, 0.12); padding: 1px 5px; border-radius: 3px;
  margin-left: 0.4rem;
}

/* Variant cards */
#schema-explorer .se-variant {
  margin: 1.25rem 0; padding: 0.85rem 1.1rem;
  background: var(--se-surface);
  border: 1px solid var(--se-border);
  border-radius: 5px;
}
#schema-explorer .se-variant h3 { margin-top: 0; }

/* TOML example blocks */
#schema-explorer .se-examples-block { margin: 1rem 0 1.5rem; }
#schema-explorer .se-example {
  background: var(--se-toml-bg);
  border: 1px solid var(--se-border);
  border-radius: 6px;
  margin: 0.5rem 0 1rem;
  overflow: hidden;
}
#schema-explorer .se-example-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.4rem 0.85rem;
  background: var(--se-surface);
  border-bottom: 1px solid var(--se-border);
  font-size: 0.85em;
}
#schema-explorer .se-example-label {
  color: var(--se-muted);
  font-family: var(--mono-font, ui-monospace, "SF Mono", Menlo, monospace);
}
#schema-explorer .se-example-label strong { color: var(--se-fg); font-weight: 600; }
#schema-explorer .se-example-copy {
  border: 1px solid var(--se-border-strong); background: transparent;
  color: var(--se-muted); font-size: 0.8em; padding: 0.18rem 0.6rem;
  border-radius: 4px; cursor: pointer;
  font-family: inherit;
}
#schema-explorer .se-example-copy:hover { background: var(--se-code-bg); color: var(--se-fg); }
#schema-explorer .se-example pre {
  margin: 0; padding: 0.85rem 1rem;
  font-family: var(--mono-font, ui-monospace, "SF Mono", Menlo, monospace);
  font-size: 0.9em; line-height: 1.5;
  overflow-x: auto; color: var(--se-fg);
  background: transparent;
}
#schema-explorer .se-toml-section { color: var(--se-toml-section); }
#schema-explorer .se-toml-key { color: var(--se-toml-key); }
#schema-explorer .se-toml-string { color: var(--se-toml-string); }
#schema-explorer .se-toml-comment { color: var(--se-muted); font-style: italic; }

/* Welcome / fallback */
#schema-explorer .se-welcome { padding: 0.5rem 0; }
#schema-explorer .se-welcome h2 { margin-top: 0; color: var(--se-fg-strong); }
#schema-explorer .se-empty { padding: 0.75rem; font-size: 0.9em; color: var(--se-muted); }
#schema-explorer .se-muted { color: var(--se-muted); }

/* Backdrop and custom mobile top bar — visible only on the mobile
   breakpoint below. Hidden by default so desktop never sees them. */
#schema-explorer .se-backdrop { display: none; }
#schema-explorer .zo-mobile-bar { display: none; }
/* Hide the in-sidebar search on mobile: the pill in the top bar
   replaces it so the user has one search entry point per breakpoint. */
@media (max-width: 768px) {
  #schema-explorer .se-sidebar-search { display: none !important; }
}

/* ----------------------------------------------------------------------
 * Mobile (≤ 768px): sidebar collapses to a slide-in drawer. A hamburger
 * button next to the search input toggles it; a dimmed backdrop covers
 * the rest of the screen. Picking a type closes the drawer (handled by
 * `_applyHash` in the JS).
 * Also bumps tap-target padding in the tree, makes the search input
 * easier to hit, and lets the signature/TOML blocks scroll horizontally
 * instead of clipping when they don't fit.
 * -------------------------------------------------------------------- */
@media (max-width: 768px) {
  /* Suppress mdBook's mobile chrome on this chapter so we don't end up
     with two hamburgers (one mdBook's, one ours). The custom top bar
     below replaces it. */
  #mdbook-menu-bar { display: none !important; }
  #mdbook-menu-bar-hover-placeholder { display: none !important; }
  #mdbook-search-wrapper { display: none !important; }
  /* mdBook's body-container is absolutely positioned and sits at top:-50
     by default (it reserves space for the menu-bar via its own internal
     offset). Push it down so the fixed top bar doesn't cover content.
     ~120px = bar (64) + the -50 mdBook offset + breathing room; tune
     if it shifts on real Safari. */
  #mdbook-body-container { padding-top: 120px !important; }
  #mdbook-content { padding-top: 0 !important; }
  main { padding-top: 0.5rem !important; }

  /* Custom mobile top bar — fixed to viewport top so it always follows
     scroll. Hamburger on the LEFT, brand to its right, search pill on
     the far right. The pill expands inline when tapped. */
  #schema-explorer .zo-mobile-bar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1500;
    background: var(--bg);
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
    border-bottom: 1px solid var(--se-border, rgba(0,0,0,0.08));
    padding: 0.5rem 0.75rem 0.5rem 0.4rem;
    display: flex; align-items: center; gap: 0.55rem;
    height: 64px;
    font-family: inherit;
  }
  #schema-explorer .zo-mobile-brand {
    font-weight: 700; font-size: 1.05em; color: var(--se-fg-strong);
    letter-spacing: -0.01em;
    /* Allow the brand to truncate when the search pill expands. */
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    min-width: 0;
  }
  #schema-explorer .zo-mobile-brand .crumb {
    color: var(--se-muted); font-weight: 400;
    margin-left: 0.3rem; font-size: 0.85em;
  }
  #schema-explorer .zo-mobile-spacer { flex: 1; }
  #schema-explorer .zo-mobile-menu-btn {
    flex: none;
    width: 44px; height: 44px;
    background: transparent; border: none;
    color: var(--se-fg); font-size: 1.5em;
    cursor: pointer; border-radius: 999px;
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0;
    transition: background-color 0.15s;
  }
  #schema-explorer .zo-mobile-menu-btn:hover,
  #schema-explorer .zo-mobile-menu-btn:active { background: var(--se-code-bg); }

  /* Pill search — collapsed to a circle by default, grows inline to
     fill the row when focused or when it holds a query. The pill is the
     focus target rather than the input so the icon+input read as one
     element. */
  #schema-explorer .zo-search-pill {
    flex: 0 0 auto;
    display: inline-flex; align-items: center;
    width: 44px; height: 44px;
    padding: 0 0 0 12px;
    border-radius: 999px;
    background: var(--se-code-bg);
    color: var(--se-muted);
    cursor: text;
    overflow: hidden;
    transition: width 0.22s ease, background-color 0.15s, box-shadow 0.15s;
  }
  #schema-explorer .zo-search-pill:hover {
    background: var(--se-surface);
  }
  #schema-explorer .zo-search-pill.zo-search-pill-open {
    flex: 1 1 auto;
    width: 100%;
    background: var(--bg);
    box-shadow: 0 0 0 1px var(--se-border-strong),
                0 4px 14px rgba(15, 23, 42, 0.08);
    color: var(--se-fg);
  }
  #schema-explorer .zo-search-icon {
    flex: none; font-size: 1.15em; line-height: 1;
    margin-right: 0.45rem;
    pointer-events: none;
  }
  #schema-explorer .zo-search-input {
    flex: 1 1 auto; min-width: 0;
    background: transparent; border: 0; outline: 0;
    padding: 0 0.75rem 0 0;
    color: inherit; font: inherit; font-size: 0.95rem;
    opacity: 0; transition: opacity 0.15s 0.1s;
  }
  #schema-explorer .zo-search-pill.zo-search-pill-open .zo-search-input {
    opacity: 1;
  }
  /* When the pill is expanded, fade the brand out so it doesn't fight
     for space — fully hide it once the pill is opaque. */
  #schema-explorer.zo-search-open .zo-mobile-brand {
    opacity: 0; pointer-events: none;
    max-width: 0; margin: 0;
    transition: opacity 0.1s, max-width 0.2s, margin 0.2s;
  }

  /* (Search row is gone; the in-sidebar search above replaces it on
     desktop and the top-bar pill replaces it on mobile.) */

  /* Two-pane layout collapses; sidebar is the slide-in drawer. Position
     with transform so off-screen state doesn't depend on width math. */
  #schema-explorer .se-layout {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 70vh;
    gap: 0;
    overflow: visible;
  }
  #schema-explorer .se-sidebar {
    position: fixed;
    left: 0;
    /* Float the drawer below the top bar with a margin on every side
       so it reads as a card lifted off the page rather than a panel
       glued to the edge. UX guidance: keep the panel in the 240-300px
       expanded range. */
    top: 76px;
    bottom: 16px;
    height: auto;
    width: 82%;
    max-width: 296px;
    z-index: 1000;
    background: var(--bg);
    box-shadow: 0 24px 48px -12px rgba(15, 23, 42, 0.25),
                0 0 0 1px rgba(15, 23, 42, 0.04);
    transform: translateX(calc(-100% - 16px));
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    border: 0;
    border-radius: 20px;
    margin-left: 12px;
    padding: 0;
  }
  #schema-explorer.se-drawer-open .se-sidebar { transform: translateX(0); }
  #schema-explorer.se-drawer-open .se-sidebar { transform: translateX(0); }
  #schema-explorer .se-backdrop {
    display: block;
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 999;
  }

  #schema-explorer .se-detail { padding: 1rem; }
  #schema-explorer .se-detail h1 { font-size: 1.4rem; }

  /* Bigger tap targets in the tree. */
  #schema-explorer .se-tree-row { padding: 0.45rem 0.5rem; font-size: 0.95em; }
  #schema-explorer .se-tree-name { font-size: 1em; }

  /* Signature can overflow on narrow widths — let it scroll instead of
     wrapping monospace mid-identifier. */
  #schema-explorer .se-signature {
    font-size: 0.85em;
    padding: 0.55rem 0.8rem;
    overflow-x: auto;
  }

  /* Tighter field table at small widths. */
  #schema-explorer table.se-fields { font-size: 0.95em; }
  #schema-explorer table.se-fields th,
  #schema-explorer table.se-fields td { padding: 0.4rem 0.4rem; }

  #schema-explorer .se-search {
    font-size: 1em;
    padding: 0.55rem 0.85rem 0.55rem 2.4rem;
  }

  /* Show the custom top bar (overrides the desktop display:none above). */
  #schema-explorer .zo-mobile-bar { display: flex; }
}