@filipgutica/design-system 2.0.0 → 2.2.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.
@@ -224,15 +224,23 @@
224
224
  /* Tabs */
225
225
  /* The list scrolls, so it clips on every side: the padding keeps the selected tab's shadow whole
226
226
  and its fill off the frame edge. */
227
- .tablist { display: flex; width: max-content; max-width: 100%; overflow-x: auto; padding: var(--space-1); }
227
+ .tablist { --glide-lead: 260ms; --glide-trail: 300ms; display: flex; width: max-content; max-width: 100%; overflow-x: auto; padding: var(--space-1); isolation: isolate; }
228
228
  /* A clipped edge fades over 24px. The script names the clipped ends in data-clip as the list scrolls or resizes. */
229
229
  .tablist[data-clip="start"] { mask-image: linear-gradient(to right, transparent, #000 24px); }
230
230
  .tablist[data-clip="end"] { mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent); }
231
231
  .tablist[data-clip="start end"] { mask-image: linear-gradient(to right, transparent, #000 24px, #000 calc(100% - 24px), transparent); }
232
- .tab { flex: none; min-height: var(--control-md); padding: var(--space-2) var(--space-3); border: 0; border-radius: var(--radius-field); background: transparent; color: var(--color-muted); font: var(--weight-medium) var(--text-md) / var(--leading) var(--font-ui); white-space: nowrap; cursor: pointer; transition: background-color var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out); }
232
+ .tab { position: relative; flex: none; min-height: var(--control-md); padding: var(--space-2) var(--space-3); border: 0; border-radius: var(--radius-inline); background: transparent; color: var(--color-muted); font: var(--weight-medium) var(--text-md) / var(--leading) var(--font-ui); white-space: nowrap; cursor: pointer; transition: background-color var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out); }
233
233
  .tab:is(:hover, .is-hover) { background: var(--color-row-hover); color: var(--color-text); }
234
- /* The selected tab takes the navigation row's lifted fill and motion: one selected state for both. */
235
- .tab[aria-selected="true"] { background: var(--color-nav-current); box-shadow: var(--shadow-nav-current); color: var(--color-nav-current-text); }
234
+ /* The selected tab takes the navigation row's lifted fill: one selected state for both. The fill is a
235
+ ::before layer behind the label, so it can glide between tabs as the segmented thumb does. */
236
+ .tab[aria-selected="true"] { background: transparent; color: var(--color-nav-current-text); }
237
+ .tab[aria-selected="true"]::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--color-nav-current); box-shadow: var(--shadow-nav-current); pointer-events: none; }
238
+ /* A change of tab starts the new fill at the old one's edges; the script marks it with data-slide. */
239
+ @media (prefers-reduced-motion: no-preference) {
240
+ .tablist[data-slide] .tab { transition: color var(--glide-lead) ease; }
241
+ .tablist[data-slide="right"] .tab[aria-selected="true"]::before { animation: glide-left var(--glide-trail) ease, glide-right var(--glide-lead) ease; }
242
+ .tablist[data-slide="left"] .tab[aria-selected="true"]::before { animation: glide-left var(--glide-lead) ease, glide-right var(--glide-trail) ease; }
243
+ }
236
244
  /* Inset: the tab list scrolls sideways, which would clip an outer ring. */
237
245
  .tab:is(:focus-visible, .is-focus) { outline: var(--focus-width) solid var(--color-focus); outline-offset: calc(var(--focus-width) * -1); }
238
246
  .tabpanel { padding-top: var(--space-3); font-size: var(--text-sm); color: var(--color-muted); }
@@ -288,6 +296,10 @@
288
296
  .drawer { display: grid; grid-template-rows: auto minmax(0, 1fr); width: min(calc(var(--sidebar) + var(--space-12)), 100%); height: 260px; overflow: hidden; padding: 0; border: 1px solid transparent; background: var(--color-surface-raised); color: var(--color-text); box-shadow: var(--shadow-dialog); }
289
297
  dialog.drawer { position: fixed; inset: 0 auto 0 0; height: 100dvh; max-height: none; margin: 0; }
290
298
  dialog.drawer::backdrop { background: var(--color-overlay); }
299
+ /* The page behind an open drawer does not scroll, through the slide out too. Hiding the root's overflow keeps the
300
+ reader's position. The gutter is reserved all the time, so a classic scrollbar that hides does not reflow the page. */
301
+ :root { scrollbar-gutter: stable; }
302
+ :root:has(dialog.drawer[open]) { overflow: hidden; }
291
303
  @media (prefers-reduced-motion: no-preference) {
292
304
  dialog.drawer[open] { animation: drawer-in var(--duration) var(--ease-out); }
293
305
  dialog.drawer[open]::backdrop { animation: fade-in var(--duration) var(--ease-out); }
@@ -306,11 +318,20 @@
306
318
  /* Navigation list */
307
319
  .navlist { display: grid; gap: 0.125rem; width: min(100%, 240px); }
308
320
  .navlist .group-label { padding: 0 var(--space-3) var(--space-1); color: var(--color-muted); font-size: var(--text-xs); font-weight: var(--weight-semibold); }
309
- .navlist a { position: relative; display: flex; align-items: center; min-height: var(--row); padding-inline: var(--space-3); border-radius: var(--radius-field); color: var(--color-muted); font-size: var(--text-sm); text-decoration: none; transition: background-color var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out); }
321
+ .navlist a { position: relative; display: flex; align-items: center; min-height: var(--row); padding-inline: var(--space-3); border-radius: var(--radius-inline); color: var(--color-muted); font-size: var(--text-sm); text-decoration: none; transition: background-color var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out); }
310
322
  .navlist a:is(:hover, .is-hover) { background: var(--color-row-hover); color: var(--color-text); text-decoration: none; }
311
323
  .navlist a[aria-current="page"] { background: var(--color-nav-current); box-shadow: var(--shadow-nav-current); color: var(--color-nav-current-text); font-weight: var(--weight-medium); }
312
324
  .navlist a[aria-current="location"] { color: var(--color-text); font-weight: var(--weight-medium); }
313
325
  .navlist a[aria-current="location"]::before { content: ""; position: absolute; inset-inline-start: var(--space-1); width: 3px; height: 14px; border-radius: var(--radius-pill); background: var(--color-accent); }
326
+ /* Optical centring: a line box keeps room for descenders, so a label in a flex row sits about 1px above
327
+ centre. Where text-box is supported, a text-only row becomes a block that trims its line to the cap
328
+ height and centres it, and the pip centres itself. Block padding gives a wrapped label room above its
329
+ first cap and below its last descenders; a single line still centres in the min-height. Rows with an
330
+ icon or a count keep flex layout, and browsers without text-box keep today's rendering. */
331
+ @supports (text-box: trim-both cap alphabetic) {
332
+ .navlist a:not(:has(> *)) { display: block; align-content: center; padding-block: var(--space-2); text-box: trim-both cap alphabetic; }
333
+ .navlist a:not(:has(> *))[aria-current="location"]::before { inset-block: 0; margin-block: auto; }
334
+ }
314
335
  /* Inset: the rail and the drawer scroll. */
315
336
  .navlist a:is(:focus-visible, .is-focus) { outline: var(--focus-width) solid var(--color-focus); outline-offset: calc(var(--focus-width) * -1); }
316
337
  /* Phone trigger: a secondary button with a three-line menu glyph, because it opens a side drawer. */
@@ -319,7 +340,81 @@
319
340
  .rail-summary { list-style: none; width: max-content; max-width: 100%; }
320
341
  .rail-summary::-webkit-details-marker { display: none; }
321
342
  .rail-summary::after { content: ""; width: 6px; height: 6px; margin-left: var(--space-1); border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(45deg); }
322
- details.rail[open] > .navlist { margin-top: var(--space-2); }
343
+ details.rail-details[open] > .navlist { margin-top: var(--space-2); }
344
+ /* A collapsible group's label is a disclosure button in the group-label type. Only rails over about 40 rows use it. */
345
+ .group-toggle { display: flex; align-items: center; justify-content: space-between; min-height: var(--control-sm); padding: 0 var(--space-3); border: 1px solid transparent; border-radius: var(--radius-inline); background: transparent; color: var(--color-muted); font: var(--weight-semibold) var(--text-xs) var(--font-ui); cursor: pointer; transition: background-color var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out); }
346
+ .group-toggle:is(:hover, .is-hover) { background: var(--color-row-hover); color: var(--color-text); }
347
+ .group-toggle .icon { transition: transform var(--duration-fast) var(--ease-out); }
348
+ .group-toggle[aria-expanded="false"] .icon { transform: rotate(-90deg); }
349
+ /* Inset: the rail list scrolls. */
350
+ .group-toggle:is(:focus-visible, .is-focus) { outline: var(--focus-width) solid var(--color-focus); outline-offset: calc(var(--focus-width) * -1); }
351
+ /* Horizontal strip: the same rows in one line that scrolls sideways. The padding keeps the current row's shadow whole.
352
+ A clipped edge fades over 24px, as tabs do; the script names the clipped ends in data-clip. */
353
+ .navlist.strip { display: flex; width: auto; max-width: 100%; overflow-x: auto; padding: 0.125rem; }
354
+ .navlist.strip a { flex: none; white-space: nowrap; }
355
+ .navlist.strip[data-clip="start"] { mask-image: linear-gradient(to right, transparent, #000 24px); }
356
+ .navlist.strip[data-clip="end"] { mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent); }
357
+ .navlist.strip[data-clip="start end"] { mask-image: linear-gradient(to right, transparent, #000 24px, #000 calc(100% - 24px), transparent); }
358
+
359
+ /* Section rail: sticky and full height. The find field and the footer stay put while the list scrolls,
360
+ and the list's padding keeps the current row's shadow whole. */
361
+ .rail { position: sticky; top: 0; align-self: start; display: flex; flex-direction: column; gap: var(--space-3); height: 100dvh; padding-block: var(--space-6) var(--space-4); }
362
+ .rail-list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0.125rem; }
363
+ .rail .navlist { width: auto; }
364
+ .rail .navlist + .navlist { margin-top: var(--space-4); }
365
+ .rail-foot { padding-top: var(--space-3); border-top: 1px solid var(--color-border-subtle); color: var(--color-muted); font-size: var(--text-sm); }
366
+ .rail-foot .switch-row label { color: var(--color-muted); }
367
+ /* In a rail the current section takes the current-page look, with no pip. Strips and contents lists keep the pip. */
368
+ :is(.rail, .rail-specimen) a[aria-current="location"] { background: var(--color-nav-current); box-shadow: var(--shadow-nav-current); color: var(--color-nav-current-text); }
369
+ :is(.rail, .rail-specimen) a[aria-current="location"]::before { content: none; }
370
+ /* Tablet and phone: Find and Menu, icon-only and square, in the header row. */
371
+ .section-bar { display: flex; gap: var(--space-2); }
372
+ .section-bar .btn { width: var(--control-lg); padding: 0; }
373
+
374
+ /* Find field: a search input with a leading icon and a trailing key hint. */
375
+ .find { position: relative; display: block; width: 100%; max-width: 260px; }
376
+ .find .input { width: 100%; padding-inline: 2rem 2.25rem; }
377
+ .find > .icon { position: absolute; left: 10px; top: 50%; translate: 0 -50%; color: var(--color-muted); pointer-events: none; }
378
+ .find > .key { position: absolute; right: 8px; top: 50%; translate: 0 -50%; pointer-events: none; }
379
+ .find:focus-within > .key, .find:has(.input:not(:placeholder-shown)) > .key { display: none; }
380
+ /* Touch-only devices have no / key to press, so the hint hides. */
381
+ @media (hover: none) { .find > .key { display: none; } }
382
+ .find-empty { display: grid; justify-items: start; gap: var(--space-1); padding: var(--space-2) var(--space-3); color: var(--color-muted); font-size: var(--text-sm); }
383
+ .find-empty .btn.text { margin-inline-start: calc(-1 * var(--space-1)); }
384
+ .find-count { color: var(--color-muted); font-size: var(--text-xs); }
385
+
386
+ /* Breadcrumbs. The separator is drawn by CSS, so it is not read. */
387
+ .crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--space-2); margin: 0; padding: 0; list-style: none; font-size: var(--text-sm); }
388
+ .crumbs li { display: inline-flex; align-items: center; gap: var(--space-2); min-width: 0; }
389
+ .crumbs li + li::before { content: "/" / ""; color: var(--color-muted); }
390
+ .crumbs a { display: inline-flex; align-items: center; min-height: var(--control-sm); border-radius: var(--radius-inline); color: var(--color-muted); text-decoration: none; }
391
+ .crumbs a:is(:hover, .is-hover) { color: var(--color-text); text-decoration: underline; text-underline-offset: 0.2em; }
392
+ .crumbs [aria-current="page"] { color: var(--color-text); font-weight: var(--weight-medium); overflow-wrap: anywhere; }
393
+ /* Crumbs share the header row with the strip, so they centre on the cap height too. */
394
+ @supports (text-box: trim-both cap alphabetic) {
395
+ .crumbs a:not(:has(> *)) { display: block; align-content: center; padding-block: var(--space-2); text-box: trim-both cap alphabetic; }
396
+ .crumbs [aria-current="page"], .crumbs li + li::before { text-box: trim-both cap alphabetic; }
397
+ }
398
+ /* Phones show only the parent, as a back link; .is-back pins that for the specimen. */
399
+ .crumbs.is-back li:not(:nth-last-child(2)) { display: none; }
400
+ .crumbs.is-back li::before { content: none; }
401
+ .crumbs.is-back li:nth-last-child(2) a::before { content: "‹\a0" / ""; }
402
+
403
+ /* Pager: previous at the start, next always at the end. */
404
+ .pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); width: 100%; padding-top: var(--space-6); border-top: 1px solid var(--color-border-subtle); }
405
+ .pager a { display: grid; align-content: start; gap: 0.125rem; padding: var(--space-3) var(--space-4); border: 1px solid transparent; border-radius: var(--radius-field); color: var(--color-text); text-decoration: none; transition: background-color var(--duration-fast) var(--ease-out); }
406
+ .pager a:is(:hover, .is-hover) { background: var(--color-row-hover); }
407
+ .pager a[rel="next"] { grid-column: 2; justify-items: end; text-align: end; }
408
+ .pager-dir { display: inline-flex; align-items: center; gap: var(--space-1); color: var(--color-muted); font-size: var(--text-xs); }
409
+ .pager-title { font-weight: var(--weight-medium); }
410
+
411
+ /* Keyboard key: mono, with an edge and no shadow. */
412
+ .key { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 0.3125rem; border: 1px solid var(--color-border); border-radius: var(--radius-inline); background: var(--color-surface); color: var(--color-muted); font: var(--weight-medium) var(--text-xs) / 1 var(--font-mono); vertical-align: 0.1em; }
413
+
414
+ /* Skip link: hidden above the page until it takes focus. */
415
+ .skip { position: absolute; top: calc(-1 * var(--space-16)); left: var(--space-4); z-index: 10; padding: var(--space-2) var(--space-3); border: 1px solid transparent; border-radius: var(--radius-field); background: var(--color-surface-raised); box-shadow: var(--shadow-dialog); color: var(--color-text); }
416
+ .skip:focus { top: var(--space-4); }
417
+ .skip.is-focus { position: static; outline: var(--focus-width) solid var(--color-focus); outline-offset: var(--focus-offset); }
323
418
  /* List selection */
324
419
  .rows { display: grid; width: min(100%, 360px); }
325
420
  .rows [role="option"] { position: relative; display: flex; align-items: center; min-height: var(--row); padding: 0 var(--space-3); border-radius: var(--radius-inline); font-size: var(--text-sm); }
@@ -428,9 +523,8 @@
428
523
  .projects.is-open .navlist { position: static; }
429
524
  .projects .navlist a { font-family: var(--font-mono); }
430
525
  .site-end { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-6); margin-left: auto; }
431
- .site-links { display: flex; gap: var(--space-4); }
432
- .site-links a { display: inline-flex; align-items: center; min-height: var(--control-lg); color: var(--color-muted); text-decoration: none; }
433
- .site-links a:hover { color: var(--color-text); }
526
+ /* The site links are a navigation strip at the header's 44px. */
527
+ .site-links a { min-height: var(--control-lg); }
434
528
 
435
529
  /* Page type and helpers */
436
530
  .folio-h2 { font: var(--weight-semibold) var(--text-xl) / var(--leading-tight) var(--font-mono); letter-spacing: var(--tracking-tight); }
@@ -446,10 +540,6 @@
446
540
  .definitions dt { font-weight: var(--weight-medium); }
447
541
  .definitions dd { margin: 0; color: var(--color-muted); }
448
542
  .definitions code { white-space: nowrap; }
449
- /* Skip link: hidden above the page until it takes focus. */
450
- .skip { position: absolute; top: calc(-1 * var(--space-16)); left: var(--space-4); z-index: 10; padding: var(--space-2) var(--space-3); border: 1px solid transparent; border-radius: var(--radius-field); background: var(--color-surface-raised); box-shadow: var(--shadow-dialog); color: var(--color-text); }
451
- .skip:focus { top: var(--space-4); }
452
- .skip.is-focus { position: static; outline: var(--focus-width) solid var(--color-focus); outline-offset: var(--focus-offset); }
453
543
  .facts { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); margin: 0; font: var(--text-sm) / var(--leading) var(--font-mono); }
454
544
  .facts > div { display: flex; flex-wrap: wrap; column-gap: var(--space-2); }
455
545
  .facts dt { color: var(--color-muted); }
@@ -470,7 +560,7 @@
470
560
  /* One ring for every role: --focus-width of --color-focus (the accent) with a --focus-offset gap and no
471
561
  glow, over the control's own raise or sink. The tokens.css base draws it on links; these rules pin
472
562
  it and move it to the visible part of composite controls. */
473
- :is(.btn, .quiet-action, .check input, .segmented button, .toggle):is(:focus-visible, .is-focus),
563
+ :is(.btn, .quiet-action, .check input, .segmented button, .toggle, .crumbs a):is(:focus-visible, .is-focus),
474
564
  :is(.dialog, .drawer):focus-visible,
475
565
  .switch:is(:focus-visible, .is-focus) .switch-track,
476
566
  .radio-card:has(input:is(:focus-visible, .is-focus)) { outline: var(--focus-width) solid var(--color-focus); outline-offset: var(--focus-offset); }
@@ -491,6 +581,7 @@
491
581
  :is(.input, .select, .textarea):is(:focus-visible, .is-focus), .search:is(:has(input:focus-visible), .is-focus) { outline: var(--focus-width) solid Highlight; outline-offset: -1px; }
492
582
  /* The lifted fill drops, so the selected tab takes a system border; the padding absorbs it. */
493
583
  .tab[aria-selected="true"] { border: 2px solid Highlight; padding: calc(var(--space-2) - 2px) calc(var(--space-3) - 2px); }
584
+ .tab[aria-selected="true"]::before { content: none; }
494
585
  .check input:checked { forced-color-adjust: none; border-color: Highlight; background: Highlight; }
495
586
  /* The masked search cross would lose its fill, so it opts out and takes the system text colour. */
496
587
  .search input::-webkit-search-cancel-button, .search input::-webkit-search-cancel-button:hover { forced-color-adjust: none; background: CanvasText; }
@@ -511,6 +602,10 @@
511
602
  its pip, redrawn in the system highlight, so the two still differ. */
512
603
  .navlist a[aria-current="page"] { border-inline-start: 2px solid Highlight; }
513
604
  .navlist a[aria-current="location"]::before { forced-color-adjust: none; background: Highlight; }
605
+ /* A rail's current section has no pip, so it takes the current page's system border. */
606
+ :is(.rail, .rail-specimen) a[aria-current="location"] { border-inline-start: 2px solid Highlight; }
607
+ .key { border-color: CanvasText; }
608
+ .coverage td { color: CanvasText; }
514
609
  /* Value marks: only the mark opts out of adjustment and redraws in the system highlight. */
515
610
  .progress > span, .score .pips i.on { forced-color-adjust: none; border-color: Highlight; background: Highlight; }
516
611
  /* Each engine's range pseudo-element has its own rule: an unknown one drops the whole list. */
@@ -521,28 +616,33 @@
521
616
  }
522
617
 
523
618
  /* ---------- Catalogue page ---------- */
619
+ /* One scroll offset for every in-page jump; sections set no scroll-margin-top. The location tracker reads the same value. */
620
+ html { scroll-padding-top: var(--space-4); }
524
621
  .frame { width: min(calc(var(--page-max) + var(--sidebar)), calc(100% - var(--space-12))); margin-inline: auto; }
525
- .page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: var(--space-16); border-bottom: 1px solid var(--color-border-subtle); }
526
- .page-head .brand { color: var(--color-text); font: var(--weight-semibold) var(--text-md) var(--font-mono); }
527
- .page-head nav { display: flex; flex-wrap: wrap; gap: 0 var(--space-6); }
528
- .page-head nav a { display: inline-flex; align-items: center; min-height: var(--control-lg); font-size: var(--text-sm); }
622
+ /* Header: the site name, the design system's pages as a navigation strip, and the appearance control. */
623
+ .page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3) var(--space-6); min-height: var(--space-16); border-bottom: 1px solid var(--color-border-subtle); }
624
+ .site-name { margin: 0 auto 0 0; font: var(--weight-semibold) var(--text-sm) / 1 var(--font-mono); }
625
+ /* Header links are navigation rows at the site header's 44px. The strip's label shows only in the drawer. */
626
+ .page-head .strip a { min-height: var(--control-lg); }
627
+ .navlist.strip > .group-label { display: none; }
529
628
  .layout { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); gap: var(--space-8); }
530
- .toc { position: sticky; top: 0; align-self: start; max-height: 100dvh; overflow-y: auto; padding-block: var(--space-6); }
531
- .toc .navlist { width: auto; }
532
- .toc .navlist + .navlist { margin-top: var(--space-4); }
533
- /* One column that may shrink below its content, so a long title or specimen cannot widen the page. */
534
- main { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-12); min-width: 0; padding-block: var(--space-8) var(--space-16); }
629
+ /* One column that may shrink below its content, so a long title or specimen cannot widen the page.
630
+ A short page, such as one left by a find with no matches, keeps its rows at the top. */
631
+ main { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: var(--space-12); min-width: 0; padding-block: var(--space-8) var(--space-16); }
535
632
  .intro { display: grid; gap: var(--space-3); }
536
633
  .intro h1 { font: var(--weight-semibold) var(--text-3xl) / 1.08 var(--font-mono); letter-spacing: var(--tracking-tight); overflow-wrap: anywhere; }
537
634
  .intro p { max-width: var(--measure); color: var(--color-muted); font-size: var(--text-reading); }
538
635
  .layer-head { display: grid; gap: var(--space-2); padding-top: var(--space-6); border-top: 1px solid var(--color-border-subtle); }
539
- .layer-head h2 { font: var(--weight-semibold) var(--text-xl) / var(--leading-tight) var(--font-mono); }
540
- .layer-head h2::before { content: "## " / ""; color: var(--color-accent); }
636
+ :is(.layer-head, .index) > h2 { font: var(--weight-semibold) var(--text-xl) / var(--leading-tight) var(--font-mono); }
637
+ :is(.layer-head, .index) > h2::before { content: "## " / ""; color: var(--color-accent); }
541
638
  .layer-head p { max-width: var(--measure); color: var(--color-muted); }
542
- .component { display: grid; gap: var(--space-3); min-width: 0; scroll-margin-top: var(--space-4); }
639
+ .component { display: grid; gap: var(--space-3); min-width: 0; }
543
640
  .component > header { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2) var(--space-3); }
544
641
  .component h3 { font-size: var(--text-lg); }
545
642
  .component > header a { font-size: var(--text-sm); }
643
+ /* Each component has a one-line purpose, which Find also matches, and a Copy link quiet action. */
644
+ .purpose { max-width: var(--measure); margin-top: calc(-1 * var(--space-2)); color: var(--color-muted); font-size: var(--text-sm); }
645
+ .copy-link { width: var(--control-sm); height: var(--control-sm); align-self: center; color: var(--color-muted); }
546
646
  .note { max-width: var(--measure); color: var(--color-muted); font-size: var(--text-sm); }
547
647
  .row { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: var(--space-2) var(--space-6); padding: var(--space-3) 0; border-bottom: 1px solid var(--color-border-subtle); }
548
648
  .row:last-child { border-bottom: 0; }
@@ -558,26 +658,84 @@
558
658
  .wide { flex-basis: 100%; }
559
659
  /* Fields fill their container; the catalogue gives each specimen a preferred width. */
560
660
  .state > :is(.field, .input, .select, .textarea, .search) { width: 220px; }
661
+ .state .pager { padding-top: 0; border-top: 0; }
662
+ .rail-specimen { display: grid; gap: var(--space-3); width: 240px; }
663
+ .phone-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); width: min(100%, 360px); padding-block: var(--space-3); border-bottom: 1px solid var(--color-border-subtle); }
664
+
665
+ /* By purpose: each group with its components, in two balanced columns. */
666
+ .index { display: grid; gap: var(--space-4); }
667
+ .index-grid { columns: 2; column-gap: var(--space-8); }
668
+ .index-grid > div { break-inside: avoid; padding-bottom: var(--space-6); }
669
+ .index-grid h3 { margin-bottom: var(--space-2); font-size: var(--text-md); }
670
+ .index-grid h3 a { color: var(--color-text); text-decoration: none; }
671
+ .index-grid h3 a:hover { text-decoration: underline; }
672
+ .index-grid ul { display: grid; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
673
+ .index-grid li { display: grid; font-size: var(--text-sm); }
674
+ .index-grid li > span { color: var(--color-muted); }
675
+
676
+ /* Control states. The wrapper is positioned, so the visually hidden cell text stays inside the scroller. */
677
+ .coverage-wrap { position: relative; overflow-x: auto; margin-top: calc(-1 * var(--space-8)); }
678
+ .coverage { width: 100%; border-collapse: collapse; font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
679
+ .coverage th, .coverage td { padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--color-border-subtle); text-align: center; }
680
+ .coverage thead th { color: var(--color-muted); font-size: var(--text-xs); font-weight: var(--weight-medium); }
681
+ .coverage :is(thead th:first-child, tbody th) { padding-inline-start: 0; text-align: left; font-weight: var(--weight-regular); white-space: nowrap; }
682
+ .coverage td { color: var(--color-accent); }
683
+ .coverage .none { color: var(--color-muted); }
684
+
685
+ /* The menu drawer holds Find, the pages, the appearance control, and the rail's groups. */
686
+ .drawer .rail { position: static; height: auto; padding: 0; }
687
+ .drawer .rail-list { overflow: visible; }
688
+ .drawer .find { max-width: none; }
689
+ /* The find field stays at the top of the drawer while the list scrolls under it. */
690
+ .drawer .rail-find { position: sticky; top: calc(-1 * var(--space-4)); z-index: 1; margin: calc(-1 * var(--space-4)) calc(-1 * var(--space-4)) 0; padding: var(--space-4); background: var(--color-surface-raised); }
691
+ .drawer .navlist.strip { display: grid; overflow: visible; margin-bottom: var(--space-4); padding: 0; }
692
+ .drawer .navlist.strip > .group-label { display: block; }
693
+ .drawer .navlist.strip a { white-space: normal; }
694
+ .drawer-appearance { display: grid; gap: var(--space-2); margin-bottom: var(--space-4); padding-bottom: var(--space-4); border-bottom: 1px solid var(--color-border-subtle); }
695
+ .drawer-appearance > .group-label { padding-inline: var(--space-3); color: var(--color-muted); font-size: var(--text-xs); font-weight: var(--weight-semibold); }
696
+ .drawer-appearance > .segmented { justify-self: start; max-width: 100%; }
697
+ /* A tap opens the drawer with focus on its body, which draws no ring; the rows show their own. */
698
+ #nav-drawer-body:focus { outline: none; }
561
699
 
562
700
  @media (max-width: 800px) {
701
+ /* With the script, the header is one sticky row with Find and Menu. --head-inset is its height, and
702
+ in-page jumps land below it. */
703
+ :root { --head-inset: calc(var(--control-lg) + 2 * var(--space-3) + 1px); }
704
+ html { scroll-padding-top: calc(var(--head-inset) + var(--space-4)); }
705
+ .page-head { padding-block: var(--space-3); }
706
+ .page-head:has(> .section-bar) { position: sticky; top: 0; z-index: 5; flex-wrap: nowrap; background: var(--color-bg); }
707
+ .page-head:has(> .section-bar) > .site-name { min-width: 0; }
708
+ /* The buttons sit inside the scroll inset, so they cancel it; otherwise focusing one scrolls the page. */
709
+ .page-head > .section-bar > * { scroll-margin-top: calc(-1 * (var(--head-inset) + var(--space-4))); }
710
+ /* Without the script, the links take a second row and the rail stays in place above the content. */
711
+ .page-head .strip { order: 3; flex-basis: 100%; margin-inline: -2px; }
563
712
  .layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
564
- /* Phones: the contents become one native scrolling strip, so the title stays in view. */
565
- .toc { position: static; max-height: none; display: flex; gap: var(--space-4); overflow-x: auto; padding-block: var(--space-2); border-bottom: 1px solid var(--color-border-subtle); }
566
- .toc .navlist + .navlist { margin-top: 0; }
567
- .toc .navlist { display: flex; flex: none; width: auto; }
568
- .toc .navlist a { flex: none; white-space: nowrap; }
569
- .toc .navlist .group-label { display: flex; align-items: center; padding: 0 var(--space-1) 0 0; }
713
+ .layout > .rail { position: static; height: auto; padding-block: var(--space-4); border-bottom: 1px solid var(--color-border-subtle); }
714
+ .layout > .rail .rail-list { overflow: visible; }
715
+ /* The rail sits in the drawer or, without the script, right after the header, so it needs no skip link. */
716
+ .skip[href="#contents"] { display: none; }
717
+ .index-grid { columns: 1; }
570
718
  .row { grid-template-columns: minmax(0, 1fr); }
571
719
  /* Touch: unsized controls grow to --control-lg. Size specimens keep their sizes. */
572
720
  .btn:not([data-size]), .segmented:not([data-size]) button, .navlist a, .tab { min-height: var(--control-lg); }
721
+ /* An unsized segmented control grows its item size too, so icon-only options stay square. */
722
+ .segmented:not([data-size]) { --item: var(--control-lg); }
573
723
  .input:not([data-size]), .select:not([data-size]), .range:not([data-size]) { height: var(--control-lg); }
574
724
  .search { height: var(--control-lg); }
575
725
  .check:not([data-size]), .switch:not([data-size]), .toggle:not([data-size]) { min-height: var(--control-lg); }
726
+ .copy-link { width: var(--control-lg); height: var(--control-lg); }
727
+ .crumbs a, .group-toggle { min-height: var(--control-lg); }
576
728
  .folio-display { font-size: var(--text-display-sm); }
577
729
  }
578
730
  @media (max-width: 640px) {
579
731
  /* Phones: a dialog becomes a bottom sheet with rounded top corners. */
580
732
  dialog.dialog { width: 100%; max-width: none; margin: auto 0 0; border-radius: var(--radius-panel) var(--radius-panel) 0 0; }
733
+ /* Breadcrumbs show only the parent, as a back link. */
734
+ .crumbs li:not(:nth-last-child(2)) { display: none; }
735
+ .crumbs li::before { content: none; }
736
+ .crumbs li:nth-last-child(2) a::before { content: "‹\a0" / ""; }
737
+ .pager { grid-template-columns: minmax(0, 1fr); }
738
+ .pager a[rel="next"] { grid-column: 1; }
581
739
  .definitions { grid-template-columns: minmax(0, 1fr); row-gap: var(--space-1); }
582
740
  .definitions dd + dt { margin-top: var(--space-3); }
583
741
  .frame { width: calc(100% - var(--space-8)); }
@@ -605,52 +763,114 @@
605
763
  <symbol id="i-expand" viewBox="0 0 16 16"><path d="M9.5 2.5h4v4M6.5 13.5h-4v-4M13.5 2.5 9 7M2.5 13.5 7 9"/></symbol>
606
764
  <symbol id="i-list" viewBox="0 0 16 16"><path d="M5.5 4.5h8M5.5 8h8M5.5 11.5h8M2.5 4.5h.01M2.5 8h.01M2.5 11.5h.01"/></symbol>
607
765
  <symbol id="i-grid" viewBox="0 0 16 16"><rect x="2.5" y="2.5" width="4.5" height="4.5" rx="1"/><rect x="9" y="2.5" width="4.5" height="4.5" rx="1"/><rect x="2.5" y="9" width="4.5" height="4.5" rx="1"/><rect x="9" y="9" width="4.5" height="4.5" rx="1"/></symbol>
766
+ <symbol id="i-link" viewBox="0 0 16 16"><path d="M6.8 9.2a2.5 2.5 0 0 0 3.5 0l2.2-2.2a2.5 2.5 0 0 0-3.5-3.5l-.8.8M9.2 6.8a2.5 2.5 0 0 0-3.5 0L3.5 9a2.5 2.5 0 0 0 3.5 3.5l.8-.8"/></symbol>
767
+ <symbol id="i-menu" viewBox="0 0 16 16"><path d="M1.5 3.5h13M1.5 8h13M1.5 12.5h13"/></symbol>
768
+ <symbol id="i-arrow-left" viewBox="0 0 16 16"><path d="M12.5 8h-9M7 4.5 3.5 8 7 11.5"/></symbol>
769
+ <symbol id="i-arrow-right" viewBox="0 0 16 16"><path d="M3.5 8h9M9 4.5l3.5 3.5L9 11.5"/></symbol>
608
770
  </svg>
609
771
 
610
- <a class="skip" href="#title">Skip to components</a>
772
+ <a class="skip" href="#main">Skip to content</a>
773
+ <a class="skip" href="#contents">Skip to contents</a>
611
774
  <div class="frame">
612
775
  <header class="page-head">
613
- <a class="brand" href="components.html">Component catalogue</a>
614
- <nav aria-label="Design language">
615
- <a href="reference.html#foundations">Foundations</a>
616
- <a href="reference.html">Application example</a>
617
- <a href="docs.html">Documentation example</a>
618
- <a href="product.html">Product page example</a>
619
- </nav>
620
- <div class="segmented" role="group" aria-label="Theme" data-live>
776
+ <p class="site-name">Design system</p>
777
+ <nav class="navlist strip" aria-label="Pages"><span class="group-label" aria-hidden="true">Pages</span><a href="reference.html#foundations">Foundations</a><a href="components.html" aria-current="page">Components</a><a href="reference.html">Application example</a><a href="docs.html">Documentation example</a><a href="product.html">Product page example</a></nav>
778
+ <div class="segmented" role="group" aria-label="Appearance" data-live hidden>
621
779
  <button type="button" data-theme-choice="system" aria-pressed="true">System</button>
622
780
  <button type="button" data-theme-choice="light" aria-pressed="false">Light</button>
623
781
  <button type="button" data-theme-choice="dark" aria-pressed="false">Dark</button>
624
782
  </div>
625
783
  </header>
626
784
 
785
+ <!-- Phones: the script moves this bar into the header row, and the rail into the menu drawer. -->
786
+ <div class="section-bar" id="section-bar" hidden>
787
+ <button class="btn secondary" type="button" data-size="lg" id="section-find" aria-label="Find a component" aria-haspopup="dialog"><svg class="icon" aria-hidden="true"><use href="#i-search"/></svg></button>
788
+ <button class="btn secondary" type="button" data-size="lg" id="section-menu" aria-label="Menu" aria-haspopup="dialog"><svg class="icon" aria-hidden="true"><use href="#i-menu"/></svg></button>
789
+ </div>
790
+
627
791
  <div class="layout">
628
- <nav class="toc" aria-label="Components">
629
- <div class="navlist" role="group" aria-labelledby="toc-core">
630
- <span class="group-label" id="toc-core">Core</span>
631
- <a href="#button">Button</a><a href="#quiet-action">Quiet action</a><a href="#text-input-and-textarea">Text input and textarea</a><a href="#select">Select</a><a href="#field-wrapper">Field wrapper</a><a href="#checkbox-and-radio">Checkbox and radio</a><a href="#radio-card-group">Radio card group</a><a href="#switch">Switch</a><a href="#toggle-button">Toggle button</a><a href="#segmented-control">Segmented control</a><a href="#slider">Slider</a><a href="#progress">Progress</a><a href="#score">Score</a><a href="#tabs">Tabs</a><a href="#badge">Badge</a><a href="#alert">Alert</a><a href="#surface-and-card">Surface and card</a><a href="#figure">Figure</a><a href="#dialog">Dialog</a><a href="#drawer">Drawer</a><a href="#navigation-list">Navigation list</a><a href="#code-block">Code block</a>
792
+ <aside class="rail" id="rail" aria-label="Contents">
793
+ <div class="rail-find" hidden>
794
+ <div class="find"><svg class="icon" aria-hidden="true"><use href="#i-search"/></svg><input class="input" type="search" id="find" placeholder="Find a component" aria-label="Find a component" aria-describedby="find-count" autocomplete="off" spellcheck="false" aria-keyshortcuts="/"><kbd class="key" aria-hidden="true">/</kbd></div>
795
+ <p class="sr-only" role="status" id="find-count"></p>
632
796
  </div>
633
- <div class="navlist" role="group" aria-labelledby="toc-identity">
634
- <span class="group-label" id="toc-identity">Identity</span>
635
- <a href="#command-plate">Command plate</a><a href="#terminal-capture">Terminal capture</a><a href="#site-header">Site header</a><a href="#page-type-and-helpers">Page type and helpers</a>
797
+ <nav class="rail-list" id="contents" aria-label="Components">
798
+ <div class="navlist" role="group" aria-labelledby="rail-overview">
799
+ <span class="group-label" id="rail-overview">Overview</span>
800
+ <a href="#index" data-terms="by purpose overview index overview all components">By purpose</a>
801
+ </div>
802
+ <div class="navlist" role="group" aria-labelledby="rail-actions">
803
+ <span class="group-label" id="rail-actions">Actions</span>
804
+ <a href="#button" data-terms="button actions the main action control: primary, secondary, ghost, danger, and text. cta submit link">Button</a><a href="#quiet-action" data-terms="quiet action actions a small transparent action inside a component, such as copy or close. icon button copy close">Quiet action</a>
805
+ </div>
806
+ <div class="navlist" role="group" aria-labelledby="rail-selection">
807
+ <span class="group-label" id="rail-selection">Selection</span>
808
+ <a href="#checkbox-and-radio" data-terms="checkbox and radio selection pick several options, or one from a short list. check tick option">Checkbox and radio</a><a href="#radio-card-group" data-terms="radio card group selection pick one option that needs a description. choice card option">Radio card group</a><a href="#switch" data-terms="switch selection turn a setting on or off at once. toggle on off">Switch</a><a href="#toggle-button" data-terms="toggle button selection a labelled card that latches on, with a switch inside. toggle card pressed">Toggle button</a><a href="#segmented-control" data-terms="segmented control selection two to five short options that apply at once. button group toggle group theme view mode">Segmented control</a>
809
+ </div>
810
+ <div class="navlist" role="group" aria-labelledby="rail-inputs">
811
+ <span class="group-label" id="rail-inputs">Inputs</span>
812
+ <a href="#text-input-and-textarea" data-terms="text input and textarea inputs type a short value or a longer note. field textbox search form">Text input and textarea</a><a href="#select" data-terms="select inputs choose from a longer list. dropdown picker menu">Select</a><a href="#field-wrapper" data-terms="field wrapper inputs label, description, and error text around a field. label help error validation form">Field wrapper</a><a href="#slider" data-terms="slider inputs set a value in a range. range">Slider</a>
813
+ </div>
814
+ <div class="navlist" role="group" aria-labelledby="rail-feedback">
815
+ <span class="group-label" id="rail-feedback">Feedback and status</span>
816
+ <a href="#progress" data-terms="progress feedback and status show how far a task has got. loading bar meter">Progress</a><a href="#score" data-terms="score feedback and status show a value out of a maximum. rating pips">Score</a><a href="#badge" data-terms="badge feedback and status a short status label. tag chip pill label status">Badge</a><a href="#alert" data-terms="alert feedback and status a real caveat or status message in the page. callout banner notice warning error">Alert</a>
817
+ </div>
818
+ <div class="navlist" role="group" aria-labelledby="rail-containers">
819
+ <span class="group-label" id="rail-containers">Containers and overlays</span>
820
+ <a href="#surface-and-card" data-terms="surface and card containers and overlays panels and cards for parallel, comparable content. panel box tile">Surface and card</a><a href="#figure" data-terms="figure containers and overlays an image or diagram with a caption. image screenshot caption">Figure</a><a href="#dialog" data-terms="dialog containers and overlays a modal task that needs an answer before the page continues. modal popup sheet confirm">Dialog</a><a href="#drawer" data-terms="drawer containers and overlays a side panel, such as phone navigation. sheet off-canvas sidebar menu">Drawer</a>
821
+ </div>
822
+ <div class="navlist" role="group" aria-labelledby="rail-navigation">
823
+ <span class="group-label" id="rail-navigation">Navigation</span>
824
+ <a href="#navigation-list" data-terms="navigation list navigation rows of links with current page and current location. nav menu sidebar rail toc contents strip">Navigation list</a><a href="#section-rail" data-terms="section rail navigation a sticky list of sections that moves into a drawer on phones. sidebar on this page toc contents scroll spy">Section rail</a><a href="#find-field" data-terms="find field navigation filter a navigation list as you type. search filter shortcut slash">Find field</a><a href="#breadcrumbs" data-terms="breadcrumbs navigation the path from the site to this page. crumbs hierarchy back path">Breadcrumbs</a><a href="#pager" data-terms="pager navigation previous and next pages in a sequence. pagination prev next sequence">Pager</a><a href="#tabs" data-terms="tabs navigation switch panels about one object, without leaving the page. tablist panels">Tabs</a><a href="#skip-link" data-terms="skip link navigation jump past the header to the content. skip to content a11y bypass">Skip link</a><a href="#keyboard-key" data-terms="keyboard key navigation show a key or shortcut in text. kbd shortcut hotkey">Keyboard key</a>
825
+ </div>
826
+ <div class="navlist" role="group" aria-labelledby="rail-code">
827
+ <span class="group-label" id="rail-code">Code and examples</span>
828
+ <a href="#code-block" data-terms="code block code and examples source code with an optional header and copy, and a live example above it. snippet pre syntax example demo preview playground">Code block</a>
829
+ </div>
830
+ <div class="navlist" role="group" aria-labelledby="rail-identity">
831
+ <span class="group-label" id="rail-identity">Identity</span>
832
+ <a href="#command-plate" data-terms="command plate identity a shell command on a hue-tinted plate. install shell terminal">Command plate</a><a href="#terminal-capture" data-terms="terminal capture identity a recorded terminal screen with a status line. screenshot tui">Terminal capture</a><a href="#site-header" data-terms="site header identity the ~/name header with project switcher and appearance. header project switcher appearance">Site header</a><a href="#page-type-and-helpers" data-terms="page type and helpers identity mono headings, steps, definitions, facts, and the footer. headings steps footer definitions">Page type and helpers</a>
833
+ </div>
834
+ <div class="navlist" role="group" aria-labelledby="rail-reference">
835
+ <span class="group-label" id="rail-reference">Reference</span>
836
+ <a href="#state-coverage" data-terms="control states reference coverage hover pressed selected focus disabled busy invalid matrix">Control states</a>
837
+ </div>
838
+ <div class="find-empty" id="find-empty" hidden><p>No component matches <q></q>.</p><button class="btn text" type="button" id="find-clear">Clear</button></div>
839
+ </nav>
840
+ <div class="rail-foot" hidden>
841
+ <div class="switch-row"><button class="switch" id="shortcut-switch" type="button" role="switch" aria-checked="true" aria-labelledby="shortcut-label"><span class="switch-track" aria-hidden="true"></span></button><label id="shortcut-label" for="shortcut-switch">Single-key shortcuts</label></div>
636
842
  </div>
637
- </nav>
843
+ </aside>
638
844
 
639
845
  <main id="main">
640
846
  <section class="intro" aria-labelledby="title">
641
847
  <h1 id="title">Components</h1>
642
848
  <p>Every component in the design language, in each state that applies. The styles use only <a href="tokens.css"><code>tokens.css</code></a>, and the markup carries the roles and states a React or Vue version should copy. <a href="components.md">Component specs</a> describe each one; <a href="decisions.md">decisions</a> say why.</p>
643
- <p>The first specimen in each row is live. The others pin one state for display and do not respond. Use the theme control to compare light and dark.</p>
849
+ <p>Each component’s badge names its layer: a new project adopts Core as it is, with its own hue and fonts set in the <code>tokens.css</code> identity block, and replaces Identity with its own look. The first specimen in each row is live. The others pin one state for display and do not respond, and every caption names its state.</p>
850
+ </section>
851
+
852
+ <section class="index" id="index" aria-labelledby="index-title">
853
+ <h2 id="index-title">By purpose</h2>
854
+ <div class="index-grid">
855
+ <div><h3><a href="#group-actions">Actions</a></h3><ul><li><a href="#button">Button</a><span>The main action control: primary, secondary, ghost, danger, and text.</span></li><li><a href="#quiet-action">Quiet action</a><span>A small transparent action inside a component, such as Copy or Close.</span></li></ul></div>
856
+ <div><h3><a href="#group-selection">Selection</a></h3><ul><li><a href="#checkbox-and-radio">Checkbox and radio</a><span>Pick several options, or one from a short list.</span></li><li><a href="#radio-card-group">Radio card group</a><span>Pick one option that needs a description.</span></li><li><a href="#switch">Switch</a><span>Turn a setting on or off at once.</span></li><li><a href="#toggle-button">Toggle button</a><span>A labelled card that latches on, with a switch inside.</span></li><li><a href="#segmented-control">Segmented control</a><span>Two to five short options that apply at once.</span></li></ul></div>
857
+ <div><h3><a href="#group-inputs">Inputs</a></h3><ul><li><a href="#text-input-and-textarea">Text input and textarea</a><span>Type a short value or a longer note.</span></li><li><a href="#select">Select</a><span>Choose from a longer list.</span></li><li><a href="#field-wrapper">Field wrapper</a><span>Label, description, and error text around a field.</span></li><li><a href="#slider">Slider</a><span>Set a value in a range.</span></li></ul></div>
858
+ <div><h3><a href="#group-feedback">Feedback and status</a></h3><ul><li><a href="#progress">Progress</a><span>Show how far a task has got.</span></li><li><a href="#score">Score</a><span>Show a value out of a maximum.</span></li><li><a href="#badge">Badge</a><span>A short status label.</span></li><li><a href="#alert">Alert</a><span>A real caveat or status message in the page.</span></li></ul></div>
859
+ <div><h3><a href="#group-containers">Containers and overlays</a></h3><ul><li><a href="#surface-and-card">Surface and card</a><span>Panels and cards for parallel, comparable content.</span></li><li><a href="#figure">Figure</a><span>An image or diagram with a caption.</span></li><li><a href="#dialog">Dialog</a><span>A modal task that needs an answer before the page continues.</span></li><li><a href="#drawer">Drawer</a><span>A side panel, such as phone navigation.</span></li></ul></div>
860
+ <div><h3><a href="#group-navigation">Navigation</a></h3><ul><li><a href="#navigation-list">Navigation list</a><span>Rows of links with current page and current location.</span></li><li><a href="#section-rail">Section rail</a><span>A sticky list of sections that moves into a drawer on phones.</span></li><li><a href="#find-field">Find field</a><span>Filter a navigation list as you type.</span></li><li><a href="#breadcrumbs">Breadcrumbs</a><span>The path from the site to this page.</span></li><li><a href="#pager">Pager</a><span>Previous and next pages in a sequence.</span></li><li><a href="#tabs">Tabs</a><span>Switch panels about one object, without leaving the page.</span></li><li><a href="#skip-link">Skip link</a><span>Jump past the header to the content.</span></li><li><a href="#keyboard-key">Keyboard key</a><span>Show a key or shortcut in text.</span></li></ul></div>
861
+ <div><h3><a href="#group-code">Code and examples</a></h3><ul><li><a href="#code-block">Code block</a><span>Source code with an optional header and Copy, and a live example above it.</span></li></ul></div>
862
+ <div><h3><a href="#group-identity">Identity: terminal folio</a></h3><ul><li><a href="#command-plate">Command plate</a><span>A shell command on a hue-tinted plate.</span></li><li><a href="#terminal-capture">Terminal capture</a><span>A recorded terminal screen with a status line.</span></li><li><a href="#site-header">Site header</a><span>The ~/name header with project switcher and appearance.</span></li><li><a href="#page-type-and-helpers">Page type and helpers</a><span>Mono headings, steps, definitions, facts, and the footer.</span></li></ul></div>
863
+ </div>
644
864
  </section>
645
865
 
646
- <section class="layer-head" aria-labelledby="core-title">
647
- <h2 id="core-title">Core</h2>
648
- <p>A new project adopts these as they are, with its own hue and fonts set in the <code>tokens.css</code> identity block.</p>
866
+ <section class="layer-head" id="group-actions" aria-labelledby="group-actions-title">
867
+ <h2 id="group-actions-title">Actions</h2>
868
+ <p>Start, confirm, or cancel something.</p>
649
869
  </section>
650
870
 
651
- <!-- Button -->
652
- <section class="component" id="button" data-layer="Core" aria-labelledby="button-title">
653
- <header><h3 id="button-title">Button</h3><span class="badge">Core</span><a href="components.md#button">Spec</a></header>
871
+ <section class="component" id="button" data-layer="Core" data-states="hover pressed focus disabled busy" aria-labelledby="button-title">
872
+ <header><h3 id="button-title">Button</h3><span class="badge">Core</span><a href="components.md#button">Spec</a><button class="quiet-action copy-link" type="button" data-copy-link="button" aria-label="Copy link to Button" title="Copy link"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button></header>
873
+ <p class="purpose">The main action control: primary, secondary, ghost, danger, and text.</p>
654
874
  <div class="row"><h4>Primary</h4><div class="states">
655
875
  <div class="state"><button class="btn" type="button"><svg class="icon" aria-hidden="true"><use href="#i-plus"/></svg>New monitor</button><span class="caption">Rest</span></div>
656
876
  <div class="state" inert><button class="btn is-hover" type="button">New monitor</button><span class="caption">Hover</span></div>
@@ -698,8 +918,9 @@
698
918
  </div></div>
699
919
  </section>
700
920
 
701
- <section class="component" id="quiet-action" data-layer="Core" aria-labelledby="quiet-action-title">
702
- <header><h3 id="quiet-action-title">Quiet action</h3><span class="badge">Core</span><a href="components.md#quiet-action">Spec</a></header>
921
+ <section class="component" id="quiet-action" data-layer="Core" data-states="hover pressed focus disabled" aria-labelledby="quiet-action-title">
922
+ <header><h3 id="quiet-action-title">Quiet action</h3><span class="badge">Core</span><a href="components.md#quiet-action">Spec</a><button class="quiet-action copy-link" type="button" data-copy-link="quiet-action" aria-label="Copy link to Quiet action" title="Copy link"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button></header>
923
+ <p class="purpose">A small transparent action inside a component, such as Copy or Close.</p>
703
924
  <p class="note">One recipe for Copy, Full size, dialog and drawer close, and the project trigger. Each component sets only its size and place.</p>
704
925
  <div class="row"><h4>Icon</h4><div class="states">
705
926
  <div class="state"><button class="quiet-action close" type="button" aria-label="Close"><svg class="icon" aria-hidden="true"><use href="#i-close"/></svg></button><span class="caption">Rest</span></div>
@@ -716,64 +937,14 @@
716
937
  </div></div>
717
938
  </section>
718
939
 
719
- <!-- Text input and textarea -->
720
- <section class="component" id="text-input-and-textarea" data-layer="Core" aria-labelledby="input-title">
721
- <header><h3 id="input-title">Text input and textarea</h3><span class="badge">Core</span><a href="components.md#text-input-and-textarea">Spec</a></header>
722
- <div class="row"><h4>Input</h4><div class="states">
723
- <div class="state"><div class="field"><label class="field-label" for="in-rest">Service</label><input class="input" id="in-rest" placeholder="checkout-api"></div><span class="caption">Rest</span></div>
724
- <div class="state" inert><div class="field"><label class="field-label" for="in-focus">Service</label><input class="input is-focus" id="in-focus" value="checkout-api"></div><span class="caption">Focus visible</span></div>
725
- <div class="state" inert><div class="field"><label class="field-label" for="in-disabled">Service</label><input class="input" id="in-disabled" value="checkout-api" disabled></div><span class="caption">Disabled</span></div>
726
- <div class="state" inert><div class="field"><label class="field-label" for="in-invalid">Service</label><input class="input" id="in-invalid" aria-invalid="true" aria-errormessage="in-invalid-error"><p class="field-error" id="in-invalid-error">Enter a service name.</p></div><span class="caption">Invalid</span></div>
727
- <div class="state" inert><div class="field"><label class="field-label" for="in-invalid-focus">Service</label><input class="input is-focus" id="in-invalid-focus" aria-invalid="true" aria-errormessage="in-invalid-focus-error"><p class="field-error" id="in-invalid-focus-error">Enter a service name.</p></div><span class="caption">Invalid, focus visible</span></div>
728
- </div></div>
729
- <div class="row"><h4>Search</h4><div class="states">
730
- <div class="state"><label class="search"><svg class="icon" aria-hidden="true"><use href="#i-search"/></svg><input type="search" aria-label="Search monitors" value="latency"></label><span class="caption">Live; focus it to show the clear cross, which darkens on hover</span></div>
731
- <div class="state" inert><label class="search is-focus"><svg class="icon" aria-hidden="true"><use href="#i-search"/></svg><input type="search" aria-label="Search monitors, focused" value="latency"></label><span class="caption">Focus visible</span></div>
732
- </div></div>
733
- <div class="row"><h4>Sizes</h4><div class="states">
734
- <div class="state" inert><input class="input" data-size="sm" aria-label="Small input" placeholder="Small"><span class="caption">sm</span></div>
735
- <div class="state" inert><input class="input" data-size="md" aria-label="Medium input" placeholder="Medium"><span class="caption">md</span></div>
736
- <div class="state" inert><input class="input" data-size="lg" aria-label="Large input" placeholder="Large"><span class="caption">lg</span></div>
737
- </div></div>
738
- <div class="row"><h4>Textarea</h4><div class="states">
739
- <div class="state"><div class="field"><label class="field-label" for="ta-rest">Note</label><textarea class="textarea" id="ta-rest" placeholder="What changed?"></textarea></div><span class="caption">Rest</span></div>
740
- <div class="state" inert><div class="field"><label class="field-label" for="ta-focus">Note</label><textarea class="textarea is-focus" id="ta-focus">Raised the threshold.</textarea></div><span class="caption">Focus visible</span></div>
741
- <div class="state" inert><div class="field"><label class="field-label" for="ta-disabled">Note</label><textarea class="textarea" id="ta-disabled" disabled>Raised the threshold.</textarea></div><span class="caption">Disabled</span></div>
742
- <div class="state" inert><div class="field"><label class="field-label" for="ta-invalid">Note</label><textarea class="textarea" id="ta-invalid" aria-invalid="true" aria-errormessage="ta-invalid-error"></textarea><p class="field-error" id="ta-invalid-error">Add a note.</p></div><span class="caption">Invalid</span></div>
743
- </div></div>
940
+ <section class="layer-head" id="group-selection" aria-labelledby="group-selection-title">
941
+ <h2 id="group-selection-title">Selection</h2>
942
+ <p>Choose options or turn something on.</p>
744
943
  </section>
745
944
 
746
- <!-- Select -->
747
- <section class="component" id="select" data-layer="Core" aria-labelledby="select-title">
748
- <header><h3 id="select-title">Select</h3><span class="badge">Core</span><a href="components.md#select">Spec</a></header>
749
- <div class="row"><h4>Closed</h4><div class="states">
750
- <div class="state"><div class="field"><label class="field-label" for="se-rest">Window</label><select class="select" id="se-rest"><option>Last hour</option><option>Last 24 hours</option><option>Last 7 days</option></select></div><span class="caption">Rest</span></div>
751
- <div class="state" inert><div class="field"><label class="field-label" for="se-focus">Window</label><select class="select is-focus" id="se-focus"><option>Last hour</option></select></div><span class="caption">Focus visible</span></div>
752
- <div class="state" inert><div class="field"><label class="field-label" for="se-disabled">Window</label><select class="select" id="se-disabled" disabled><option>Last hour</option></select></div><span class="caption">Disabled</span></div>
753
- <div class="state" inert><div class="field"><label class="field-label" for="se-invalid">Window</label><select class="select" id="se-invalid" aria-invalid="true" aria-errormessage="se-invalid-error"><option></option></select><p class="field-error" id="se-invalid-error">Choose a window.</p></div><span class="caption">Invalid</span></div>
754
- </div></div>
755
- <div class="row"><h4>Sizes</h4><div class="states">
756
- <div class="state" inert><select class="select" data-size="sm" aria-label="Small select"><option>Small</option></select><span class="caption">sm</span></div>
757
- <div class="state" inert><select class="select" data-size="md" aria-label="Medium select"><option>Medium</option></select><span class="caption">md</span></div>
758
- <div class="state" inert><select class="select" data-size="lg" aria-label="Large select"><option>Large</option></select><span class="caption">lg</span></div>
759
- </div></div>
760
- <div class="row"><h4>Open picker</h4><div class="states">
761
- <div class="state" inert aria-hidden="true"><ul class="picker"><li>Last hour</li><li class="is-hover">Last 24 hours</li><li aria-selected="true">Last 7 days</li></ul><span class="caption">A static drawing: hover on one option, another checked</span></div>
762
- </div></div>
763
- </section>
764
-
765
- <!-- Field wrapper -->
766
- <section class="component" id="field-wrapper" data-layer="Core" aria-labelledby="fieldw-title">
767
- <header><h3 id="fieldw-title">Field wrapper</h3><span class="badge">Core</span><a href="components.md#field-wrapper">Spec</a></header>
768
- <div class="row"><h4>Description and error</h4><div class="states">
769
- <div class="state"><div class="field"><label class="field-label" for="fw-desc">Threshold</label><input class="input" id="fw-desc" inputmode="numeric" value="300" aria-describedby="fw-desc-text"><p class="field-description" id="fw-desc-text">Milliseconds at p95.</p></div><span class="caption">With description</span></div>
770
- <div class="state" inert><div class="field"><label class="field-label" for="fw-error">Threshold</label><input class="input" id="fw-error" value="-1" aria-invalid="true" aria-errormessage="fw-error-text"><p class="field-error" id="fw-error-text">Enter a positive number.</p></div><span class="caption">Error replaces the description</span></div>
771
- </div></div>
772
- </section>
773
-
774
- <!-- Checkbox and radio -->
775
- <section class="component" id="checkbox-and-radio" data-layer="Core" aria-labelledby="check-title">
776
- <header><h3 id="check-title">Checkbox and radio</h3><span class="badge">Core</span><a href="components.md#checkbox-and-radio">Spec</a></header>
945
+ <section class="component" id="checkbox-and-radio" data-layer="Core" data-states="selected focus disabled" aria-labelledby="check-title">
946
+ <header><h3 id="check-title">Checkbox and radio</h3><span class="badge">Core</span><a href="components.md#checkbox-and-radio">Spec</a><button class="quiet-action copy-link" type="button" data-copy-link="checkbox-and-radio" aria-label="Copy link to Checkbox and radio" title="Copy link"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button></header>
947
+ <p class="purpose">Pick several options, or one from a short list.</p>
777
948
  <div class="row"><h4>Checkbox</h4><div class="states">
778
949
  <div class="state"><label class="check"><input type="checkbox">Notify on recovery</label><span class="caption">Rest</span></div>
779
950
  <div class="state" inert><label class="check"><input type="checkbox" checked>Notify on recovery</label><span class="caption">Checked</span></div>
@@ -793,9 +964,9 @@
793
964
  </div></div>
794
965
  </section>
795
966
 
796
- <!-- Radio card group -->
797
- <section class="component" id="radio-card-group" data-layer="Core" aria-labelledby="rc-title">
798
- <header><h3 id="rc-title">Radio card group</h3><span class="badge">Core</span><a href="components.md#radio-card-group">Spec</a></header>
967
+ <section class="component" id="radio-card-group" data-layer="Core" data-states="hover selected focus disabled" aria-labelledby="rc-title">
968
+ <header><h3 id="rc-title">Radio card group</h3><span class="badge">Core</span><a href="components.md#radio-card-group">Spec</a><button class="quiet-action copy-link" type="button" data-copy-link="radio-card-group" aria-label="Copy link to Radio card group" title="Copy link"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button></header>
969
+ <p class="purpose">Pick one option that needs a description.</p>
799
970
  <div class="row"><h4>Live</h4><div class="states">
800
971
  <div class="state wide"><fieldset class="radio-cards"><legend class="sr-only">Delivery</legend><label class="radio-card"><input type="radio" name="delivery" checked><strong>Immediate</strong><span class="muted">Send each alert.</span></label><label class="radio-card"><input type="radio" name="delivery"><strong>Digest</strong><span class="muted">Group the alerts.</span></label></fieldset><span class="caption">Rest; Immediate is selected</span></div>
801
972
  </div></div>
@@ -805,9 +976,9 @@
805
976
  </div></div>
806
977
  </section>
807
978
 
808
- <!-- Switch -->
809
- <section class="component" id="switch" data-layer="Core" aria-labelledby="switch-title">
810
- <header><h3 id="switch-title">Switch</h3><span class="badge">Core</span><a href="components.md#switch">Spec</a></header>
979
+ <section class="component" id="switch" data-layer="Core" data-states="selected focus disabled" aria-labelledby="switch-title">
980
+ <header><h3 id="switch-title">Switch</h3><span class="badge">Core</span><a href="components.md#switch">Spec</a><button class="quiet-action copy-link" type="button" data-copy-link="switch" aria-label="Copy link to Switch" title="Copy link"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button></header>
981
+ <p class="purpose">Turn a setting on or off at once.</p>
811
982
  <div class="row"><h4>States</h4><div class="states">
812
983
  <div class="state"><div class="switch-row"><button class="switch" id="sw-rest" type="button" role="switch" aria-checked="false" aria-labelledby="sw-rest-label"><span class="switch-track" aria-hidden="true"></span></button><label id="sw-rest-label" for="sw-rest">Alerts</label></div><span class="caption">Off, live</span></div>
813
984
  <div class="state" inert><div class="switch-row"><button class="switch" id="sw-on" type="button" role="switch" aria-checked="true" aria-labelledby="sw-on-label"><span class="switch-track" aria-hidden="true"></span></button><label id="sw-on-label" for="sw-on">Alerts</label></div><span class="caption">On</span></div>
@@ -822,9 +993,9 @@
822
993
  </div></div>
823
994
  </section>
824
995
 
825
- <!-- Toggle button -->
826
- <section class="component" id="toggle-button" data-layer="Core" aria-labelledby="toggle-title">
827
- <header><h3 id="toggle-title">Toggle button</h3><span class="badge">Core</span><a href="components.md#toggle-button">Spec</a></header>
996
+ <section class="component" id="toggle-button" data-layer="Core" data-states="hover pressed focus disabled" aria-labelledby="toggle-title">
997
+ <header><h3 id="toggle-title">Toggle button</h3><span class="badge">Core</span><a href="components.md#toggle-button">Spec</a><button class="quiet-action copy-link" type="button" data-copy-link="toggle-button" aria-label="Copy link to Toggle button" title="Copy link"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button></header>
998
+ <p class="purpose">A labelled card that latches on, with a switch inside.</p>
828
999
  <div class="row"><h4>States</h4><div class="states">
829
1000
  <div class="state"><button class="toggle" type="button" aria-pressed="false" data-live-toggle><span class="toggle-track" aria-hidden="true"></span><span class="toggle-text">Wrap lines<small>Long lines fold</small></span></button><span class="caption">Rest, live</span></div>
830
1001
  <div class="state" inert><button class="toggle is-hover" type="button" aria-pressed="false"><span class="toggle-track" aria-hidden="true"></span><span class="toggle-text">Wrap lines</span></button><span class="caption">Hover</span></div>
@@ -839,9 +1010,9 @@
839
1010
  </div></div>
840
1011
  </section>
841
1012
 
842
- <!-- Segmented control -->
843
- <section class="component" id="segmented-control" data-layer="Core" aria-labelledby="seg-title">
844
- <header><h3 id="seg-title">Segmented control</h3><span class="badge">Core</span><a href="components.md#segmented-control">Spec</a></header>
1013
+ <section class="component" id="segmented-control" data-layer="Core" data-states="hover pressed focus disabled" aria-labelledby="seg-title">
1014
+ <header><h3 id="seg-title">Segmented control</h3><span class="badge">Core</span><a href="components.md#segmented-control">Spec</a><button class="quiet-action copy-link" type="button" data-copy-link="segmented-control" aria-label="Copy link to Segmented control" title="Copy link"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button></header>
1015
+ <p class="purpose">Two to five short options that apply at once.</p>
845
1016
  <p class="note">The live control glides its thumb between options: 260ms for the leading edge, 300ms for the trailing edge. The theme picker at the top uses the same script, and it does not glide when the page loads a saved choice.</p>
846
1017
  <div class="row"><h4>Text</h4><div class="states">
847
1018
  <div class="state"><div class="segmented" role="group" aria-label="View" data-live><button type="button" aria-pressed="true">List</button><button type="button" aria-pressed="false">Board</button><button type="button" aria-pressed="false">Timeline</button></div><span class="caption">Rest, live</span></div>
@@ -856,9 +1027,69 @@
856
1027
  </div></div>
857
1028
  </section>
858
1029
 
859
- <!-- Slider -->
860
- <section class="component" id="slider" data-layer="Core" aria-labelledby="slider-title">
861
- <header><h3 id="slider-title">Slider</h3><span class="badge">Core</span><a href="components.md#slider">Spec</a></header>
1030
+ <section class="layer-head" id="group-inputs" aria-labelledby="group-inputs-title">
1031
+ <h2 id="group-inputs-title">Inputs</h2>
1032
+ <p>Enter text and values.</p>
1033
+ </section>
1034
+
1035
+ <section class="component" id="text-input-and-textarea" data-layer="Core" data-states="focus disabled invalid" aria-labelledby="input-title">
1036
+ <header><h3 id="input-title">Text input and textarea</h3><span class="badge">Core</span><a href="components.md#text-input-and-textarea">Spec</a><button class="quiet-action copy-link" type="button" data-copy-link="text-input-and-textarea" aria-label="Copy link to Text input and textarea" title="Copy link"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button></header>
1037
+ <p class="purpose">Type a short value or a longer note.</p>
1038
+ <div class="row"><h4>Input</h4><div class="states">
1039
+ <div class="state"><div class="field"><label class="field-label" for="in-rest">Service</label><input class="input" id="in-rest" placeholder="checkout-api"></div><span class="caption">Rest</span></div>
1040
+ <div class="state" inert><div class="field"><label class="field-label" for="in-focus">Service</label><input class="input is-focus" id="in-focus" value="checkout-api"></div><span class="caption">Focus visible</span></div>
1041
+ <div class="state" inert><div class="field"><label class="field-label" for="in-disabled">Service</label><input class="input" id="in-disabled" value="checkout-api" disabled></div><span class="caption">Disabled</span></div>
1042
+ <div class="state" inert><div class="field"><label class="field-label" for="in-invalid">Service</label><input class="input" id="in-invalid" aria-invalid="true" aria-errormessage="in-invalid-error"><p class="field-error" id="in-invalid-error">Enter a service name.</p></div><span class="caption">Invalid</span></div>
1043
+ <div class="state" inert><div class="field"><label class="field-label" for="in-invalid-focus">Service</label><input class="input is-focus" id="in-invalid-focus" aria-invalid="true" aria-errormessage="in-invalid-focus-error"><p class="field-error" id="in-invalid-focus-error">Enter a service name.</p></div><span class="caption">Invalid, focus visible</span></div>
1044
+ </div></div>
1045
+ <div class="row"><h4>Search</h4><div class="states">
1046
+ <div class="state"><label class="search"><svg class="icon" aria-hidden="true"><use href="#i-search"/></svg><input type="search" aria-label="Search monitors" value="latency"></label><span class="caption">Live; focus it to show the clear cross, which darkens on hover</span></div>
1047
+ <div class="state" inert><label class="search is-focus"><svg class="icon" aria-hidden="true"><use href="#i-search"/></svg><input type="search" aria-label="Search monitors, focused" value="latency"></label><span class="caption">Focus visible</span></div>
1048
+ </div></div>
1049
+ <div class="row"><h4>Sizes</h4><div class="states">
1050
+ <div class="state" inert><input class="input" data-size="sm" aria-label="Small input" placeholder="Small"><span class="caption">sm</span></div>
1051
+ <div class="state" inert><input class="input" data-size="md" aria-label="Medium input" placeholder="Medium"><span class="caption">md</span></div>
1052
+ <div class="state" inert><input class="input" data-size="lg" aria-label="Large input" placeholder="Large"><span class="caption">lg</span></div>
1053
+ </div></div>
1054
+ <div class="row"><h4>Textarea</h4><div class="states">
1055
+ <div class="state"><div class="field"><label class="field-label" for="ta-rest">Note</label><textarea class="textarea" id="ta-rest" placeholder="What changed?"></textarea></div><span class="caption">Rest</span></div>
1056
+ <div class="state" inert><div class="field"><label class="field-label" for="ta-focus">Note</label><textarea class="textarea is-focus" id="ta-focus">Raised the threshold.</textarea></div><span class="caption">Focus visible</span></div>
1057
+ <div class="state" inert><div class="field"><label class="field-label" for="ta-disabled">Note</label><textarea class="textarea" id="ta-disabled" disabled>Raised the threshold.</textarea></div><span class="caption">Disabled</span></div>
1058
+ <div class="state" inert><div class="field"><label class="field-label" for="ta-invalid">Note</label><textarea class="textarea" id="ta-invalid" aria-invalid="true" aria-errormessage="ta-invalid-error"></textarea><p class="field-error" id="ta-invalid-error">Add a note.</p></div><span class="caption">Invalid</span></div>
1059
+ </div></div>
1060
+ </section>
1061
+
1062
+ <section class="component" id="select" data-layer="Core" data-states="focus disabled invalid" aria-labelledby="select-title">
1063
+ <header><h3 id="select-title">Select</h3><span class="badge">Core</span><a href="components.md#select">Spec</a><button class="quiet-action copy-link" type="button" data-copy-link="select" aria-label="Copy link to Select" title="Copy link"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button></header>
1064
+ <p class="purpose">Choose from a longer list.</p>
1065
+ <div class="row"><h4>Closed</h4><div class="states">
1066
+ <div class="state"><div class="field"><label class="field-label" for="se-rest">Window</label><select class="select" id="se-rest"><option>Last hour</option><option>Last 24 hours</option><option>Last 7 days</option></select></div><span class="caption">Rest</span></div>
1067
+ <div class="state" inert><div class="field"><label class="field-label" for="se-focus">Window</label><select class="select is-focus" id="se-focus"><option>Last hour</option></select></div><span class="caption">Focus visible</span></div>
1068
+ <div class="state" inert><div class="field"><label class="field-label" for="se-disabled">Window</label><select class="select" id="se-disabled" disabled><option>Last hour</option></select></div><span class="caption">Disabled</span></div>
1069
+ <div class="state" inert><div class="field"><label class="field-label" for="se-invalid">Window</label><select class="select" id="se-invalid" aria-invalid="true" aria-errormessage="se-invalid-error"><option></option></select><p class="field-error" id="se-invalid-error">Choose a window.</p></div><span class="caption">Invalid</span></div>
1070
+ </div></div>
1071
+ <div class="row"><h4>Sizes</h4><div class="states">
1072
+ <div class="state" inert><select class="select" data-size="sm" aria-label="Small select"><option>Small</option></select><span class="caption">sm</span></div>
1073
+ <div class="state" inert><select class="select" data-size="md" aria-label="Medium select"><option>Medium</option></select><span class="caption">md</span></div>
1074
+ <div class="state" inert><select class="select" data-size="lg" aria-label="Large select"><option>Large</option></select><span class="caption">lg</span></div>
1075
+ </div></div>
1076
+ <div class="row"><h4>Open picker</h4><div class="states">
1077
+ <div class="state" inert aria-hidden="true"><ul class="picker"><li>Last hour</li><li class="is-hover">Last 24 hours</li><li aria-selected="true">Last 7 days</li></ul><span class="caption">A static drawing: hover on one option, another checked</span></div>
1078
+ </div></div>
1079
+ </section>
1080
+
1081
+ <section class="component" id="field-wrapper" data-layer="Core" data-states="invalid" aria-labelledby="fieldw-title">
1082
+ <header><h3 id="fieldw-title">Field wrapper</h3><span class="badge">Core</span><a href="components.md#field-wrapper">Spec</a><button class="quiet-action copy-link" type="button" data-copy-link="field-wrapper" aria-label="Copy link to Field wrapper" title="Copy link"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button></header>
1083
+ <p class="purpose">Label, description, and error text around a field.</p>
1084
+ <div class="row"><h4>Description and error</h4><div class="states">
1085
+ <div class="state"><div class="field"><label class="field-label" for="fw-desc">Threshold</label><input class="input" id="fw-desc" inputmode="numeric" value="300" aria-describedby="fw-desc-text"><p class="field-description" id="fw-desc-text">Milliseconds at p95.</p></div><span class="caption">With description</span></div>
1086
+ <div class="state" inert><div class="field"><label class="field-label" for="fw-error">Threshold</label><input class="input" id="fw-error" value="-1" aria-invalid="true" aria-errormessage="fw-error-text"><p class="field-error" id="fw-error-text">Enter a positive number.</p></div><span class="caption">Error replaces the description</span></div>
1087
+ </div></div>
1088
+ </section>
1089
+
1090
+ <section class="component" id="slider" data-layer="Core" data-states="focus disabled" aria-labelledby="slider-title">
1091
+ <header><h3 id="slider-title">Slider</h3><span class="badge">Core</span><a href="components.md#slider">Spec</a><button class="quiet-action copy-link" type="button" data-copy-link="slider" aria-label="Copy link to Slider" title="Copy link"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button></header>
1092
+ <p class="purpose">Set a value in a range.</p>
862
1093
  <div class="row"><h4>States</h4><div class="states">
863
1094
  <div class="state"><div class="field"><label class="field-label" for="sl-rest">Sample rate</label><input class="range" id="sl-rest" type="range" min="0" max="100" value="40" style="--value:40%" data-live-range></div><span class="caption">Rest, live</span></div>
864
1095
  <div class="state" inert><input class="range is-focus" type="range" aria-label="Sample rate, focused" min="0" max="100" value="60" style="--value:60%"><span class="caption">Focus visible</span></div>
@@ -871,9 +1102,14 @@
871
1102
  </div></div>
872
1103
  </section>
873
1104
 
874
- <!-- Progress -->
1105
+ <section class="layer-head" id="group-feedback" aria-labelledby="group-feedback-title">
1106
+ <h2 id="group-feedback-title">Feedback and status</h2>
1107
+ <p>Show state, progress, and caveats.</p>
1108
+ </section>
1109
+
875
1110
  <section class="component" id="progress" data-layer="Core" aria-labelledby="progress-title">
876
- <header><h3 id="progress-title">Progress</h3><span class="badge">Core</span><a href="components.md#progress">Spec</a></header>
1111
+ <header><h3 id="progress-title">Progress</h3><span class="badge">Core</span><a href="components.md#progress">Spec</a><button class="quiet-action copy-link" type="button" data-copy-link="progress" aria-label="Copy link to Progress" title="Copy link"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button></header>
1112
+ <p class="purpose">Show how far a task has got.</p>
877
1113
  <div class="row"><h4>Values</h4><div class="states">
878
1114
  <div class="state"><div class="progress" role="progressbar" aria-label="Import, empty" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0"><span style="transform:translateX(-100%)"></span></div><span class="caption">0%</span></div>
879
1115
  <div class="state"><div class="progress" role="progressbar" aria-label="Import" aria-valuemin="0" aria-valuemax="100" aria-valuenow="40"><span style="transform:translateX(-60%)"></span></div><span class="caption">40%</span></div>
@@ -881,35 +1117,18 @@
881
1117
  </div></div>
882
1118
  </section>
883
1119
 
884
- <!-- Score -->
885
1120
  <section class="component" id="score" data-layer="Core" aria-labelledby="score-title">
886
- <header><h3 id="score-title">Score</h3><span class="badge">Core</span><a href="components.md#score">Spec</a></header>
1121
+ <header><h3 id="score-title">Score</h3><span class="badge">Core</span><a href="components.md#score">Spec</a><button class="quiet-action copy-link" type="button" data-copy-link="score" aria-label="Copy link to Score" title="Copy link"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button></header>
1122
+ <p class="purpose">Show a value out of a maximum.</p>
887
1123
  <div class="row"><h4>Values</h4><div class="states">
888
1124
  <div class="state"><span class="score"><span class="pips" aria-hidden="true"><i class="on"></i><i class="on"></i><i class="on"></i><i></i><i></i></span><b>3<span>/5</span></b></span><span class="caption">3 of 5</span></div>
889
1125
  <div class="state"><span class="score"><span class="pips" aria-hidden="true"><i class="on"></i><i class="on"></i><i class="on"></i><i class="on"></i><i class="on"></i></span><b>5<span>/5</span></b></span><span class="caption">5 of 5</span></div>
890
1126
  </div></div>
891
1127
  </section>
892
1128
 
893
- <!-- Tabs -->
894
- <section class="component" id="tabs" data-layer="Core" aria-labelledby="tabs-title">
895
- <header><h3 id="tabs-title">Tabs</h3><span class="badge">Core</span><a href="components.md#tabs">Spec</a></header>
896
- <div class="row"><h4>Live</h4><div class="states">
897
- <div class="state wide" data-tabs data-label="Monitor">
898
- <!-- Without JavaScript every panel shows under its heading; the script builds the tab list. -->
899
- <section class="tabpanel" id="panel-overview" aria-labelledby="panel-overview-heading"><h5 class="tabs-heading" id="panel-overview-heading">Overview</h5><p>Arrow keys move between tabs; Home and End jump to the ends.</p></section>
900
- <section class="tabpanel" id="panel-history" aria-labelledby="panel-history-heading"><h5 class="tabs-heading" id="panel-history-heading">History</h5><p>Seven days of evaluations.</p></section>
901
- <section class="tabpanel" id="panel-settings" aria-labelledby="panel-settings-heading"><h5 class="tabs-heading" id="panel-settings-heading">Settings</h5><p>Threshold and notification settings.</p></section>
902
- </div>
903
- </div></div>
904
- <div class="row"><h4>Pinned</h4><div class="states">
905
- <div class="state" inert><div class="tablist" role="tablist" aria-label="Monitor, hover"><button class="tab" type="button" role="tab" aria-selected="true">Overview</button><button class="tab is-hover" type="button" role="tab" aria-selected="false">History</button></div><span class="caption">Hover on History</span></div>
906
- <div class="state" inert><div class="tablist" role="tablist" aria-label="Monitor, focus"><button class="tab is-focus" type="button" role="tab" aria-selected="true">Overview</button><button class="tab" type="button" role="tab" aria-selected="false">History</button></div><span class="caption">Focus visible</span></div>
907
- </div></div>
908
- </section>
909
-
910
- <!-- Badge -->
911
1129
  <section class="component" id="badge" data-layer="Core" aria-labelledby="badge-title">
912
- <header><h3 id="badge-title">Badge</h3><span class="badge">Core</span><a href="components.md#badge">Spec</a></header>
1130
+ <header><h3 id="badge-title">Badge</h3><span class="badge">Core</span><a href="components.md#badge">Spec</a><button class="quiet-action copy-link" type="button" data-copy-link="badge" aria-label="Copy link to Badge" title="Copy link"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button></header>
1131
+ <p class="purpose">A short status label.</p>
913
1132
  <div class="row"><h4>Tones</h4><div class="states">
914
1133
  <div class="state"><span class="badge">No data</span><span class="caption">Neutral</span></div>
915
1134
  <div class="state"><span class="badge success">Healthy</span><span class="caption">Success</span></div>
@@ -919,9 +1138,9 @@
919
1138
  </div></div>
920
1139
  </section>
921
1140
 
922
- <!-- Alert -->
923
1141
  <section class="component" id="alert" data-layer="Core" aria-labelledby="alert-title">
924
- <header><h3 id="alert-title">Alert</h3><span class="badge">Core</span><a href="components.md#alert">Spec</a></header>
1142
+ <header><h3 id="alert-title">Alert</h3><span class="badge">Core</span><a href="components.md#alert">Spec</a><button class="quiet-action copy-link" type="button" data-copy-link="alert" aria-label="Copy link to Alert" title="Copy link"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button></header>
1143
+ <p class="purpose">A real caveat or status message in the page.</p>
925
1144
  <div class="row"><h4>Tones</h4><div class="states">
926
1145
  <div class="state wide"><div class="alert"><svg class="icon" aria-hidden="true"><use href="#i-help"/></svg><p>Values are sampled every 5 minutes.</p></div><span class="caption">Neutral</span></div>
927
1146
  <div class="state wide"><div class="alert success"><svg class="icon" aria-hidden="true"><use href="#i-check"/></svg><p>The monitor recovered at 14:20.</p></div><span class="caption">Success</span></div>
@@ -931,9 +1150,14 @@
931
1150
  </div></div>
932
1151
  </section>
933
1152
 
934
- <!-- Surface and card -->
1153
+ <section class="layer-head" id="group-containers" aria-labelledby="group-containers-title">
1154
+ <h2 id="group-containers-title">Containers and overlays</h2>
1155
+ <p>Group content, or lay a task over the page.</p>
1156
+ </section>
1157
+
935
1158
  <section class="component" id="surface-and-card" data-layer="Core" aria-labelledby="card-title">
936
- <header><h3 id="card-title">Surface and card</h3><span class="badge">Core</span><a href="components.md#surface-and-card">Spec</a></header>
1159
+ <header><h3 id="card-title">Surface and card</h3><span class="badge">Core</span><a href="components.md#surface-and-card">Spec</a><button class="quiet-action copy-link" type="button" data-copy-link="surface-and-card" aria-label="Copy link to Surface and card" title="Copy link"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button></header>
1160
+ <p class="purpose">Panels and cards for parallel, comparable content.</p>
937
1161
  <div class="row"><h4>Card</h4><div class="states">
938
1162
  <div class="state wide"><article class="card" aria-labelledby="card-sample-title"><div class="card-head"><h4 id="card-sample-title">API p95 latency</h4><span class="badge danger">Alerting</span></div><div class="card-body">412 ms against a 300 ms threshold for 10 minutes.</div><div class="card-foot"><span>checkout-api</span><span>Updated 2 minutes ago</span></div></article><span class="caption">Header, body, and footer</span></div>
939
1163
  </div></div>
@@ -943,15 +1167,15 @@
943
1167
  </div></div>
944
1168
  </section>
945
1169
 
946
- <!-- Figure -->
947
1170
  <section class="component" id="figure" data-layer="Core" aria-labelledby="figure-title">
948
- <header><h3 id="figure-title">Figure</h3><span class="badge">Core</span><a href="components.md#figure">Spec</a></header>
1171
+ <header><h3 id="figure-title">Figure</h3><span class="badge">Core</span><a href="components.md#figure">Spec</a><button class="quiet-action copy-link" type="button" data-copy-link="figure" aria-label="Copy link to Figure" title="Copy link"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button></header>
1172
+ <p class="purpose">An image or diagram with a caption.</p>
949
1173
  <figure class="figure"><div class="figure-plate"><div class="cluster" style="display:flex;gap:var(--space-2);flex-wrap:wrap"><span class="badge success">Healthy</span><span class="badge warning">Warning</span><span class="badge danger">Alerting</span></div></div><figcaption><b>Figure 1.</b> A well with its caption below.</figcaption></figure>
950
1174
  </section>
951
1175
 
952
- <!-- Dialog -->
953
1176
  <section class="component" id="dialog" data-layer="Core" aria-labelledby="dialog-title">
954
- <header><h3 id="dialog-title">Dialog</h3><span class="badge">Core</span><a href="components.md#dialog">Spec</a></header>
1177
+ <header><h3 id="dialog-title">Dialog</h3><span class="badge">Core</span><a href="components.md#dialog">Spec</a><button class="quiet-action copy-link" type="button" data-copy-link="dialog" aria-label="Copy link to Dialog" title="Copy link"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button></header>
1178
+ <p class="purpose">A modal task that needs an answer before the page continues.</p>
955
1179
  <div class="row"><h4>Live</h4><div class="states">
956
1180
  <div class="state"><button class="btn secondary" type="button" data-open="live-dialog">Open dialog</button><span class="caption">Opens a native modal dialog</span></div>
957
1181
  </div></div>
@@ -960,37 +1184,125 @@
960
1184
  </div></div>
961
1185
  </section>
962
1186
 
963
- <!-- Drawer -->
964
1187
  <section class="component" id="drawer" data-layer="Core" aria-labelledby="drawer-title">
965
- <header><h3 id="drawer-title">Drawer</h3><span class="badge">Core</span><a href="components.md#drawer">Spec</a></header>
1188
+ <header><h3 id="drawer-title">Drawer</h3><span class="badge">Core</span><a href="components.md#drawer">Spec</a><button class="quiet-action copy-link" type="button" data-copy-link="drawer" aria-label="Copy link to Drawer" title="Copy link"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button></header>
1189
+ <p class="purpose">A side panel, such as phone navigation.</p>
966
1190
  <div class="row"><h4>Live</h4><div class="states">
967
- <div class="state"><button class="btn secondary menu-glyph" type="button" data-size="lg" data-open="live-drawer">Contents</button><span class="caption">Phone trigger: opens a side drawer</span></div>
1191
+ <div class="state"><button class="btn secondary menu-glyph" type="button" data-size="lg" data-open="live-drawer">Contents</button><span class="caption">Rest, live: a page’s contents trigger opens a side drawer</span></div>
968
1192
  </div></div>
969
1193
  <div class="row"><h4>In place</h4><div class="states">
970
- <div class="state wide" inert><div class="drawer" role="dialog" aria-labelledby="drw-static-title"><div class="drawer-head"><h4 id="drw-static-title">Contents</h4><button class="quiet-action close" type="button" aria-label="Close drawer"><svg class="icon" aria-hidden="true"><use href="#i-close"/></svg></button></div><div class="drawer-body"><nav class="navlist" aria-label="Contents, static"><a href="#button" aria-current="page">Button</a><a href="#select">Select</a><a href="#switch">Switch</a></nav></div></div><span class="caption">Static specimen</span></div>
1194
+ <div class="state wide" inert><div class="drawer" role="dialog" aria-labelledby="drw-static-title"><div class="drawer-head"><h4 id="drw-static-title">Contents</h4><button class="quiet-action close" type="button" aria-label="Close drawer"><svg class="icon" aria-hidden="true"><use href="#i-close"/></svg></button></div><div class="drawer-body"><nav class="navlist" aria-label="Contents, static"><a href="#button" aria-current="location">Button</a><a href="#select">Select</a><a href="#switch">Switch</a></nav></div></div><span class="caption">Open, pinned; Button is the current section</span></div>
971
1195
  </div></div>
972
1196
  </section>
973
1197
 
974
- <!-- Navigation list -->
975
- <section class="component" id="navigation-list" data-layer="Core" aria-labelledby="nav-title">
976
- <header><h3 id="nav-title">Navigation list</h3><span class="badge">Core</span><a href="components.md#navigation-list">Spec</a></header>
1198
+ <section class="layer-head" id="group-navigation" aria-labelledby="group-navigation-title">
1199
+ <h2 id="group-navigation-title">Navigation</h2>
1200
+ <p>Move between pages and sections, and find things.</p>
1201
+ </section>
1202
+
1203
+ <section class="component" id="navigation-list" data-layer="Core" data-states="hover selected focus" aria-labelledby="nav-title">
1204
+ <header><h3 id="nav-title">Navigation list</h3><span class="badge">Core</span><a href="components.md#navigation-list">Spec</a><button class="quiet-action copy-link" type="button" data-copy-link="navigation-list" aria-label="Copy link to Navigation list" title="Copy link"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button></header>
1205
+ <p class="purpose">Rows of links with current page and current location.</p>
977
1206
  <div class="row"><h4>Rows</h4><div class="states">
978
- <div class="state"><nav class="navlist" aria-label="Sample routes"><span class="group-label">Guides</span><a href="#navigation-list" aria-current="page">Install</a><a href="#navigation-list">Configure</a><a href="#navigation-list">Release</a></nav><span class="caption">Live; Install is the current page</span></div>
979
- <div class="state" inert><nav class="navlist" aria-label="Sample routes, pinned"><a href="#navigation-list" class="is-hover">Hover</a><a href="#navigation-list" aria-current="page" class="is-hover">Current page, hover</a><a href="#navigation-list" aria-current="location">Current location</a><a href="#navigation-list" class="is-focus">Focus visible</a></nav><span class="caption">Pinned states</span></div>
1207
+ <div class="state"><nav class="navlist" aria-label="Sample routes"><span class="group-label">Guides</span><a href="components.html" aria-current="page">Install</a><a href="#navigation-list">Configure</a><a href="#navigation-list">Release</a></nav><span class="caption">Live; Install is the current page</span></div>
1208
+ <div class="state" inert><nav class="navlist" aria-label="Sample routes, pinned"><a href="#navigation-list" class="is-hover">Hover</a><a href="components.html" aria-current="page" class="is-hover">Current page, hover</a><a href="#navigation-list" aria-current="location">Current location</a><a href="#navigation-list" class="is-focus">Focus visible</a></nav><span class="caption">Hover, current page with hover, current location, and focus visible</span></div>
980
1209
  </div></div>
981
- <div class="row"><h4>Phone trigger</h4><div class="states">
982
- <div class="state" inert><button class="btn secondary menu-glyph" type="button" data-size="lg">On this page</button><span class="caption">Drawer trigger</span></div>
983
- <div class="state" inert><button class="btn secondary menu-glyph is-active" type="button" data-size="lg">On this page</button><span class="caption">Pressed</span></div>
984
- <div class="state"><details class="rail"><summary class="btn secondary rail-summary" data-size="lg">On this page</summary><nav class="navlist" aria-label="On this page, no JavaScript"><a href="#navigation-list" aria-current="location">Rows</a><a href="#code-block">Next section</a></nav></details><span class="caption">No-JavaScript fallback, live</span></div>
1210
+ <div class="row"><h4>Drawer triggers</h4><div class="states">
1211
+ <div class="state" inert><div class="section-bar"><button class="btn secondary" type="button" data-size="lg" aria-label="Menu"><svg class="icon" aria-hidden="true"><use href="#i-menu"/></svg></button></div><span class="caption">Rest: the site shell’s Menu button, in the header row; see Section rail</span></div>
1212
+ <div class="state" inert><button class="btn secondary menu-glyph" type="button" data-size="lg">On this page</button><span class="caption">Rest: a page’s own contents drawer, such as a docs page’s On this page</span></div>
1213
+ <div class="state" inert><button class="btn secondary menu-glyph is-active" type="button" data-size="lg">On this page</button><span class="caption">Pressed: the page’s contents trigger</span></div>
1214
+ <div class="state"><details class="rail-details"><summary class="btn secondary rail-summary" data-size="lg">On this page</summary><nav class="navlist" aria-label="On this page, no JavaScript"><a href="#navigation-list" aria-current="location">Rows</a><a href="#code-block">Next section</a></nav></details><span class="caption">Live: the contents trigger’s no-JavaScript fallback</span></div>
985
1215
  </div></div>
986
1216
  <div class="row"><h4>List selection</h4><div class="states">
987
1217
  <div class="state wide" inert><div class="rows" role="listbox" aria-label="Monitors"><div role="option" aria-selected="false">Active consumers</div><div role="option" aria-selected="false">5xx error rate</div><div role="option" aria-selected="true">API p95 latency</div><div role="option" aria-selected="false" class="is-hover">Request volume</div></div><span class="caption">Selected row, and hover on the next</span></div>
988
1218
  </div></div>
989
1219
  </section>
990
1220
 
991
- <!-- Code block -->
1221
+ <section class="component" id="section-rail" data-layer="Core" aria-labelledby="section-rail-title">
1222
+ <header><h3 id="section-rail-title">Section rail</h3><span class="badge">Core</span><a href="components.md#section-rail">Spec</a><button class="quiet-action copy-link" type="button" data-copy-link="section-rail" aria-label="Copy link to Section rail" title="Copy link"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button></header>
1223
+ <p class="purpose">A sticky list of sections that moves into a drawer on phones.</p>
1224
+ <div class="row"><h4>Desktop rail</h4><div class="states">
1225
+ <div class="state"><div class="rail-specimen"><div class="find"><svg class="icon" aria-hidden="true"><use href="#i-search"/></svg><input class="input" type="search" aria-label="Find a component, specimen" placeholder="Find a component"><kbd class="key" aria-hidden="true">/</kbd></div>
1226
+ <nav class="navlist" aria-label="Rail specimen"><span class="group-label">Inputs</span><a href="#section-rail">Select</a><a href="#section-rail" aria-current="location">Slider</a><a href="#section-rail">Field wrapper</a></nav></div><span class="caption">Live; Slider is the current section</span></div>
1227
+ <div class="state" inert><div class="rail-specimen"><nav class="navlist" aria-label="Collapsible specimen"><button class="group-toggle" type="button" aria-expanded="true"><span>Inputs</span><svg class="icon" aria-hidden="true"><use href="#i-chevron-down"/></svg></button><a href="#section-rail">Select</a><a href="#section-rail">Slider</a><button class="group-toggle" type="button" aria-expanded="false"><span>Feedback</span><svg class="icon" aria-hidden="true"><use href="#i-chevron-down"/></svg></button></nav></div><span class="caption">Collapsible groups: Inputs open, Feedback closed</span></div>
1228
+ </div></div>
1229
+ <div class="row"><h4>Phone header</h4><div class="states">
1230
+ <div class="state wide" inert><div class="phone-head"><p class="site-name">Design system</p><div class="section-bar"><button class="btn secondary" type="button" data-size="lg" aria-label="Find a component"><svg class="icon" aria-hidden="true"><use href="#i-search"/></svg></button><button class="btn secondary" type="button" data-size="lg" aria-label="Menu"><svg class="icon" aria-hidden="true"><use href="#i-menu"/></svg></button></div></div><span class="caption">Rest: the sticky header row at tablet width, with Find and Menu</span></div>
1231
+ </div></div>
1232
+ </section>
1233
+
1234
+ <section class="component" id="find-field" data-layer="Core" aria-labelledby="find-field-title">
1235
+ <header><h3 id="find-field-title">Find field</h3><span class="badge">Core</span><a href="components.md#find-field">Spec</a><button class="quiet-action copy-link" type="button" data-copy-link="find-field" aria-label="Copy link to Find field" title="Copy link"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button></header>
1236
+ <p class="purpose">Filter a navigation list as you type.</p>
1237
+ <div class="row"><h4>States</h4><div class="states">
1238
+ <div class="state"><div class="find"><svg class="icon" aria-hidden="true"><use href="#i-search"/></svg><input class="input" type="search" aria-label="Find a component, rest specimen" placeholder="Find a component"><kbd class="key" aria-hidden="true">/</kbd></div><span class="caption">Rest, live; the key hint shows the shortcut</span></div>
1239
+ <div class="state" inert><div class="find"><svg class="icon" aria-hidden="true"><use href="#i-search"/></svg><input class="input is-focus" type="search" aria-label="Find a component, focus specimen" value="tog"></div><span class="find-count">3 matches</span><span class="caption">Focus visible with a query; the hint hides</span></div>
1240
+ <div class="state" inert><div class="find-empty"><p>No component matches <q>tooltip</q>.</p><button class="btn text" type="button">Clear</button></div><span class="caption">No matches</span></div>
1241
+ <div class="state" inert><div class="find"><svg class="icon" aria-hidden="true"><use href="#i-search"/></svg><input class="input" type="search" aria-label="Find a component, shortcuts off specimen" placeholder="Find a component"></div><span class="caption">Rest, shortcuts off: no hint</span></div>
1242
+ </div></div>
1243
+ </section>
1244
+
1245
+ <section class="component" id="breadcrumbs" data-layer="Core" aria-labelledby="breadcrumbs-title">
1246
+ <header><h3 id="breadcrumbs-title">Breadcrumbs</h3><span class="badge">Core</span><a href="components.md#breadcrumbs">Spec</a><button class="quiet-action copy-link" type="button" data-copy-link="breadcrumbs" aria-label="Copy link to Breadcrumbs" title="Copy link"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button></header>
1247
+ <p class="purpose">The path from the site to this page.</p>
1248
+ <div class="row"><h4>Trail</h4><div class="states">
1249
+ <div class="state"><nav class="crumbs" aria-label="Breadcrumb, specimen"><ol><li><a href="#breadcrumbs">Design system</a></li><li><a href="#breadcrumbs">Components</a></li><li><span aria-current="page">Navigation</span></li></ol></nav><span class="caption">Rest, live; the current page is text</span></div>
1250
+ <div class="state" inert><nav class="crumbs" aria-label="Breadcrumb, pinned"><ol><li><a href="#breadcrumbs" class="is-hover">Design system</a></li><li><a href="#breadcrumbs" class="is-focus">Components</a></li><li><span aria-current="page">Navigation</span></li></ol></nav><span class="caption">Hover on Design system, focus visible on Components</span></div>
1251
+ <div class="state" inert><nav class="crumbs is-back" aria-label="Breadcrumb, phone"><ol><li><a href="#breadcrumbs">Design system</a></li><li><a href="#breadcrumbs">Components</a></li><li><span aria-current="page">Navigation</span></li></ol></nav><span class="caption">Phone: the parent only, as a back link</span></div>
1252
+ </div></div>
1253
+ </section>
1254
+
1255
+ <section class="component" id="pager" data-layer="Core" aria-labelledby="pager-title">
1256
+ <header><h3 id="pager-title">Pager</h3><span class="badge">Core</span><a href="components.md#pager">Spec</a><button class="quiet-action copy-link" type="button" data-copy-link="pager" aria-label="Copy link to Pager" title="Copy link"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button></header>
1257
+ <p class="purpose">Previous and next pages in a sequence.</p>
1258
+ <div class="row"><h4>Sequence</h4><div class="states">
1259
+ <div class="state wide"><nav class="pager" aria-label="Pages, specimen"><a href="#pager" rel="prev"><span class="pager-dir"><svg class="icon" aria-hidden="true"><use href="#i-arrow-left"/></svg>Previous</span><span class="pager-title">Foundations</span></a><a href="#pager" rel="next"><span class="pager-dir">Next<svg class="icon" aria-hidden="true"><use href="#i-arrow-right"/></svg></span><span class="pager-title">Application example</span></a></nav><span class="caption">Rest, live; previous and next</span></div>
1260
+ <div class="state wide" inert><nav class="pager" aria-label="Pages, pinned"><a href="#pager" rel="next" class="is-hover"><span class="pager-dir">Next<svg class="icon" aria-hidden="true"><use href="#i-arrow-right"/></svg></span><span class="pager-title">Components</span></a></nav><span class="caption">First page: next only, still at the end; hover</span></div>
1261
+ </div></div>
1262
+ </section>
1263
+
1264
+ <section class="component" id="tabs" data-layer="Core" data-states="hover selected focus" aria-labelledby="tabs-title">
1265
+ <header><h3 id="tabs-title">Tabs</h3><span class="badge">Core</span><a href="components.md#tabs">Spec</a><button class="quiet-action copy-link" type="button" data-copy-link="tabs" aria-label="Copy link to Tabs" title="Copy link"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button></header>
1266
+ <p class="purpose">Switch panels about one object, without leaving the page.</p>
1267
+ <div class="row"><h4>Live</h4><div class="states">
1268
+ <div class="state wide" data-tabs data-label="Monitor">
1269
+ <!-- Without JavaScript every panel shows under its heading; the script builds the tab list. -->
1270
+ <section class="tabpanel" id="panel-overview" aria-labelledby="panel-overview-heading"><h5 class="tabs-heading" id="panel-overview-heading">Overview</h5><p>Arrow keys move between tabs; Home and End jump to the ends.</p></section>
1271
+ <section class="tabpanel" id="panel-history" aria-labelledby="panel-history-heading"><h5 class="tabs-heading" id="panel-history-heading">History</h5><p>Seven days of evaluations.</p></section>
1272
+ <section class="tabpanel" id="panel-settings" aria-labelledby="panel-settings-heading"><h5 class="tabs-heading" id="panel-settings-heading">Settings</h5><p>Threshold and notification settings.</p></section>
1273
+ <span class="caption">Live; Overview is selected</span>
1274
+ </div>
1275
+ </div></div>
1276
+ <div class="row"><h4>Pinned</h4><div class="states">
1277
+ <div class="state" inert><div class="tablist" role="tablist" aria-label="Monitor, hover"><button class="tab" type="button" role="tab" aria-selected="true">Overview</button><button class="tab is-hover" type="button" role="tab" aria-selected="false">History</button></div><span class="caption">Hover on History</span></div>
1278
+ <div class="state" inert><div class="tablist" role="tablist" aria-label="Monitor, focus"><button class="tab is-focus" type="button" role="tab" aria-selected="true">Overview</button><button class="tab" type="button" role="tab" aria-selected="false">History</button></div><span class="caption">Focus visible</span></div>
1279
+ </div></div>
1280
+ </section>
1281
+
1282
+ <section class="component" id="skip-link" data-layer="Core" aria-labelledby="skip-link-title">
1283
+ <header><h3 id="skip-link-title">Skip link</h3><span class="badge">Core</span><a href="components.md#skip-link">Spec</a><button class="quiet-action copy-link" type="button" data-copy-link="skip-link" aria-label="Copy link to Skip link" title="Copy link"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button></header>
1284
+ <p class="purpose">Jump past the header to the content.</p>
1285
+ <div class="row"><h4>Focused</h4><div class="states">
1286
+ <div class="state" inert><a class="skip is-focus" href="#main">Skip to content</a><span class="caption">Focus visible; hidden above the page until focused</span></div>
1287
+ </div></div>
1288
+ </section>
1289
+
1290
+ <section class="component" id="keyboard-key" data-layer="Core" aria-labelledby="keyboard-key-title">
1291
+ <header><h3 id="keyboard-key-title">Keyboard key</h3><span class="badge">Core</span><a href="components.md#keyboard-key">Spec</a><button class="quiet-action copy-link" type="button" data-copy-link="keyboard-key" aria-label="Copy link to Keyboard key" title="Copy link"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button></header>
1292
+ <p class="purpose">Show a key or shortcut in text.</p>
1293
+ <div class="row"><h4>Keys</h4><div class="states">
1294
+ <div class="state"><p class="note">Press <kbd class="key">/</kbd> to find, <kbd class="key">Esc</kbd> to clear, and <kbd class="key">Enter</kbd> to go to the first match.</p><span class="caption">Rest, in running text</span></div>
1295
+ </div></div>
1296
+ </section>
1297
+
1298
+ <section class="layer-head" id="group-code" aria-labelledby="group-code-title">
1299
+ <h2 id="group-code-title">Code and examples</h2>
1300
+ <p>Show source and live examples.</p>
1301
+ </section>
1302
+
992
1303
  <section class="component" id="code-block" data-layer="Core" aria-labelledby="code-title">
993
- <header><h3 id="code-title">Code block</h3><span class="badge">Core</span><a href="components.md#code-block">Spec</a></header>
1304
+ <header><h3 id="code-title">Code block</h3><span class="badge">Core</span><a href="components.md#code-block">Spec</a><button class="quiet-action copy-link" type="button" data-copy-link="code-block" aria-label="Copy link to Code block" title="Copy link"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button></header>
1305
+ <p class="purpose">Source code with an optional header and Copy, and a live example above it.</p>
994
1306
  <div class="row"><h4>Source well</h4><div class="states">
995
1307
  <div class="state wide"><div class="code"><div class="code-head"><b>monitor.ts</b><span class="lang">TypeScript</span><button class="quiet-action copy" type="button" data-copy="code-src"><svg class="icon" aria-hidden="true"><use href="#i-copy"/></svg>Copy</button></div><pre tabindex="0" role="region" aria-label="monitor.ts"><code id="code-src"><span class="line"><span class="ln">1</span><span><span class="k">const</span> threshold = <span class="n">300</span> <span class="c">// ms at p95</span></span></span><span class="line"><span class="ln">2</span><span><span class="k">export const</span> name = <span class="s">'API p95 latency'</span></span></span></code></pre></div><span class="caption">Header, line numbers, and Copy, live</span></div>
996
1308
  <div class="state wide" inert><div class="code compact"><pre><code><span class="line"><span>import { threshold } from './monitor'</span></span></code></pre><button class="quiet-action copy is-focus" type="button" aria-label="Copy import"><svg class="icon" aria-hidden="true"><use href="#i-copy"/></svg></button></div><span class="caption">Compact, with focus visible on Copy</span></div>
@@ -1001,15 +1313,14 @@
1001
1313
  <p class="sr-only" role="status" id="copy-status"></p>
1002
1314
  </section>
1003
1315
 
1004
-
1005
- <section class="layer-head" aria-labelledby="identity-title">
1006
- <h2 id="identity-title">Identity: terminal folio</h2>
1007
- <p>The personal sites' own look. A new project replaces these with its own identity and keeps the core.</p>
1316
+ <section class="layer-head" id="group-identity" aria-labelledby="group-identity-title">
1317
+ <h2 id="group-identity-title">Identity: terminal folio</h2>
1318
+ <p>The personal sites’ look. A new project replaces these with its own.</p>
1008
1319
  </section>
1009
1320
 
1010
- <!-- Command plate -->
1011
1321
  <section class="component" id="command-plate" data-layer="Identity" aria-labelledby="cmd-title">
1012
- <header><h3 id="cmd-title">Command plate</h3><span class="badge">Identity</span><a href="components.md#command-plate">Spec</a></header>
1322
+ <header><h3 id="cmd-title">Command plate</h3><span class="badge">Identity</span><a href="components.md#command-plate">Spec</a><button class="quiet-action copy-link" type="button" data-copy-link="command-plate" aria-label="Copy link to Command plate" title="Copy link"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button></header>
1323
+ <p class="purpose">A shell command on a hue-tinted plate.</p>
1013
1324
  <div class="row"><h4>Commands</h4><div class="states">
1014
1325
  <div class="state wide"><div class="code command compact"><pre tabindex="0" role="region" aria-label="Install command"><code id="cmd-install"><span class="line"><span>brew install filipgutica/tap/filip-stack</span></span></code></pre><button class="quiet-action copy" type="button" data-copy="cmd-install" aria-label="Copy install command"><svg class="icon" aria-hidden="true"><use href="#i-copy"/></svg></button></div><span class="caption">Compact, live; the <code>$</code> is drawn by CSS</span></div>
1015
1326
  <div class="state wide"><div class="code command"><div class="code-head"><b>Set up</b><button class="quiet-action copy" type="button" data-copy="cmd-setup"><svg class="icon" aria-hidden="true"><use href="#i-copy"/></svg>Copy</button></div><pre tabindex="0" role="region" aria-label="Set up commands"><code id="cmd-setup"><span class="line"><span>pnpm install --frozen-lockfile</span></span><span class="line"><span>pnpm check</span></span></code></pre></div><span class="caption">With a header, two lines</span></div>
@@ -1017,9 +1328,9 @@
1017
1328
  </div></div>
1018
1329
  </section>
1019
1330
 
1020
- <!-- Terminal capture -->
1021
1331
  <section class="component" id="terminal-capture" data-layer="Identity" aria-labelledby="capture-title">
1022
- <header><h3 id="capture-title">Terminal capture</h3><span class="badge">Identity</span><a href="components.md#terminal-capture">Spec</a></header>
1332
+ <header><h3 id="capture-title">Terminal capture</h3><span class="badge">Identity</span><a href="components.md#terminal-capture">Spec</a><button class="quiet-action copy-link" type="button" data-copy-link="terminal-capture" aria-label="Copy link to Terminal capture" title="Copy link"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button></header>
1333
+ <p class="purpose">A recorded terminal screen with a status line.</p>
1023
1334
  <div class="capture" data-tabs data-label="Captures">
1024
1335
  <!-- The script adds the tab list and the Full size button; without it every capture is listed. -->
1025
1336
  <div class="capture-head" hidden><button class="quiet-action full" type="button" data-full-size><svg class="icon" aria-hidden="true"><use href="#i-expand"/></svg>Full size</button></div>
@@ -1029,48 +1340,72 @@
1029
1340
  </div>
1030
1341
  </section>
1031
1342
 
1032
- <!-- Site header -->
1033
1343
  <section class="component" id="site-header" data-layer="Identity" aria-labelledby="header-title">
1034
- <header><h3 id="header-title">Site header</h3><span class="badge">Identity</span><a href="components.md#site-header">Spec</a></header>
1344
+ <header><h3 id="header-title">Site header</h3><span class="badge">Identity</span><a href="components.md#site-header">Spec</a><button class="quiet-action copy-link" type="button" data-copy-link="site-header" aria-label="Copy link to Site header" title="Copy link"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button></header>
1345
+ <p class="purpose">The ~/name header with project switcher and appearance.</p>
1035
1346
  <div class="row"><h4>Closed</h4><div class="states">
1036
1347
  <div class="state wide"><div class="site-header">
1037
- <details class="projects"><summary class="quiet-action" aria-label="Project: filip-stack"><span>filip-stack</span><svg class="icon" aria-hidden="true"><use href="#i-chevron-down"/></svg></summary><nav class="navlist" aria-label="Projects"><a href="#site-header">annoterm</a><a href="#site-header" aria-current="page">filip-stack</a><a href="#site-header">ui</a></nav></details>
1038
- <div class="site-end"><nav class="site-links" aria-label="Site links"><a href="#site-header">Docs</a><a href="#site-header">GitHub</a></nav>
1348
+ <details class="projects"><summary class="quiet-action" aria-label="Project: filip-stack"><span>filip-stack</span><svg class="icon" aria-hidden="true"><use href="#i-chevron-down"/></svg></summary><nav class="navlist" aria-label="Projects"><a href="#site-header">annoterm</a><a href="components.html" aria-current="page">filip-stack</a><a href="#site-header">ui</a></nav></details>
1349
+ <div class="site-end"><nav class="navlist strip site-links" aria-label="Site links"><a href="components.html" aria-current="page">Docs</a><a href="#site-header">GitHub</a></nav>
1039
1350
  <div class="segmented" role="group" aria-label="Color theme, sample" data-size="lg" data-icon-only><button type="button" aria-pressed="true" aria-label="System" title="System"><svg class="icon" aria-hidden="true" viewBox="0 0 16 16"><rect x="2" y="2.5" width="12" height="8.5" rx="1.5"/><path d="M5.5 14h5M8 11v3"/></svg></button><button type="button" aria-pressed="false" aria-label="Light" title="Light"><svg class="icon" aria-hidden="true" viewBox="0 0 16 16"><circle cx="8" cy="8" r="3"/><path d="M8 1.5v1.5M8 13v1.5M1.5 8H3M13 8h1.5M3.4 3.4l1 1M11.6 11.6l1 1M3.4 12.6l1-1M11.6 4.4l1-1"/></svg></button><button type="button" aria-pressed="false" aria-label="Dark" title="Dark"><svg class="icon" aria-hidden="true" viewBox="0 0 16 16"><path d="M13 9.5A5.5 5.5 0 0 1 6.5 3a5.5 5.5 0 1 0 6.5 6.5z"/></svg></button></div>
1040
1351
  </div>
1041
- </div><span class="caption">Live: the project switcher opens; the picker is a sample</span></div>
1352
+ </div><span class="caption">Live: the project switcher opens, and Docs is the current page; the picker is a sample</span></div>
1042
1353
  </div></div>
1043
1354
  <div class="row"><h4>Open menu</h4><div class="states">
1044
- <div class="state" inert><details class="projects is-open" open><summary class="quiet-action" aria-label="Project: filip-stack, open"><span>filip-stack</span><svg class="icon" aria-hidden="true"><use href="#i-chevron-down"/></svg></summary><nav class="navlist" aria-label="Projects, pinned"><a href="#site-header" class="is-hover">annoterm</a><a href="#site-header" aria-current="page">filip-stack</a><a href="#site-header">ui</a></nav></details><span class="caption">Menu open, hover on annoterm</span></div>
1355
+ <div class="state" inert><details class="projects is-open" open><summary class="quiet-action" aria-label="Project: filip-stack, open"><span>filip-stack</span><svg class="icon" aria-hidden="true"><use href="#i-chevron-down"/></svg></summary><nav class="navlist" aria-label="Projects, pinned"><a href="#site-header" class="is-hover">annoterm</a><a href="components.html" aria-current="page">filip-stack</a><a href="#site-header">ui</a></nav></details><span class="caption">Menu open, hover on annoterm</span></div>
1045
1356
  </div></div>
1046
1357
  </section>
1047
1358
 
1048
- <!-- Page type and helpers -->
1049
1359
  <section class="component" id="page-type-and-helpers" data-layer="Identity" aria-labelledby="page-type-title">
1050
- <header><h3 id="page-type-title">Page type and helpers</h3><span class="badge">Identity</span><a href="components.md#page-type-and-helpers">Spec</a></header>
1360
+ <header><h3 id="page-type-title">Page type and helpers</h3><span class="badge">Identity</span><a href="components.md#page-type-and-helpers">Spec</a><button class="quiet-action copy-link" type="button" data-copy-link="page-type-and-helpers" aria-label="Copy link to Page type and helpers" title="Copy link"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button></header>
1361
+ <p class="purpose">Mono headings, steps, definitions, facts, and the footer.</p>
1051
1362
  <div class="row"><h4>Headings</h4><div class="states">
1052
1363
  <div class="state wide"><p class="folio-display">~/annoterm</p><span class="caption">Display title, mono</span></div>
1053
1364
  <div class="state wide"><p class="folio-h2">Install</p><span class="caption">Section heading with its <code>##</code> mark</span></div>
1054
1365
  </div></div>
1055
1366
  <div class="row"><h4>Steps</h4><div class="states">
1056
- <div class="state wide"><ol class="steps"><li><h4>Install the CLI</h4><p>Homebrew installs the launcher.</p></li><li><h4>Apply host config</h4><p>It copies the guidance and the design language.</p></li></ol></div>
1367
+ <div class="state wide"><ol class="steps"><li><h4>Install the CLI</h4><p>Homebrew installs the launcher.</p></li><li><h4>Apply host config</h4><p>It copies the guidance and the design language.</p></li></ol><span class="caption">Rest: two steps</span></div>
1057
1368
  </div></div>
1058
1369
  <div class="row"><h4>Facts</h4><div class="states">
1059
- <div class="state wide"><dl class="facts"><div><dt>Installed to</dt><dd>~/design-language</dd></div><div><dt>Source</dt><dd>host-config/design-language</dd></div></dl></div>
1370
+ <div class="state wide"><dl class="facts"><div><dt>Installed to</dt><dd>~/design-language</dd></div><div><dt>Source</dt><dd>host-config/design-language</dd></div></dl><span class="caption">Rest: two facts</span></div>
1060
1371
  </div></div>
1061
1372
  <div class="row"><h4>Definitions</h4><div class="states">
1062
- <div class="state wide"><dl class="definitions"><dt><code>--all</code></dt><dd>Apply every target, including skipped ones.</dd><dt><code>--home</code></dt><dd>Install into another home directory.</dd></dl></div>
1063
- </div></div>
1064
- <div class="row"><h4>Skip link</h4><div class="states">
1065
- <div class="state" inert><a class="skip is-focus" href="#title">Skip to content</a><span class="caption">Focus visible; hidden until focused</span></div>
1373
+ <div class="state wide"><dl class="definitions"><dt><code>--all</code></dt><dd>Apply every target, including skipped ones.</dd><dt><code>--home</code></dt><dd>Install into another home directory.</dd></dl><span class="caption">Rest: two terms</span></div>
1066
1374
  </div></div>
1067
1375
  <div class="row"><h4>Command list</h4><div class="states">
1068
- <div class="state wide"><table class="cmdlist"><thead><tr><th scope="col">Command</th><th scope="col">Use it for</th><td></td></tr></thead><tbody><tr><td><code id="cl-status">filip-stack status</code></td><td>Compare host files with the repository.</td><td><button class="quiet-action copy" type="button" data-copy="cl-status" aria-label="Copy filip-stack status"><svg class="icon" aria-hidden="true"><use href="#i-copy"/></svg></button></td></tr><tr><td><code id="cl-apply">filip-stack apply</code></td><td>Install the current host config.</td><td><button class="quiet-action copy" type="button" data-copy="cl-apply" aria-label="Copy filip-stack apply"><svg class="icon" aria-hidden="true"><use href="#i-copy"/></svg></button></td></tr></tbody></table></div>
1376
+ <div class="state wide"><table class="cmdlist"><thead><tr><th scope="col">Command</th><th scope="col">Use it for</th><td></td></tr></thead><tbody><tr><td><code id="cl-status">filip-stack status</code></td><td>Compare host files with the repository.</td><td><button class="quiet-action copy" type="button" data-copy="cl-status" aria-label="Copy filip-stack status"><svg class="icon" aria-hidden="true"><use href="#i-copy"/></svg></button></td></tr><tr><td><code id="cl-apply">filip-stack apply</code></td><td>Install the current host config.</td><td><button class="quiet-action copy" type="button" data-copy="cl-apply" aria-label="Copy filip-stack apply"><svg class="icon" aria-hidden="true"><use href="#i-copy"/></svg></button></td></tr></tbody></table><span class="caption">Rest: two commands</span></div>
1069
1377
  </div></div>
1070
1378
  <div class="row"><h4>Footer</h4><div class="states">
1071
- <div class="state wide"><div class="site-footer"><a href="#page-type-and-helpers">Made by Filip</a><nav aria-label="Projects, footer"><a href="#page-type-and-helpers">annoterm</a><a href="#page-type-and-helpers">ui</a></nav></div></div>
1379
+ <div class="state wide"><div class="site-footer"><a href="#page-type-and-helpers">Made by Filip</a><nav aria-label="Projects, footer"><a href="#page-type-and-helpers">annoterm</a><a href="#page-type-and-helpers">ui</a></nav></div><span class="caption">Rest</span></div>
1072
1380
  </div></div>
1073
1381
  </section>
1382
+
1383
+ <section class="layer-head" id="state-coverage" aria-labelledby="coverage-title">
1384
+ <h2 id="coverage-title">Control states</h2>
1385
+ <p>The interactive states each control’s spec defines. Selected covers checked, on, and current. Components with no interactive states are left out.</p>
1386
+ </section>
1387
+ <div class="coverage-wrap" tabindex="0" role="region" aria-label="Control states table">
1388
+ <table class="coverage">
1389
+ <thead><tr><th scope="col">Component</th><th scope="col">Hover</th><th scope="col">Pressed</th><th scope="col">Selected</th><th scope="col">Focus</th><th scope="col">Disabled</th><th scope="col">Busy</th><th scope="col">Invalid</th></tr></thead>
1390
+ <tbody>
1391
+ <tr data-for="button"><th scope="row"><a href="#button">Button</a></th><td><span aria-hidden="true">●</span><span class="sr-only">Yes</span></td><td><span aria-hidden="true">●</span><span class="sr-only">Yes</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td><td><span aria-hidden="true">●</span><span class="sr-only">Yes</span></td><td><span aria-hidden="true">●</span><span class="sr-only">Yes</span></td><td><span aria-hidden="true">●</span><span class="sr-only">Yes</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td></tr>
1392
+ <tr data-for="quiet-action"><th scope="row"><a href="#quiet-action">Quiet action</a></th><td><span aria-hidden="true">●</span><span class="sr-only">Yes</span></td><td><span aria-hidden="true">●</span><span class="sr-only">Yes</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td><td><span aria-hidden="true">●</span><span class="sr-only">Yes</span></td><td><span aria-hidden="true">●</span><span class="sr-only">Yes</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td></tr>
1393
+ <tr data-for="checkbox-and-radio"><th scope="row"><a href="#checkbox-and-radio">Checkbox and radio</a></th><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td><td><span aria-hidden="true">●</span><span class="sr-only">Yes</span></td><td><span aria-hidden="true">●</span><span class="sr-only">Yes</span></td><td><span aria-hidden="true">●</span><span class="sr-only">Yes</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td></tr>
1394
+ <tr data-for="radio-card-group"><th scope="row"><a href="#radio-card-group">Radio card group</a></th><td><span aria-hidden="true">●</span><span class="sr-only">Yes</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td><td><span aria-hidden="true">●</span><span class="sr-only">Yes</span></td><td><span aria-hidden="true">●</span><span class="sr-only">Yes</span></td><td><span aria-hidden="true">●</span><span class="sr-only">Yes</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td></tr>
1395
+ <tr data-for="switch"><th scope="row"><a href="#switch">Switch</a></th><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td><td><span aria-hidden="true">●</span><span class="sr-only">Yes</span></td><td><span aria-hidden="true">●</span><span class="sr-only">Yes</span></td><td><span aria-hidden="true">●</span><span class="sr-only">Yes</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td></tr>
1396
+ <tr data-for="toggle-button"><th scope="row"><a href="#toggle-button">Toggle button</a></th><td><span aria-hidden="true">●</span><span class="sr-only">Yes</span></td><td><span aria-hidden="true">●</span><span class="sr-only">Yes</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td><td><span aria-hidden="true">●</span><span class="sr-only">Yes</span></td><td><span aria-hidden="true">●</span><span class="sr-only">Yes</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td></tr>
1397
+ <tr data-for="segmented-control"><th scope="row"><a href="#segmented-control">Segmented control</a></th><td><span aria-hidden="true">●</span><span class="sr-only">Yes</span></td><td><span aria-hidden="true">●</span><span class="sr-only">Yes</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td><td><span aria-hidden="true">●</span><span class="sr-only">Yes</span></td><td><span aria-hidden="true">●</span><span class="sr-only">Yes</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td></tr>
1398
+ <tr data-for="text-input-and-textarea"><th scope="row"><a href="#text-input-and-textarea">Text input and textarea</a></th><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td><td><span aria-hidden="true">●</span><span class="sr-only">Yes</span></td><td><span aria-hidden="true">●</span><span class="sr-only">Yes</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td><td><span aria-hidden="true">●</span><span class="sr-only">Yes</span></td></tr>
1399
+ <tr data-for="select"><th scope="row"><a href="#select">Select</a></th><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td><td><span aria-hidden="true">●</span><span class="sr-only">Yes</span></td><td><span aria-hidden="true">●</span><span class="sr-only">Yes</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td><td><span aria-hidden="true">●</span><span class="sr-only">Yes</span></td></tr>
1400
+ <tr data-for="field-wrapper"><th scope="row"><a href="#field-wrapper">Field wrapper</a></th><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td><td><span aria-hidden="true">●</span><span class="sr-only">Yes</span></td></tr>
1401
+ <tr data-for="slider"><th scope="row"><a href="#slider">Slider</a></th><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td><td><span aria-hidden="true">●</span><span class="sr-only">Yes</span></td><td><span aria-hidden="true">●</span><span class="sr-only">Yes</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td></tr>
1402
+ <tr data-for="navigation-list"><th scope="row"><a href="#navigation-list">Navigation list</a></th><td><span aria-hidden="true">●</span><span class="sr-only">Yes</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td><td><span aria-hidden="true">●</span><span class="sr-only">Yes</span></td><td><span aria-hidden="true">●</span><span class="sr-only">Yes</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td></tr>
1403
+ <tr data-for="tabs"><th scope="row"><a href="#tabs">Tabs</a></th><td><span aria-hidden="true">●</span><span class="sr-only">Yes</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td><td><span aria-hidden="true">●</span><span class="sr-only">Yes</span></td><td><span aria-hidden="true">●</span><span class="sr-only">Yes</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td></tr>
1404
+ </tbody>
1405
+ </table>
1406
+ </div>
1407
+
1408
+ <nav class="pager" aria-label="Design system pages"><a href="reference.html#foundations" rel="prev"><span class="pager-dir"><svg class="icon" aria-hidden="true"><use href="#i-arrow-left"/></svg>Previous</span><span class="pager-title">Foundations</span></a><a href="reference.html" rel="next"><span class="pager-dir">Next<svg class="icon" aria-hidden="true"><use href="#i-arrow-right"/></svg></span><span class="pager-title">Application example</span></a></nav>
1074
1409
  </main>
1075
1410
  </div>
1076
1411
  </div>
@@ -1086,7 +1421,11 @@
1086
1421
  </dialog>
1087
1422
  <dialog class="drawer" id="live-drawer" aria-labelledby="live-drawer-title">
1088
1423
  <div class="drawer-head"><h4 id="live-drawer-title">Contents</h4><form method="dialog"><button class="quiet-action close" type="submit" aria-label="Close drawer"><svg class="icon" aria-hidden="true"><use href="#i-close"/></svg></button></form></div>
1089
- <div class="drawer-body"><nav class="navlist" aria-label="Contents"><a href="#button">Button</a><a href="#segmented-control">Segmented control</a><a href="#navigation-list" aria-current="page">Navigation list</a></nav></div>
1424
+ <div class="drawer-body"><nav class="navlist" aria-label="Contents"><a href="#button">Button</a><a href="#segmented-control">Segmented control</a><a href="#navigation-list" aria-current="location">Navigation list</a></nav></div>
1425
+ </dialog>
1426
+ <dialog class="drawer" id="nav-drawer" aria-labelledby="nav-drawer-title">
1427
+ <div class="drawer-head"><h4 id="nav-drawer-title">Menu</h4><form method="dialog"><button class="quiet-action close" type="submit" aria-label="Close menu"><svg class="icon" aria-hidden="true"><use href="#i-close"/></svg></button></form></div>
1428
+ <div class="drawer-body" id="nav-drawer-body"></div>
1090
1429
  </dialog>
1091
1430
 
1092
1431
  <script>
@@ -1132,8 +1471,10 @@
1132
1471
  return press;
1133
1472
  };
1134
1473
 
1135
- // Theme: System removes the attribute so prefers-color-scheme decides.
1136
- const themeGroup = document.querySelector('[aria-label="Theme"]');
1474
+ // Appearance: System removes the attribute so prefers-color-scheme decides. The control needs the
1475
+ // script, so it shows only once the script runs.
1476
+ const themeGroup = document.querySelector('[aria-label="Appearance"]');
1477
+ themeGroup.hidden = false;
1137
1478
  const pressTheme = segmented(themeGroup, (b) => {
1138
1479
  const choice = b.dataset.themeChoice;
1139
1480
  if (choice === 'system') root.removeAttribute('data-theme'); else root.setAttribute('data-theme', choice);
@@ -1151,6 +1492,17 @@
1151
1492
  // Slider fill follows the value.
1152
1493
  document.querySelectorAll('[data-live-range]').forEach((r) => r.addEventListener('input', () => r.style.setProperty('--value', `${r.value}%`)));
1153
1494
 
1495
+ // A list that scrolls sideways names its clipped ends in data-clip, so CSS fades only those edges.
1496
+ const trackClip = (list) => {
1497
+ const clip = () => {
1498
+ const hidden = list.scrollWidth - list.clientWidth;
1499
+ const ends = [list.scrollLeft > 1 && 'start', list.scrollLeft < hidden - 1 && 'end'].filter(Boolean).join(' ');
1500
+ if (ends) list.dataset.clip = ends; else delete list.dataset.clip;
1501
+ };
1502
+ list.addEventListener('scroll', clip, { passive: true });
1503
+ new ResizeObserver(clip).observe(list);
1504
+ };
1505
+
1154
1506
  // Tabs: progressive enhancement. Each panel starts visible under its heading; the script builds
1155
1507
  // the tab list from the headings, applies tab roles, and hides the headings and other panels.
1156
1508
  document.querySelectorAll('[data-tabs]').forEach((box) => {
@@ -1177,20 +1529,44 @@
1177
1529
  });
1178
1530
  const head = box.querySelector('.capture-head');
1179
1531
  if (head) { head.prepend(list); head.hidden = false; } else box.prepend(list);
1180
- const clip = () => {
1181
- const hidden = list.scrollWidth - list.clientWidth;
1182
- const ends = [list.scrollLeft > 1 && 'start', list.scrollLeft < hidden - 1 && 'end'].filter(Boolean).join(' ');
1183
- if (ends) list.dataset.clip = ends; else delete list.dataset.clip;
1184
- };
1185
- list.addEventListener('scroll', clip, { passive: true });
1186
- new ResizeObserver(clip).observe(list);
1532
+ trackClip(list);
1187
1533
  box.dataset.enhanced = 'true';
1188
- const select = (tab) => tabs.forEach((t) => {
1189
- const on = t === tab;
1190
- t.setAttribute('aria-selected', String(on));
1191
- t.tabIndex = on ? 0 : -1;
1192
- document.getElementById(t.getAttribute('aria-controls')).hidden = !on;
1193
- });
1534
+ // A change of tab glides the fill as the segmented thumb does: the new fill starts at the old fill's
1535
+ // edges, read before the selection changes, and CSS animates each edge home. Edges are kept in the
1536
+ // list's scroll space, because a key press can scroll the list. The first selection does not glide.
1537
+ let glide = 0;
1538
+ const x = (px) => px - list.getBoundingClientRect().left + list.scrollLeft;
1539
+ const clearGlide = () => { delete list.dataset.slide; list.style.removeProperty('--slide-left'); list.style.removeProperty('--slide-right'); };
1540
+ const select = (tab) => {
1541
+ const from = tabs.find((t) => t.getAttribute('aria-selected') === 'true');
1542
+ let edges;
1543
+ if (from && from !== tab && !reduced.matches) {
1544
+ // An interrupted glide starts from where its fill is now.
1545
+ const fill = getComputedStyle(from, '::before');
1546
+ const a = from.getBoundingClientRect();
1547
+ edges = [x(a.left + parseFloat(fill.left)), x(a.right - parseFloat(fill.right))];
1548
+ }
1549
+ tabs.forEach((t) => {
1550
+ const on = t === tab;
1551
+ t.setAttribute('aria-selected', String(on));
1552
+ t.tabIndex = on ? 0 : -1;
1553
+ document.getElementById(t.getAttribute('aria-controls')).hidden = !on;
1554
+ });
1555
+ if (!edges) return;
1556
+ clearGlide();
1557
+ const b = tab.getBoundingClientRect();
1558
+ const [left, right] = edges;
1559
+ list.style.setProperty('--slide-left', `${left - x(b.left)}px`);
1560
+ list.style.setProperty('--slide-right', `${x(b.right) - right}px`);
1561
+ const direction = x(b.left) + x(b.right) > left + right ? 'right' : 'left';
1562
+ list.dataset.slide = direction;
1563
+ const id = ++glide;
1564
+ const end = () => { if (id === glide) clearGlide(); };
1565
+ requestAnimationFrame(() => {
1566
+ const trailing = list.getAnimations({ subtree: true }).find((a) => a.animationName === (direction === 'right' ? 'glide-left' : 'glide-right'));
1567
+ if (trailing) trailing.finished.then(end, end); else end();
1568
+ });
1569
+ };
1194
1570
  select(tabs[0]);
1195
1571
  tabs.forEach((t, i) => {
1196
1572
  t.addEventListener('click', () => select(t));
@@ -1272,12 +1648,235 @@
1272
1648
  menu.addEventListener('focusout', (e) => { if (!menu.contains(e.relatedTarget)) menu.open = false; });
1273
1649
  });
1274
1650
 
1275
- // Contents: mark the section the reader jumped to.
1276
- const toc = document.querySelector('.toc');
1277
- const mark = () => toc.querySelectorAll('a').forEach((a) => {
1278
- if (a.getAttribute('href') === location.hash) a.setAttribute('aria-current', 'location'); else a.removeAttribute('aria-current');
1651
+ // ---------- Catalogue shell: header strip, rail, Find, shortcuts, location, phone drawer ----------
1652
+ // Header strip: start scrolled to the current page, and fade only the edges that hide links.
1653
+ const strip = document.querySelector('.page-head .navlist.strip');
1654
+ const here = strip.querySelector('[aria-current="page"]');
1655
+ if (here && strip.scrollWidth > strip.clientWidth) strip.scrollLeft = here.offsetLeft - (strip.clientWidth - here.offsetWidth) / 2;
1656
+ trackClip(strip);
1657
+
1658
+ // Each skip link moves focus to its target (main, or the rail's list), which takes tabindex="-1" only then.
1659
+ const main = document.getElementById('main');
1660
+ document.querySelectorAll('body > a.skip').forEach((skip) => skip.addEventListener('click', () => {
1661
+ const target = document.getElementById(skip.hash.slice(1));
1662
+ target.tabIndex = -1;
1663
+ target.focus({ preventScroll: true });
1664
+ }));
1665
+
1666
+ const rail = document.getElementById('rail');
1667
+ const railHome = rail.parentElement;
1668
+ const list = rail.querySelector('.rail-list');
1669
+ const links = [...list.querySelectorAll('a[href^="#"]')];
1670
+ const railGroups = [...list.querySelectorAll('.navlist')];
1671
+ const find = document.getElementById('find');
1672
+ const findCount = document.getElementById('find-count');
1673
+ const empty = document.getElementById('find-empty');
1674
+ const bar = document.getElementById('section-bar');
1675
+ const drawer = document.getElementById('nav-drawer');
1676
+ const drawerBody = document.getElementById('nav-drawer-body');
1677
+ const tablet = matchMedia('(max-width: 800px)');
1678
+ // Find and the shortcut switch need the script, so they show only once it runs.
1679
+ rail.querySelector('.rail-find').hidden = false;
1680
+ rail.querySelector('.rail-foot').hidden = false;
1681
+
1682
+ // Scrolls a list so a row sits at its centre. It sets the list's own scrollTop, so the page never moves.
1683
+ const centre = (box, row) => {
1684
+ const a = box.getBoundingClientRect();
1685
+ const b = row.getBoundingClientRect();
1686
+ box.scrollTop += b.top - a.top - a.height / 2 + b.height / 2;
1687
+ };
1688
+
1689
+ // Find filters the rail only, never the page, so deep links and the page order stay stable. Every word
1690
+ // must appear in a row's terms. The count is announced after a pause.
1691
+ // A page that also filters its own content, such as a table of tokens, sets window.findScope before
1692
+ // the reader types: { filter(words) → { count, one, many }, keeps(link) → boolean }. Find then calls
1693
+ // filter on each change, keeps the rail links keeps() names, and announces the page's count and noun.
1694
+ let announce;
1695
+ const filter = () => {
1696
+ const query = find.value.trim().toLowerCase();
1697
+ const words = query.split(/\s+/).filter(Boolean);
1698
+ const scope = window.findScope;
1699
+ const result = scope?.filter(words);
1700
+ let shown = 0;
1701
+ links.forEach((a) => {
1702
+ const match = scope ? scope.keeps(a) : words.every((w) => a.dataset.terms.includes(w));
1703
+ a.hidden = !match;
1704
+ if (match) shown += 1;
1705
+ });
1706
+ railGroups.forEach((g) => { g.hidden = !g.querySelector('a:not([hidden])'); });
1707
+ empty.hidden = shown > 0;
1708
+ empty.querySelector('q').textContent = find.value.trim();
1709
+ const { count, one, many } = result ?? { count: shown, one: 'match', many: 'matches' };
1710
+ clearTimeout(announce);
1711
+ announce = setTimeout(() => {
1712
+ findCount.textContent = query ? (count ? `${count} ${count === 1 ? one : many}` : `No ${many}`) : '';
1713
+ }, 500);
1714
+ };
1715
+ // Goes to a row's destination and focuses it. In the drawer the click closes it, and the drawer moves focus.
1716
+ const go = (link) => {
1717
+ link.click();
1718
+ if (drawer.open) return;
1719
+ const target = document.getElementById(link.hash.slice(1));
1720
+ if (!target.hasAttribute('tabindex')) target.tabIndex = -1;
1721
+ target.focus({ preventScroll: true });
1722
+ };
1723
+ find.addEventListener('input', filter);
1724
+ find.addEventListener('keydown', (e) => {
1725
+ const first = links.find((a) => !a.hidden);
1726
+ if (e.key === 'Escape') {
1727
+ // The first Escape clears the query; the next one leaves the field, or closes the drawer.
1728
+ if (find.value) { e.preventDefault(); find.value = ''; filter(); } else if (!drawer.open) find.blur();
1729
+ } else if (e.key === 'Enter' && first) { e.preventDefault(); go(first); }
1730
+ else if (e.key === 'ArrowDown' && first) { e.preventDefault(); first.focus(); }
1731
+ });
1732
+ document.getElementById('find-clear').addEventListener('click', () => { find.value = ''; filter(); find.focus(); });
1733
+
1734
+ // Single-key shortcut: / focuses Find. WCAG 2.1.4 needs a way to turn it off, so a saved switch does.
1735
+ const shortcutSwitch = document.getElementById('shortcut-switch');
1736
+ const hint = rail.querySelector('.find > .key');
1737
+ let shortcuts = true;
1738
+ try { shortcuts = localStorage.getItem('dl-shortcuts') !== 'off'; } catch (e) { /* Storage is blocked: keep the default. */ }
1739
+ const applyShortcuts = () => {
1740
+ shortcutSwitch.setAttribute('aria-checked', String(shortcuts));
1741
+ hint.hidden = !shortcuts;
1742
+ if (shortcuts) find.setAttribute('aria-keyshortcuts', '/'); else find.removeAttribute('aria-keyshortcuts');
1743
+ };
1744
+ shortcutSwitch.addEventListener('click', () => {
1745
+ shortcuts = !shortcuts;
1746
+ try { localStorage.setItem('dl-shortcuts', shortcuts ? 'on' : 'off'); } catch (e) { /* Storage is blocked: the choice lasts for this page only. */ }
1747
+ applyShortcuts();
1748
+ });
1749
+ applyShortcuts();
1750
+ const editable = (el) => el instanceof Element && el.closest('input, textarea, select, [contenteditable]:not([contenteditable="false"])');
1751
+
1752
+ // A tap opens the drawer with focus on its body, so no ring shows and no keyboard opens. A keyboard
1753
+ // open moves focus to the current row, where the ring shows the reader's place. Find focuses the field.
1754
+ drawerBody.tabIndex = -1;
1755
+ const openDrawer = ({ toFind = false, byPointer = false } = {}) => {
1756
+ if (!drawer.open) drawer.showModal();
1757
+ const current = rail.querySelector('[aria-current="location"]:not([hidden])');
1758
+ if (current) centre(drawerBody, current);
1759
+ if (toFind || !current) find.focus({ preventScroll: true });
1760
+ else if (byPointer) drawerBody.focus({ preventScroll: true });
1761
+ else current.focus({ preventScroll: true });
1762
+ };
1763
+ document.addEventListener('keydown', (e) => {
1764
+ if (!shortcuts || e.key !== '/' || e.metaKey || e.ctrlKey || e.altKey || e.defaultPrevented || editable(e.target)) return;
1765
+ if (document.querySelector('dialog[open]:not(#nav-drawer)')) return;
1766
+ e.preventDefault();
1767
+ if (tablet.matches) openDrawer({ toFind: true }); else find.focus();
1768
+ find.select();
1769
+ });
1770
+
1771
+ // Location: the last tracked section, in page order, whose top has passed the scroll-padding inset; at
1772
+ // the bottom of the page, the last one. After a jump the target stays current until the reader scrolls
1773
+ // away from where it landed. A group heading counts as its group's first row.
1774
+ const tracked = links.map((a) => ({ el: document.getElementById(a.hash.slice(1)), a }))
1775
+ .concat([...main.querySelectorAll(':scope > .layer-head[id^="group-"]')].map((el) => ({ el, a: document.getElementById(`rail-${el.id.slice(6)}`)?.parentElement.querySelector('a') })))
1776
+ .filter((t) => t.el && t.a)
1777
+ .sort((x, y) => (x.el.compareDocumentPosition(y.el) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1));
1778
+ const insetOf = () => Number.parseFloat(getComputedStyle(root).scrollPaddingTop) || 0;
1779
+ let jump;
1780
+ let frame;
1781
+ // The rail scrolls its own list to keep the current row in view, and leaves it alone while the reader is in it.
1782
+ const keepInView = (a) => {
1783
+ if (!a || a.hidden || rail.parentElement !== railHome || rail.contains(document.activeElement) || rail.matches(':hover')) return;
1784
+ const box = list.getBoundingClientRect();
1785
+ const row = a.getBoundingClientRect();
1786
+ if (row.top < box.top || row.bottom > box.bottom) centre(list, a);
1787
+ };
1788
+ const mark = (current) => {
1789
+ links.forEach((a) => { if (a === current) a.setAttribute('aria-current', 'location'); else a.removeAttribute('aria-current'); });
1790
+ keepInView(current);
1791
+ };
1792
+ const update = () => {
1793
+ frame = undefined;
1794
+ if (jump) {
1795
+ const distance = Math.abs(scrollY - jump.landing);
1796
+ if (distance > jump.closest + 2) jump = undefined; else jump.closest = Math.min(jump.closest, distance);
1797
+ }
1798
+ const inset = insetOf();
1799
+ let current = tracked[0];
1800
+ for (const t of tracked) if (t.el.getBoundingClientRect().top <= inset + 1) current = t;
1801
+ if (scrollY > 0 && scrollY + innerHeight >= root.scrollHeight - 2) current = tracked.at(-1);
1802
+ mark((jump?.target ?? current)?.a);
1803
+ };
1804
+ const schedule = () => { frame ??= requestAnimationFrame(update); };
1805
+ // Where a jump to the target lands: its top at the inset, clamped to the page's scroll range.
1806
+ const landingOf = (target) => Math.min(Math.max(scrollY + target.el.getBoundingClientRect().top - insetOf(), 0), Math.max(0, root.scrollHeight - innerHeight));
1807
+ const jumpTo = (id) => {
1808
+ jump = undefined;
1809
+ const target = tracked.find((t) => t.el.id === id);
1810
+ if (target) {
1811
+ const landing = landingOf(target);
1812
+ jump = { target, landing, closest: Math.abs(scrollY - landing) };
1813
+ }
1814
+ schedule();
1815
+ };
1816
+ // A layout change can move the target. While the landing stays within 2px of the stored one, the jump holds
1817
+ // unchanged, so small changes cannot add up (the scroll may still be on its way). When the landing moved and the
1818
+ // page already sits at the new one, as when the page bottom clamps it, the jump measures again. Otherwise the
1819
+ // target moved away, and the jump ends so tracking follows the page.
1820
+ const rebase = () => {
1821
+ if (jump) {
1822
+ const landing = landingOf(jump.target);
1823
+ if (Math.abs(landing - jump.landing) <= 2) return schedule();
1824
+ if (Math.abs(scrollY - landing) <= 2) return jumpTo(jump.target.el.id);
1825
+ }
1826
+ jump = undefined;
1827
+ schedule();
1828
+ };
1829
+ addEventListener('scroll', schedule, { passive: true });
1830
+ addEventListener('resize', rebase);
1831
+ addEventListener('hashchange', () => jumpTo(location.hash.slice(1)));
1832
+ // A second click on the same link changes no hash, so clicks start the jump too.
1833
+ document.addEventListener('click', (e) => {
1834
+ if (e.defaultPrevented || e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey) return;
1835
+ const href = e.target instanceof Element ? e.target.closest('a[href^="#"]')?.getAttribute('href') : undefined;
1836
+ if (href && href.length > 1) jumpTo(href.slice(1));
1279
1837
  });
1280
- addEventListener('hashchange', mark);
1281
- mark();
1838
+
1839
+ // Tablet and phone: one sticky header row holds Find and Menu. The drawer holds Find, the pages, the
1840
+ // appearance control, and the rail's groups, in that order. Desktop puts each piece back.
1841
+ const pageHead = document.querySelector('.page-head');
1842
+ const appearanceRow = document.createElement('div');
1843
+ appearanceRow.className = 'drawer-appearance';
1844
+ appearanceRow.innerHTML = '<span class="group-label" aria-hidden="true">Appearance</span>';
1845
+ const barHome = [bar.parentElement, bar.nextSibling];
1846
+ const place = () => {
1847
+ if (tablet.matches) {
1848
+ pageHead.append(bar);
1849
+ appearanceRow.append(themeGroup);
1850
+ rail.insertBefore(strip, list);
1851
+ rail.insertBefore(appearanceRow, list);
1852
+ drawerBody.append(rail);
1853
+ bar.hidden = false;
1854
+ } else {
1855
+ if (drawer.open) drawer.close();
1856
+ pageHead.append(strip, themeGroup);
1857
+ appearanceRow.remove();
1858
+ barHome[0].insertBefore(bar, barHome[1]);
1859
+ railHome.prepend(rail);
1860
+ bar.hidden = true;
1861
+ }
1862
+ };
1863
+ tablet.addEventListener('change', () => { place(); rebase(); });
1864
+ place();
1865
+ // Moving the rail shifts the page under a deep link, so the target is scrolled back into place and its
1866
+ // landing measured after the move.
1867
+ if (location.hash) {
1868
+ document.getElementById(location.hash.slice(1))?.scrollIntoView();
1869
+ jumpTo(location.hash.slice(1));
1870
+ }
1871
+ update();
1872
+ // detail is 0 for a click made with Enter or Space, and 1 or more for a tap or a mouse click.
1873
+ document.getElementById('section-menu').addEventListener('click', (e) => openDrawer({ byPointer: e.detail > 0 }));
1874
+ document.getElementById('section-find').addEventListener('click', () => openDrawer({ toFind: true }));
1875
+
1876
+ // Copy link: writes the component's URL and announces the result.
1877
+ document.querySelectorAll('[data-copy-link]').forEach((button) => button.addEventListener('click', async () => {
1878
+ const url = new URL(`#${button.dataset.copyLink}`, location.href).href;
1879
+ try { await navigator.clipboard.writeText(url); status.textContent = 'Link copied.'; } catch (e) { status.textContent = 'Copy failed. Use the address bar instead.'; }
1880
+ }));
1282
1881
  })();
1283
1882
  </script>