rust-web-server 18.37.0

Single-binary web server and reverse proxy: automatic HTTPS (Let's Encrypt), HTTP/1.1, HTTP/2 and HTTP/3, load balancing, auth and rate limiting, configured in one TOML file. Also a Rust library: routing, middleware, MCP server, ORM, background jobs. No hyper, no Tower; HTTP/2 and HTTP/3 framing via h2 and quinn.
Documentation
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
/* Page layout shared by every page. Values come from theme.css tokens only. */

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--space-200);
}

.site-header {
  position: sticky;
  top: var(--space-200);
  z-index: 5;
  display: flex;
  justify-content: center;
  padding: 0 var(--space-200);
}
.site-header nav {
  display: flex;
  align-items: center;
  gap: var(--space-300);
  padding: var(--space-75) var(--space-200);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-full);
  background: var(--rws-glass);
  backdrop-filter: blur(12px);

}
.site-header a {
  color: var(--md-sys-color-on-surface);
  text-decoration: none;
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  font-weight: 600;
}
.site-header a[aria-current="page"] { color: var(--md-sys-color-primary); }
/* Tap targets of 40 px (they were 20 px tall). */
.nav-links a, .mobile-menu a { display: inline-flex; align-items: center; min-height: 40px; }

.lockup {
  display: inline-flex;
  align-items: center;
  gap: var(--space-100);
  color: var(--md-sys-color-on-surface);
  text-decoration: none;
}
.lockup svg { height: 24px; width: auto; display: block; }
.lockup .word { display: flex; flex-direction: column; }
.lockup b { font-size: var(--text-base); line-height: var(--leading-base); font-weight: 700; }
.lockup small {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: var(--leading-xs);
  letter-spacing: 0.2em;
  color: var(--md-sys-color-secondary);
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: var(--space-500);
  height: var(--space-500);
  border: 0;
  border-radius: var(--md-sys-shape-corner-full);
  background: transparent;
  color: var(--md-sys-color-on-surface);
  cursor: pointer;
  transition: background-color var(--duration-color) var(--ease);
}
.icon-button:hover { background: var(--md-sys-color-surface-container); }
.icon-button:active { transform: scale(0.98); }
.icon-button svg { width: 20px; height: 20px; }
[data-theme-toggle] .moon { display: none; }
[data-theme-toggle][aria-pressed="true"] .sun { display: none; }
[data-theme-toggle][aria-pressed="true"] .moon { display: block; }

:root {
  /* color-mix() over light-dark() resolves to transparent in Chromium, so the
     translucent surfaces are spelled out per scheme. */
  --rws-glass: light-dark(rgb(242 235 227 / 0.96), rgb(19 18 9 / 0.96));
  --rws-glass-strong: light-dark(rgb(242 235 227 / 0.97), rgb(19 18 9 / 0.97));
  --rws-mark-rack: light-dark(#16120f, #f2ebe3);
  --rws-mark-dot: light-dark(#f2ebe3, #16120f);
  --rws-mark-slot: light-dark(#7a706a, #6b625c);
}

.site-footer {
  margin-top: var(--space-900);
  padding: var(--space-600) 0;
  border-top: 1px solid var(--md-sys-color-outline-variant);
  color: var(--md-sys-color-on-surface-variant);
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
}
.site-footer ul { display: flex; flex-wrap: wrap; gap: 0 var(--space-300); list-style: none; margin: 0; padding: 0; }
.site-footer a { color: inherit; display: inline-flex; align-items: center; min-height: 40px; }
.site-footer .footer-by { margin: var(--space-300) 0 0; }

/* /theme/ page */
.theme-page section { padding: var(--space-600) 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-300); }
.theme-page h2 { font-size: var(--text-2xl); line-height: var(--leading-2xl); }
.row { display: flex; flex-wrap: wrap; gap: var(--space-200); align-items: center; }
.stack { display: grid; gap: var(--space-200); }
.mark-large svg { width: 160px; height: auto; display: block; }
.brand img { border-radius: var(--md-sys-shape-corner-extra-large); }
.type-sample { margin: 0; }
.type-sample.mono { font-family: var(--font-mono); }
.space-row { display: flex; align-items: center; gap: var(--space-200); }
.space-row code { width: var(--space-500); font-size: var(--text-xs); line-height: var(--leading-xs); }
.space-bar { height: var(--space-200); background: var(--rws-orange); border-radius: var(--md-sys-shape-corner-extra-small); }
.rail-demo { height: 320px; display: flex; border: 1px solid var(--md-sys-color-outline-variant); border-radius: var(--md-sys-shape-corner-extra-large); overflow: hidden; }

.hero-heading {
  max-width: 680px;
  font-size: var(--text-5xl);
  line-height: var(--leading-5xl);
  background: linear-gradient(90deg, light-dark(#000000, #ffffff), light-dark(#666666, #9b9b9b));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead { max-width: 680px; margin: 0; font-size: var(--text-lg); line-height: var(--leading-lg); color: var(--md-sys-color-on-surface-variant); }
@media (min-width: 768px) {
  .hero-heading { font-size: var(--text-6xl); line-height: var(--leading-6xl); }
}

/* Mobile menu */
.menu-toggle { display: none; }
.menu-icon { position: relative; width: 18px; height: 12px; }
.menu-icon span {
  position: absolute; left: 0; right: 0; height: 2px; border-radius: 2px;
  background: currentColor;
  transition: transform var(--duration-layout) var(--ease);
}
.menu-icon span:first-child { top: 2px; }
.menu-icon span:last-child { bottom: 2px; }
[aria-expanded="true"] .menu-icon span:first-child { transform: translateY(3px) rotate(45deg); }
[aria-expanded="true"] .menu-icon span:last-child { transform: translateY(-3px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: -1;
  padding: var(--space-900) var(--space-300) var(--space-300);
  background: var(--rws-glass-strong);
  backdrop-filter: blur(24px);
  opacity: 0;
  transition: opacity var(--duration-color) var(--ease);
}
.mobile-menu.open { opacity: 1; }
.mobile-menu nav { display: grid; gap: var(--space-300); border: 0; background: none; padding: 0; backdrop-filter: none; }
.mobile-menu a { font-size: var(--text-2xl); line-height: var(--leading-2xl); opacity: 0; transform: translateY(var(--space-300)); transition: opacity var(--duration-layout) var(--ease), transform var(--duration-layout) var(--ease); }
.mobile-menu.open a { opacity: 1; transform: none; }
.mobile-menu.open a:nth-child(2) { transition-delay: 60ms; }
.mobile-menu.open a:nth-child(3) { transition-delay: 120ms; }
.mobile-menu.open a:nth-child(4) { transition-delay: 180ms; }
.mobile-menu.open a:nth-child(5) { transition-delay: 240ms; }
.menu-open body { overflow: hidden; }

@media (max-width: 767px) {
  .nav-links { display: none; }
  .menu-toggle { display: inline-grid; }
  .site-header nav { gap: var(--space-75); }
  .lockup .word { display: none; }
}
@media (min-width: 768px) {
  .nav-links { display: contents; }
}

/* Long rows scroll inside their box, never the page */
lit-material-tabs { max-width: 100%; }
lit-material-tabs::part(tablist) { overflow-x: auto; scrollbar-width: none; }
lit-material-code-block::part(pre) { overflow-x: auto; }

lit-material-navigation-rail-item [slot="icon"] { width: 24px; height: 24px; }

/* Docs layout: sidebar · article · on-page TOC */
.docs-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-400);
  max-width: 1440px;
  margin: var(--space-600) auto 0;
  padding: 0 var(--space-200);
}
@media (min-width: 900px) {
  .docs-layout { grid-template-columns: 260px minmax(0, 1fr); }
}
@media (min-width: 1200px) {
  .docs-layout { grid-template-columns: 260px minmax(0, 1fr) 220px; }
}
.docs-sidebar, .docs-aside { font-size: var(--text-sm); line-height: var(--leading-sm); }
.docs-nav-desktop { display: none; }
@media (min-width: 900px) {
  .docs-nav-mobile { display: none; }
  .docs-nav-desktop {
    display: block;
    position: sticky;
    top: var(--space-900);
    max-height: calc(100vh - var(--space-900) - var(--space-300));
    overflow-y: auto;
    padding-right: var(--space-75);
  }
}
.docs-aside { display: none; }
@media (min-width: 1200px) {
  .docs-aside { display: block; }
  .docs-toc { position: sticky; top: var(--space-900); }
}
.docs-nav-mobile summary {
  display: flex; align-items: center; gap: var(--space-75);
  padding: var(--space-75) var(--space-100);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-medium);
  cursor: pointer; font-weight: 600; list-style: none;
}
.docs-nav-mobile summary svg, .docs-search-button svg, .docs-edit svg { width: 16px; height: 16px; flex: none; }
.docs-nav-mobile[open] .docs-nav { margin-top: var(--space-200); }

.docs-search-button {
  display: flex; align-items: center; gap: var(--space-75); width: 100%;
  margin-bottom: var(--space-200);
  padding: var(--space-75) var(--space-100);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-medium);
  background: var(--md-sys-color-surface-container-low);
  color: var(--md-sys-color-on-surface-variant);
  font: inherit; cursor: pointer;
  transition: background-color var(--duration-color) var(--ease);
}
.docs-search-button:hover { background: var(--md-sys-color-surface-container); }
.docs-search-button span { flex: 1; text-align: left; }
.docs-search-button kbd {
  padding: 0 var(--space-50); border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-extra-small); font-size: var(--text-xs); line-height: var(--leading-xs);
}
.docs-group { margin-bottom: var(--space-200); }
.docs-group summary { cursor: pointer; font-weight: 600; padding: var(--space-50) 0; color: var(--md-sys-color-on-surface); }
.docs-group ul, .docs-toc ul { list-style: none; margin: 0; padding: 0; }
.docs-group li a {
  display: block;
  padding: var(--space-75) var(--space-100);
  border-radius: var(--md-sys-shape-corner-medium);
  color: var(--md-sys-color-on-surface-variant);
  text-decoration: none;
  transition: background-color var(--duration-color) var(--ease);
}
.docs-group li a:hover { background: var(--md-sys-color-surface-container); }
.docs-group li a[aria-current="page"] {
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  font-weight: 600;
}
.docs-toc-title { margin: 0 0 var(--space-75); font-weight: 600; }
.docs-toc li a { display: block; padding: var(--space-25) 0; color: var(--md-sys-color-on-surface-variant); text-decoration: none; }
.docs-toc li a:hover { color: var(--md-sys-color-primary); }
.docs-toc li.depth-3 a { padding-left: var(--space-100); }
lit-material-jump-links.docs-toc::part(title) { font-weight: 600; }

.docs-main { min-width: 0; max-width: 780px; }
.docs-article h1 { font-size: var(--text-4xl); line-height: var(--leading-4xl); }
.docs-lead { margin: var(--space-200) 0 0; font-size: var(--text-lg); line-height: var(--leading-lg); color: var(--md-sys-color-on-surface-variant); }

.prose { margin-top: var(--space-400); overflow-wrap: break-word; }
.prose :not(pre) > code { overflow-wrap: anywhere; }
.prose > * + * { margin-top: var(--space-200); }
.prose h2 { margin-top: var(--space-600); font-size: var(--text-2xl); line-height: var(--leading-2xl); scroll-margin-top: var(--space-900); }
.prose h3 { margin-top: var(--space-400); font-size: var(--text-xl); line-height: var(--leading-xl); scroll-margin-top: var(--space-900); }
.prose h4 { margin-top: var(--space-300); font-size: var(--text-base); line-height: var(--leading-base); }
.prose p, .prose ul, .prose ol { margin-bottom: 0; }
.prose li + li { margin-top: var(--space-50); }
.prose :not(pre) > code {
  padding: var(--space-25) var(--space-50);
  border-radius: var(--md-sys-shape-corner-extra-small);
  background: var(--md-sys-color-surface-container);
  font-size: 0.875em;
}
.heading-anchor { margin-left: var(--space-75); opacity: 0; color: var(--md-sys-color-secondary); text-decoration: none; transition: opacity var(--duration-color) var(--ease); }
.prose h2:hover .heading-anchor, .prose h3:hover .heading-anchor { opacity: 1; }
.prose blockquote { margin-left: 0; padding: var(--space-100) var(--space-200); border-radius: var(--md-sys-shape-corner-large); background: var(--md-sys-color-surface-container-low); }
.table-wrap { overflow-x: auto; border: 1px solid var(--md-sys-color-outline-variant); border-radius: var(--md-sys-shape-corner-large); }
.prose table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); line-height: var(--leading-sm); }
.prose th, .prose td { padding: var(--space-75) var(--space-100); text-align: left; vertical-align: top; }
.prose tr + tr td, .prose tbody tr td { border-top: 1px solid var(--md-sys-color-outline-variant); }
.prose th { background: var(--md-sys-color-surface-container-low); font-weight: 600; }
.prose lit-material-alert, .prose lit-material-code-block { display: block; }

/* Shiki dual themes: colours come as --shiki-light / --shiki-dark */
.shiki, .shiki span { color: light-dark(var(--shiki-light), var(--shiki-dark)); }
.shiki { background: transparent !important; margin: 0; }
/* The theme's comment grey is 4.26:1 on the cream page; a step darker passes 4.5:1. */
.shiki span[style*="--shiki-light:#66707B"] { --shiki-light: #555d66; }

/* Code blocks and alerts inside Markdown are server-rendered too (declarative
   shadow DOM), so they need no styles for the not-yet-upgraded state. */

.docs-edit { margin-top: var(--space-600); font-size: var(--text-sm); line-height: var(--leading-sm); }
.docs-edit a { display: inline-flex; align-items: center; gap: var(--space-75); color: var(--md-sys-color-on-surface-variant); }
.docs-pager { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-200); margin-top: var(--space-300); }
.docs-pager a {
  display: grid; gap: var(--space-25);
  padding: var(--space-200);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-large);
  text-decoration: none; color: var(--md-sys-color-on-surface);
  transition: background-color var(--duration-color) var(--ease);
}
.docs-pager a:hover { background: var(--md-sys-color-surface-container-low); }
.docs-pager .next { text-align: right; grid-column: 2; }
.docs-pager small { color: var(--md-sys-color-on-surface-variant); font-size: var(--text-xs); line-height: var(--leading-xs); }
.docs-pager span { font-weight: 600; }

.docs-index { display: grid; gap: var(--space-400); margin-top: var(--space-400); }
@media (min-width: 700px) { .docs-index { grid-template-columns: 1fr 1fr; } }
.docs-index h2 { font-size: var(--text-xl); line-height: var(--leading-xl); }
.docs-index ul { list-style: none; margin: var(--space-100) 0 0; padding: 0; display: grid; gap: var(--space-100); }
.docs-index li { display: grid; }
.docs-index li span { color: var(--md-sys-color-on-surface-variant); font-size: var(--text-sm); line-height: var(--leading-sm); }

/* Search dialog */
.search-dialog {
  width: min(640px, calc(100vw - var(--space-400)));
  max-height: min(560px, calc(100vh - var(--space-900)));
  margin-top: var(--space-900);
  padding: 0;
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-extra-large);
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
}
.search-dialog::backdrop { background: rgb(0 0 0 / 0.4); }
.search-form { display: flex; align-items: center; gap: var(--space-100); padding: var(--space-100) var(--space-200); border-bottom: 1px solid var(--md-sys-color-outline-variant); }
.search-form > svg { width: 20px; height: 20px; flex: none; color: var(--md-sys-color-on-surface-variant); }
.search-form input::-webkit-search-cancel-button { display: none; }
.search-form input { flex: 1; min-width: 0; border: 0; background: none; color: inherit; font: inherit; font-size: var(--text-lg); line-height: var(--leading-lg); outline: none; }
.search-results { padding: var(--space-100); overflow-y: auto; }
.search-results ul { list-style: none; margin: 0; padding: 0; }
.search-results a { display: grid; gap: var(--space-25); padding: var(--space-100); border-radius: var(--md-sys-shape-corner-large); color: inherit; text-decoration: none; }
.search-results a:hover, .search-results a:focus-visible { background: var(--md-sys-color-surface-container); }
.search-results span { font-size: var(--text-sm); line-height: var(--leading-sm); color: var(--md-sys-color-on-surface-variant); }
.search-results mark { background: var(--md-sys-color-primary-container); color: var(--md-sys-color-on-primary-container); border-radius: var(--md-sys-shape-corner-extra-small); }
.search-empty { margin: 0; padding: var(--space-200); color: var(--md-sys-color-on-surface-variant); }
.search-skeleton { height: var(--space-600); margin: var(--space-75) 0; border-radius: var(--md-sys-shape-corner-large); background: var(--md-sys-color-surface-container); animation: pulse 1.2s var(--ease) infinite alternate; }
@keyframes pulse { from { opacity: 0.5; } to { opacity: 1; } }

/* Version switcher and older-version notice */
.version-switch { position: relative; margin-bottom: var(--space-100); }
.version-switch summary {
  display: flex; align-items: center; gap: var(--space-75);
  padding: var(--space-75) var(--space-100);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-medium);
  cursor: pointer; list-style: none;
}
.version-switch summary::after { content: "â–¾"; margin-left: auto; color: var(--md-sys-color-on-surface-variant); }
/* A menu over the sidebar, not a list that pushes it down. */
.version-menu {
  position: absolute; left: 0; right: 0; top: calc(100% + var(--space-50)); z-index: 6;
  max-height: min(420px, 60vh); overflow-y: auto; padding: var(--space-50);
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-medium);
  background: var(--md-sys-color-surface);
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.18);
}
.version-switch ul { list-style: none; margin: 0; padding: 0; }
.version-older summary { cursor: pointer; padding: var(--space-75) var(--space-100); color: var(--md-sys-color-on-surface-variant); border: 0; list-style: revert; }
.version-older summary::after { content: none; }
.version-switch li a { display: block; padding: var(--space-75) var(--space-100); border-radius: var(--md-sys-shape-corner-small); color: var(--md-sys-color-on-surface); text-decoration: none; }
.version-switch li a:hover { background: var(--md-sys-color-surface-container); }
.version-switch li a[aria-current="page"] { font-weight: 600; color: var(--md-sys-color-primary); }
.latest-tag {
  padding: 0 var(--space-75); border-radius: var(--md-sys-shape-corner-full);
  background: var(--md-sys-color-primary-container); color: var(--md-sys-color-on-primary-container);
  font-size: var(--text-xs); line-height: var(--leading-xs); font-weight: 600;
}
.version-notice { display: block; margin-bottom: var(--space-400); }

/* 18.37: anchored headings clear the floating header; it no longer shows text through it. */
html { scroll-padding-top: calc(var(--space-900) + var(--space-200)); }

/* "On this page" under the title when there is no side column. */
.docs-toc-inline {
  margin-top: var(--space-300); padding: var(--space-75) var(--space-200);
  border: 1px solid var(--md-sys-color-outline-variant); border-radius: var(--md-sys-shape-corner-large);
  font-size: var(--text-sm); line-height: var(--leading-sm);
}
.docs-toc-inline summary { cursor: pointer; font-weight: 600; min-height: 32px; display: flex; align-items: center; }
.docs-toc-inline ul { list-style: none; margin: var(--space-75) 0 var(--space-50); padding: 0; display: grid; gap: var(--space-25); }
.docs-toc-inline a { display: block; padding: var(--space-50) 0; color: var(--md-sys-color-on-surface-variant); text-decoration: none; }
.docs-toc-inline .depth-3 a { padding-left: var(--space-200); }
@media (min-width: 1200px) { .docs-toc-inline { display: none; } }

/* The docs index: a jump list for its groups. */
.docs-jump { display: flex; flex-wrap: wrap; gap: var(--space-75); margin-top: var(--space-300); }
.docs-jump a {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 var(--space-200);
  border: 1px solid var(--md-sys-color-outline-variant); border-radius: var(--md-sys-shape-corner-full);
  color: var(--md-sys-color-on-surface); text-decoration: none; font-size: var(--text-sm);
}
.docs-jump a:hover { background: var(--md-sys-color-surface-container); }
.docs-index h2 { scroll-margin-top: calc(var(--space-900) + var(--space-200)); }

/* Changelog: older releases grouped by minor version. */
.changelog-older { margin-top: var(--space-800); font-size: var(--text-2xl); line-height: var(--leading-2xl); }
.changelog-group { border-top: 1px solid var(--md-sys-color-outline-variant); }
.changelog-group > summary { cursor: pointer; padding: var(--space-200) 0; display: flex; gap: var(--space-200); align-items: baseline; }
.changelog-group > summary span { color: var(--md-sys-color-on-surface-variant); font-size: var(--text-sm); }
.changelog-group[open] > .prose { margin-top: 0; padding-bottom: var(--space-300); }
.changelog-older-title { margin-top: var(--space-300); }
.changelog-minors { display: flex; flex-wrap: wrap; gap: var(--space-50) var(--space-100); }
.changelog-minors a { display: inline-flex; align-items: center; min-height: 32px; min-width: 40px; }

/* Search: the highlighted result, a page's sections under it, the keys. */
.search-results [role="option"][aria-selected="true"] { background: var(--md-sys-color-surface-container); outline: 2px solid var(--md-sys-color-primary); outline-offset: -2px; }
.search-results .search-sub { margin-left: var(--space-300); padding-top: var(--space-50); padding-bottom: var(--space-50); }
.search-results .search-sub b { font-weight: 500; font-size: var(--text-sm); }
.search-page + .search-page { margin-top: var(--space-75); }
.search-keys { margin: 0; padding: var(--space-75) var(--space-200); border-top: 1px solid var(--md-sys-color-outline-variant); color: var(--md-sys-color-on-surface-variant); font-size: var(--text-xs); display: flex; gap: var(--space-75); align-items: center; }
.search-keys kbd { padding: 0 var(--space-50); border: 1px solid var(--md-sys-color-outline-variant); border-radius: var(--md-sys-shape-corner-extra-small); }
@media (pointer: coarse) { .search-keys { display: none; } }

/* Long lines in code blocks wrap on phones instead of scrolling sideways. */
@media (max-width: 599.98px) {
  .prose lit-material-code-block pre.shiki, .tab-panel lit-material-code-block pre.shiki { white-space: pre-wrap; overflow-wrap: anywhere; }
}