@bloxwap/hig 0.2.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/README.md +1 -1
  2. package/chart/README.md +3 -3
  3. package/contracts/README.md +1 -1
  4. package/contracts/dist/messages.d.ts +138 -0
  5. package/contracts/dist/messages.js +48 -2
  6. package/css.d.ts +2 -0
  7. package/feedback/README.md +1 -1
  8. package/feedback/assets/error.wav +0 -0
  9. package/feedback/assets/manifest.json +29 -19
  10. package/feedback/assets/tick.wav +0 -0
  11. package/feedback/assets/toggle.wav +0 -0
  12. package/feedback/dist/contract.d.ts +1 -57
  13. package/feedback/dist/contract.js +2 -1
  14. package/feedback/dist/native.d.ts +2 -1
  15. package/feedback/dist/presets.d.ts +57 -0
  16. package/feedback/dist/presets.js +1 -0
  17. package/native/README.md +6 -1
  18. package/native/dist/animated-number.js +11 -7
  19. package/native/dist/brand.d.ts +1 -1
  20. package/native/dist/brand.js +4 -3
  21. package/native/dist/button.d.ts +3 -2
  22. package/native/dist/button.js +8 -6
  23. package/native/dist/data.d.ts +18 -1
  24. package/native/dist/data.js +22 -2
  25. package/native/dist/field.d.ts +1 -0
  26. package/native/dist/field.js +18 -5
  27. package/native/dist/gesture-sheet.js +5 -3
  28. package/native/dist/icons.d.ts +21 -0
  29. package/native/dist/icons.js +20 -0
  30. package/native/dist/navigation.d.ts +1 -0
  31. package/native/dist/navigation.js +49 -7
  32. package/native/dist/overlay.js +3 -3
  33. package/native/dist/pickers.d.ts +54 -0
  34. package/native/dist/pickers.js +60 -0
  35. package/native/dist/provider.d.ts +25 -6
  36. package/native/dist/provider.js +19 -4
  37. package/native/dist/radio-group.d.ts +17 -1
  38. package/native/dist/radio-group.js +45 -7
  39. package/native/dist/recipes.d.ts +3 -0
  40. package/native/dist/recipes.js +15 -2
  41. package/native/dist/selection.d.ts +1 -0
  42. package/native/dist/selection.js +1 -0
  43. package/native/dist/slider.js +3 -2
  44. package/native/dist/status.d.ts +16 -5
  45. package/native/dist/status.js +55 -15
  46. package/native/dist/surface.d.ts +2 -1
  47. package/native/dist/surface.js +4 -3
  48. package/native/dist/swap-panel.d.ts +125 -0
  49. package/native/dist/swap-panel.js +177 -0
  50. package/native/dist/swap-parts.d.ts +86 -0
  51. package/native/dist/swap-parts.js +66 -0
  52. package/native/dist/swap-shared.d.ts +65 -0
  53. package/native/dist/swap-shared.js +76 -0
  54. package/native/dist/swap-sheet.d.ts +14 -0
  55. package/native/dist/swap-sheet.js +26 -0
  56. package/native/dist/swap-views.d.ts +41 -0
  57. package/native/dist/swap-views.js +37 -0
  58. package/native/dist/switch.d.ts +1 -1
  59. package/native/dist/switch.js +20 -13
  60. package/native/dist/wallet-address.d.ts +37 -0
  61. package/native/dist/wallet-address.js +50 -0
  62. package/native-fonts/README.md +1 -1
  63. package/native-fonts/dist/index.d.ts +1 -1
  64. package/native-fonts/dist/index.js +1 -1
  65. package/native-fonts/fonts/manifest.json +1 -1
  66. package/og-fonts/README.md +2 -2
  67. package/og-fonts/dist/index.d.ts +1 -1
  68. package/og-fonts/dist/index.js +1 -1
  69. package/og-fonts/fonts/manifest.json +1 -1
  70. package/package.json +181 -63
  71. package/react/README.md +22 -1
  72. package/react/dist/animated-number.js +2 -1
  73. package/react/dist/brand.d.ts +1 -1
  74. package/react/dist/brand.js +3 -2
  75. package/react/dist/button.d.ts +2 -2
  76. package/react/dist/button.js +1 -1
  77. package/react/dist/data.d.ts +15 -0
  78. package/react/dist/data.js +13 -0
  79. package/react/dist/field.d.ts +1 -0
  80. package/react/dist/field.js +2 -1
  81. package/react/dist/navigation.js +1 -1
  82. package/react/dist/notify.d.ts +14 -0
  83. package/react/dist/notify.js +6 -0
  84. package/react/dist/recipes/install-command.d.ts +1 -0
  85. package/react/dist/recipes/install-command.js +8 -1
  86. package/react/dist/recipes/pickers.d.ts +57 -0
  87. package/react/dist/recipes/pickers.js +78 -0
  88. package/react/dist/recipes/swap/amount-card.d.ts +40 -0
  89. package/react/dist/recipes/swap/amount-card.js +7 -0
  90. package/react/dist/recipes/swap/picker.d.ts +26 -0
  91. package/react/dist/recipes/swap/picker.js +20 -0
  92. package/react/dist/recipes/swap/settings.d.ts +24 -0
  93. package/react/dist/recipes/swap/settings.js +25 -0
  94. package/react/dist/recipes/swap/shared.d.ts +98 -0
  95. package/react/dist/recipes/swap/shared.js +106 -0
  96. package/react/dist/recipes/swap-panel.d.ts +127 -0
  97. package/react/dist/recipes/swap-panel.js +170 -0
  98. package/react/dist/recipes/swap-sheet.d.ts +16 -0
  99. package/react/dist/recipes/swap-sheet.js +22 -0
  100. package/react/dist/recipes/trade-entry.js +1 -1
  101. package/react/dist/recipes.d.ts +3 -1
  102. package/react/dist/recipes.js +3 -1
  103. package/react/dist/select.js +2 -0
  104. package/react/dist/selection.d.ts +13 -0
  105. package/react/dist/selection.js +7 -0
  106. package/react/dist/status.d.ts +15 -5
  107. package/react/dist/status.js +8 -4
  108. package/react/dist/styles.css +406 -92
  109. package/react/dist/toast.d.ts +17 -0
  110. package/react/dist/toast.js +21 -0
  111. package/react/dist/wallet-address.d.ts +23 -0
  112. package/react/dist/wallet-address.js +24 -0
  113. package/tokens/README.md +9 -1
  114. package/tokens/dist/brand.d.ts +19 -0
  115. package/tokens/dist/brand.js +24 -0
  116. package/tokens/dist/index.d.ts +9 -1
  117. package/tokens/dist/index.js +8 -1
  118. package/tokens/dist/manifest.json +4 -1
  119. package/tokens/dist/tokens.css +1 -0
@@ -1,24 +1,47 @@
1
- :root { --hig-control: 48px; --hig-button: 44px; --hig-gap: 12px; }
1
+ :root { --hig-control: 48px; --hig-button: 44px; --hig-gap: 12px; --hig-action-gap:var(--hig-space-sm,8px); --hig-action-offset:calc(var(--hig-action-gap)*2); --hig-fill:var(--hig-surface); --hig-fill-raised:var(--hig-nested); }
2
+ /* Actions that sit side by side (buttons, tabs, capsules, filter options) are 8px apart at every density; --hig-gap spaces content.
3
+ The call-to-action buttons that close a form sit a double step, 16px, below the rest of it, and 8px from each other. */
4
+ .hig-form-action { margin-block-start:calc(var(--hig-action-offset) - var(--hig-gap)); }
5
+ .hig-form-action + .hig-form-action { margin-block-start:calc(var(--hig-action-gap) - var(--hig-gap)); }
6
+ /* Dialogs and default sheets space their content 12px apart; their closing buttons follow the same rule. */
7
+ :is(.hig-dialog,.hig-gesture-sheet,.hig-gesture-dynamic) > :not(.hig-button) + .hig-button { margin-block-start:calc(var(--hig-action-offset) - 12px); }
8
+ :is(.hig-dialog,.hig-gesture-sheet,.hig-gesture-dynamic) > .hig-button + .hig-button { margin-block-start:calc(var(--hig-action-gap) - 12px); }
9
+ /* HIG separates layers with fill and space, never a resting stroke. A control well (input, segmented track, badge) takes --hig-fill and
10
+ whatever sits on a well takes --hig-fill-raised; both step one shade lighter inside a surface or overlay so the well stays visible.
11
+ Borders stay in the box as transparent so sizes hold and forced-colors still draws an edge.
12
+ Thin tracks and rules (switch, slider, progress, spinner ring, separator) take --hig-fill-raised, so they sit one step above the
13
+ wells around them in every container and never jump to the lightest grey on the page. */
14
+ .hig-surface,.hig-dialog,.hig-gesture-sheet { --hig-fill:var(--hig-nested); --hig-fill-raised:var(--hig-border); }
15
+ .hig-popover { --hig-fill:var(--hig-surface); --hig-fill-raised:var(--hig-border); }
2
16
  [data-hig-density='compact'] { --hig-control: 36px; --hig-button: 36px; --hig-gap: 8px; }
17
+ /* A comfortable scope inside a compact one restores touch sizes, so a nested provider or a pinned control is not left compact. */
18
+ [data-hig-density='compact'] [data-hig-density='comfortable'] { --hig-control: 48px; --hig-button: 44px; --hig-gap: 12px; }
3
19
  /* Every rule is scoped to HIG classes so a host that loads this file on some routes only gets no side effects elsewhere (#95).
4
20
  Element defaults for the whole page (box-sizing, focus ring, table, range) are opt-in: @bloxwap/hig/react/css/base. */
5
- :where([class^='hig-'],[class*=' hig-'],.hig-choice input,.hig-segment :is(input,span),.hig-progress progress,.hig-table > * > tr > :is(th,td)) { box-sizing:border-box; }
6
- .hig-button { display:inline-flex;align-items:center;justify-content:center;gap:8px;vertical-align:middle;min-height:var(--hig-button);max-width:100%;padding:8px 20px;border:1px solid transparent;border-radius:9999px;font:600 1rem/1.5 var(--hig-font-sans,'Bloxwap Sans',system-ui,sans-serif);background:var(--hig-action);color:var(--hig-onAction);cursor:pointer;overflow-wrap:anywhere; }
21
+ :where([class^='hig-'],[class*=' hig-'],.hig-choice input,.hig-filter-chip :is(input,span,img),.hig-segment :is(input,span),.hig-progress progress,.hig-table > * > tr > :is(th,td)) { box-sizing:border-box; }
22
+ .hig-button { display:inline-flex;align-items:center;justify-content:center;gap:8px;vertical-align:middle;min-height:var(--hig-button);min-width:var(--hig-button);max-width:100%;padding:8px 20px;border:1px solid transparent;border-radius:9999px;font:600 1rem/1.5 var(--hig-font-sans,'Bloxwap Sans',system-ui,sans-serif);background:var(--hig-action);color:var(--hig-onAction);cursor:pointer;overflow-wrap:anywhere; }
7
23
  .hig-button[data-density='compact'] { padding-block:4px; }
8
24
  .hig-button[data-intent='secondary'] { background:var(--hig-nested);color:var(--hig-text); }
9
25
  .hig-button[data-intent='ghost'] { background:transparent;color:var(--hig-muted); }
10
- .hig-button[data-intent='ghost']:hover:not(:disabled) { background:var(--hig-nested);color:var(--hig-text);filter:none; }
11
26
  .hig-button > svg,.hig-icon-button > span { display:inline-flex;align-items:center;justify-content:center;flex:none; }
12
27
  .hig-icon-button { min-width:var(--hig-button);padding-inline:8px; }
13
28
  .hig-button[data-intent='destructive'] { background:var(--hig-negative);color:var(--hig-background); }
14
29
  .hig-button[data-full] { width:100%; }
15
- .hig-button:disabled { opacity:.5;cursor:default; }
16
- .hig-button:hover:not(:disabled) { filter:brightness(.9); }
30
+ .hig-button-spinner { flex:none;width:1em;height:1em;border:2px solid color-mix(in srgb,currentColor 30%,transparent);border-top-color:currentColor;border-radius:50%;animation:hig-spin .8s linear infinite; }
31
+ .hig-icon-button[aria-busy='true'] > .hig-button-spinner ~ span[aria-hidden='true'] { display:none; }
32
+ .hig-button:disabled { cursor:default; }
33
+ /* Unavailable is neutral: a disabled button drops its intent colour for a well fill and muted text, so a dimmed accent never reads
34
+ as a second call to action. Busy keeps the intent colour under its spinner. */
35
+ .hig-button:disabled:not([aria-busy='true']) { background:var(--hig-fill);color:var(--hig-muted); }
36
+ .hig-button[data-intent='ghost']:disabled:not([aria-busy='true']) { background:transparent;color:var(--hig-faint); }
37
+ .hig-button[aria-busy='true'] { opacity:.7; }
17
38
  .hig-button:active:not(:disabled) { transform:scale(.98); }
39
+ .hig-button { transition:transform var(--hig-motion-duration-fast) var(--hig-motion-easing-standard,cubic-bezier(.22,1,.36,1)),filter var(--hig-motion-duration-fast) ease; }
18
40
  :where([class^='hig-'],[class*=' hig-'],.hig-choice input,.hig-segment input):focus-visible { outline:2px solid var(--hig-focus);outline-offset:3px; }
19
- .hig-stack,.hig-field { display:flex;flex-direction:column;gap:var(--hig-gap);min-width:0; }
41
+ .hig-stack,.hig-field,.hig-toast { display:flex;flex-direction:column;gap:var(--hig-gap);min-width:0; }
20
42
  .hig-inline { display:flex;flex-wrap:wrap;align-items:center;gap:var(--hig-gap); }
21
- .hig-surface { padding:var(--hig-space-xl,20px);border:1px solid var(--hig-border);border-radius:var(--hig-radius-xl,14px);background:var(--hig-surface);color:var(--hig-text);min-width:0;overflow-wrap:anywhere; }
43
+ .hig-surface,.hig-dialog,.hig-select-list {border:1px solid transparent;border-radius:var(--hig-radius-xl,14px);background:var(--hig-surface);color:var(--hig-text); }
44
+ .hig-surface { padding:var(--hig-space-xl,20px);min-width:0;overflow-wrap:anywhere; }
22
45
  .hig-surface > :first-child { margin-block-start:0; }
23
46
  .hig-surface > :last-child { margin-block-end:0; }
24
47
  .hig-balance-card { display:flex;flex-direction:column;gap:var(--hig-space-sm,8px); }
@@ -26,45 +49,58 @@
26
49
  .hig-balance-card > .hig-number { font-size:1.5rem;line-height:1.25;font-weight:600; }
27
50
  .hig-text { font-size:1rem;line-height:1.5; }
28
51
  .hig-heading { line-height:1.25; }
29
- .hig-input { width:100%;min-width:0;min-height:var(--hig-control);border-radius:9999px;border:1px solid var(--hig-border);padding: max(4px,calc((var(--hig-control) - 1.5em - 2px)/2)) 20px;background:var(--hig-surface);color:var(--hig-text);font:inherit;line-height:1.5; }
52
+ .hig-input { width:100%;min-width:0;min-height:var(--hig-button);border-radius:9999px;border:1px solid transparent;padding: max(4px,calc((var(--hig-button) - 1.5em - 2px)/2)) 20px;background:var(--hig-fill);color:var(--hig-text);font:inherit;line-height:1.5; }
30
53
  .hig-input::placeholder { color:var(--hig-muted);opacity:1; }
31
54
  .hig-input:focus-visible { outline:0;border-color:var(--hig-faint);box-shadow:0 0 0 1px var(--hig-faint); }
32
55
  .hig-input[aria-invalid='true'] { border-color:var(--hig-negative); }
33
56
  .hig-input[aria-invalid='true']:focus-visible { box-shadow:0 0 0 1px var(--hig-negative); }
34
57
  textarea.hig-input { border-radius:var(--hig-radius-xl,14px);resize:vertical; }
35
- .hig-field label,.hig-group legend { font-weight:600; }
58
+ /* Text fields are as tall as a button (44 touch, 36 compact). */
59
+ .hig-search-input { position:relative;display:block;width:100%;min-width:0; }
60
+ .hig-search-icon { position:absolute;inset-inline-start:16px;inset-block-start:50%;translate:0 -50%;width:20px;height:20px;color:var(--hig-muted);pointer-events:none;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round; }
61
+ .hig-search-input > .hig-input { padding-inline-start:42px; }
62
+ .hig-field label,.hig-group legend,.hig-select-option[aria-selected='true'] { font-weight:600; }
36
63
  .hig-field p { margin:0;color:var(--hig-muted); }
37
- .hig-field [role='alert'] { color:var(--hig-negative); }
38
- .hig-choice { display:inline-flex;align-items:center;min-height:var(--hig-control);max-width:100%;min-width:0;gap:8px;padding:4px 8px; }
39
- .hig-choice > span { min-width:0;overflow-wrap:anywhere; }
64
+ .hig-field [role='alert'],.hig-list-error > .hig-list-message { color:var(--hig-negative); }
65
+ /* No leading inset: the control starts on the same edge as the labels and fields around it. */
66
+ .hig-choice { display:inline-flex;align-items:center;min-height:var(--hig-control);max-width:100%;min-width:0;gap:8px;padding-block:4px;padding-inline:0 16px; }
67
+ .hig-choice > span,.hig-market-row[data-mode='presentation'] .hig-market-name { min-width:0;overflow-wrap:anywhere; }
40
68
  .hig-choice input { accent-color:var(--hig-action);width:20px;height:20px; }
41
69
  .hig-group { border:0;padding:0;margin:0;min-width:0; }
42
- .hig-link { color:var(--hig-action);text-decoration:underline;text-underline-offset:4px;overflow-wrap:anywhere; }
43
- .hig-separator { border:0;border-top:1px solid var(--hig-border);width:100%; }
70
+ .hig-link { display:inline-flex;align-items:center;min-height:var(--hig-button);min-width:var(--hig-button);color:var(--hig-action);text-decoration:underline;text-underline-offset:4px;overflow-wrap:anywhere; }
71
+ .hig-separator { border:0;height:2px;border-radius:9999px;background:var(--hig-fill-raised);width:100%; }
44
72
  .hig-backdrop { position:fixed;inset:0;background:#000b;z-index:40; }
45
73
  /* Centred with physical left: the content carries the provider dir, and inset-inline-start would flip to right:50% in RTL while the translate stays negative. */
46
- .hig-dialog { position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);max-width:min(560px,calc(100vw - 32px));width:100%;max-height:calc(100dvh - 32px);overflow:auto;padding:24px;border:1px solid var(--hig-border);border-radius:var(--hig-radius-xl,14px);background:var(--hig-surface);color:var(--hig-text);box-shadow:0 16px 48px #0003;z-index:41;display:flex;flex-direction:column;gap:12px;overflow-wrap:anywhere; }
74
+ .hig-dialog { position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);max-width:min(560px,calc(100vw - 32px));width:100%;max-height:calc(100dvh - 32px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));overflow:auto;overscroll-behavior:contain;padding:24px;background:var(--hig-overlay,#111);box-shadow:0 24px 64px #000a;z-index:41;display:flex;flex-direction:column;gap:12px;overflow-wrap:anywhere; }
47
75
  .hig-dialog-title { margin:0;font-size:1.25rem;font-weight:600;line-height:1.3; }
48
76
  .hig-dialog-description { margin:0;color:var(--hig-muted);font-size:.875rem;line-height:1.5; }
49
- .hig-gesture-sheet { position:fixed;z-index:41;display:flex;flex-direction:column;max-height:95dvh;background:var(--hig-surface);color:var(--hig-text);outline:none; }
77
+ .hig-gesture-sheet { position:fixed;z-index:41;display:flex;flex-direction:column;max-height:95dvh;background:var(--hig-overlay,#111);color:var(--hig-text);box-shadow:0 0 64px #000a;outline:none; }
50
78
  .hig-gesture-sheet[data-vaul-drawer-direction='bottom'] { inset:auto 0 0;border-radius:14px 14px 0 0; }
51
79
  .hig-gesture-sheet[data-vaul-drawer-direction='top'] { inset:0 0 auto;border-radius:0 0 14px 14px; }
52
80
  .hig-gesture-sheet[data-vaul-drawer-direction='left'] { inset:0 auto 0 0;width:min(420px,95vw);max-height:none;border-radius:0 14px 14px 0; }
53
81
  .hig-gesture-sheet[data-vaul-drawer-direction='right'] { inset:0 0 0 auto;width:min(420px,95vw);max-height:none;border-radius:14px 0 0 14px; }
54
- .hig-gesture-sheet[data-hig-content-mode='default'] { overflow:auto;gap:12px;padding:24px; }
82
+ .hig-gesture-sheet[data-hig-content-mode='default'] { overflow:auto;overscroll-behavior:contain;gap:12px;padding:24px; }
55
83
  .hig-gesture-sheet[data-hig-content-mode='custom'] { padding:0; }
56
84
  .hig-gesture-sheet[data-hig-dynamic='true'] { overflow:hidden;gap:0;padding:0; }
57
85
  .hig-gesture-dynamic { display:flex;flex-direction:column;flex:none;min-height:0;max-height:inherit; }
58
- .hig-gesture-dynamic[data-hig-content-mode='default'] { overflow:auto;gap:12px;padding:24px; }
86
+ .hig-gesture-dynamic[data-hig-content-mode='default'] { overflow:auto;overscroll-behavior:contain;gap:12px;padding:24px; }
59
87
  .hig-gesture-dynamic[data-hig-content-mode='custom'] { padding:0; }
60
- .hig-gesture-handle[data-vaul-handle] { flex:none;align-self:center;background:var(--hig-muted);margin-block:4px 12px; }
88
+ /* Edge sheets pad default content past the notch and home indicator; dynamic sheets pad the inner wrapper instead.
89
+ Vaul directions are physical, so side insets are too. env() is 0px unless the host sets viewport-fit=cover. */
90
+ .hig-gesture-sheet[data-vaul-drawer-direction='bottom'][data-hig-content-mode='default']:not([data-hig-dynamic]),.hig-gesture-sheet[data-vaul-drawer-direction='bottom'] > .hig-gesture-dynamic[data-hig-content-mode='default'] { padding-bottom:calc(24px + env(safe-area-inset-bottom,0px)); }
91
+ .hig-gesture-sheet[data-vaul-drawer-direction='top'][data-hig-content-mode='default']:not([data-hig-dynamic]),.hig-gesture-sheet[data-vaul-drawer-direction='top'] > .hig-gesture-dynamic[data-hig-content-mode='default'] { padding-top:calc(24px + env(safe-area-inset-top,0px)); }
92
+ .hig-gesture-sheet:is([data-vaul-drawer-direction='left'],[data-vaul-drawer-direction='right'])[data-hig-content-mode='default']:not([data-hig-dynamic]) { padding-top:calc(24px + env(safe-area-inset-top,0px));padding-bottom:calc(24px + env(safe-area-inset-bottom,0px)); }
93
+ .hig-gesture-sheet[data-vaul-drawer-direction='left'][data-hig-content-mode='default']:not([data-hig-dynamic]) { padding-left:calc(24px + env(safe-area-inset-left,0px)); }
94
+ .hig-gesture-sheet[data-vaul-drawer-direction='right'][data-hig-content-mode='default']:not([data-hig-dynamic]) { padding-right:calc(24px + env(safe-area-inset-right,0px)); }
95
+ .hig-gesture-handle[data-vaul-handle] { flex:none;align-self:center;width:100px;height:6px;border-radius:9999px;opacity:1;background:var(--hig-action);box-shadow:0 0 12px color-mix(in srgb,var(--hig-action) 60%,transparent);margin-block:4px 12px; }
61
96
  .hig-gesture-sheet[data-hig-motion='reduced'],.hig-gesture-backdrop[data-hig-motion='reduced'] { animation:none!important;transition:none!important; }
62
- .hig-popover { max-width:min(360px,calc(100vw - 32px));max-height:var(--radix-popover-content-available-height,calc(100dvh - 32px));overflow-y:auto;overscroll-behavior:contain;background:var(--hig-nested);color:var(--hig-text);padding:12px;border:1px solid var(--hig-border);border-radius:var(--hig-radius-xl,14px);box-shadow:0 8px 24px #0003;line-height:1.5;overflow-wrap:anywhere;z-index:50; }
97
+ .hig-popover { max-width:min(360px,calc(100vw - 32px));max-height:var(--radix-popover-content-available-height,calc(100dvh - 32px));overflow-y:auto;overscroll-behavior:contain;background:var(--hig-nested);color:var(--hig-text);padding:12px;border:1px solid transparent;border-radius:var(--hig-radius-xl,14px);box-shadow:0 8px 24px #0006;line-height:1.5;overflow-wrap:anywhere;z-index:50; }
63
98
  .hig-menu { min-width:min(12rem,calc(100vw - 32px));max-height:var(--radix-dropdown-menu-content-available-height,calc(100dvh - 32px));padding:4px; }
64
99
  .hig-menu-item { display:flex;align-items:center;min-height:var(--hig-control);padding:8px 12px;border-radius:var(--hig-radius-md,8px);cursor:pointer;outline:none; }
65
- .hig-menu-item[data-highlighted] { background:var(--hig-surface); }
66
- .hig-menu-item:focus-visible { outline:2px solid var(--hig-focus);outline-offset:-2px; }
67
- .hig-menu-item[data-disabled] { opacity:.5;cursor:not-allowed; }
100
+ /* Highlight and press step lighter than the list, as Select options do. */
101
+ .hig-menu-item[data-highlighted] { background:var(--hig-border); }
102
+ .hig-menu-item:focus-visible,.hig-segment input:focus-visible + span { outline:2px solid var(--hig-focus);outline-offset:-2px; }
103
+ .hig-menu-item[data-disabled],.hig-select-option[aria-disabled='true'],.hig-input:disabled,.hig-choice:has(input:disabled),.hig-segment:has(input:disabled),.hig-range:disabled { opacity:.5;cursor:not-allowed; }
68
104
  .hig-tooltip { max-height:var(--radix-tooltip-content-available-height,calc(100dvh - 32px));padding:8px 12px;border-radius:var(--hig-radius-lg,10px);font-size:.875rem; }
69
105
  .hig-number { font-family:var(--hig-font-mono,'Bloxwap Mono',monospace);font-variant-numeric:tabular-nums; }
70
106
  .hig-animated-number-place { position:relative;display:inline-block; }
@@ -74,64 +110,103 @@ textarea.hig-input { border-radius:var(--hig-radius-xl,14px);resize:vertical; }
74
110
  .hig-data-list,.hig-list-error { display:flex;flex-direction:column;align-items:stretch;gap:var(--hig-gap);min-width:0; }
75
111
  .hig-data-list > .hig-button,.hig-list-error > .hig-button { align-self:flex-start; }
76
112
  .hig-list-message { margin:0;color:var(--hig-muted);line-height:1.5; }
77
- .hig-list-error > .hig-list-message { color:var(--hig-negative); }
78
113
  .hig-list { list-style:none;padding:0;margin:0; }
79
- .hig-list > li + li { border-block-start:1px solid var(--hig-border); }
80
- .hig-table-scroll { min-width:0;max-width:100%;overflow:auto;border:1px solid var(--hig-border);border-radius:var(--hig-radius-xl,14px);background:var(--hig-surface); }
81
- :where(.hig-table) { border-collapse:separate;border-spacing:0;width:100%;color:var(--hig-text);line-height:1.5; }
82
- .hig-table > caption:not(.hig-sr-only) { padding:12px;text-align:start;font-weight:600;border-bottom:1px solid var(--hig-border); }
83
- :where(.hig-table > * > tr) > :is(th,td) { padding:12px;text-align:start;vertical-align:middle;border-bottom:1px solid var(--hig-border); }
114
+ .hig-list > li + li { border-block-start:1px solid var(--hig-fill-raised); }
115
+ .hig-table-scroll { min-width:0;max-width:100%;overflow:auto;overscroll-behavior-x:contain;border:1px solid transparent;border-radius:var(--hig-radius-xl,14px);background:var(--hig-surface); }
116
+ /* Class specificity so the opt-in base `table` rule cannot collapse HIG tables. */
117
+ .hig-table { border-collapse:separate;border-spacing:0; }
118
+ :where(.hig-table) { width:100%;color:var(--hig-text);line-height:1.5; }
119
+ /* Sections are separated by space and type weight, not rules. */
120
+ .hig-table > caption:not(.hig-sr-only) { padding:20px 20px 8px;text-align:start;font-weight:600; }
121
+ :where(.hig-table > * > tr) > :is(th,td) { padding:14px 20px;text-align:start;vertical-align:middle;border:0; }
84
122
  .hig-table > thead > tr > th { color:var(--hig-muted);font-size:.875rem;font-weight:600;background:var(--hig-surface); }
85
- .hig-table > tbody > tr:last-child > td { border-bottom:0; }
123
+ .hig-table > thead > tr > th { padding-block:16px 6px; }
86
124
  .hig-table > tbody > tr:focus-within > td { background:var(--hig-nested); }
125
+ .hig-select-option[data-active='true'] { background:var(--hig-border); }
87
126
  .hig-table-sort { appearance:none;display:inline-flex;align-items:center;justify-content:inherit;gap:6px;max-width:100%;min-height:var(--hig-button);margin:-6px;padding:6px;border:0;border-radius:var(--hig-radius-md,6px);background:transparent;color:inherit;font:inherit;text-align:inherit;cursor:pointer; }
88
- .hig-table-sort:hover { color:var(--hig-text);background:var(--hig-nested); }
89
127
  .hig-table-sort-icon { flex:none; }
90
- .hig-table [aria-sort='ascending'] .hig-table-sort-up,.hig-table [aria-sort='descending'] .hig-table-sort-down { color:var(--hig-text); }
128
+ .hig-table [aria-sort='ascending'] .hig-table-sort-up,.hig-table [aria-sort='descending'] .hig-table-sort-down,.hig-segment input:checked + span { color:var(--hig-text); }
91
129
  .hig-table [aria-sort='ascending'] .hig-table-sort-down,.hig-table [aria-sort='descending'] .hig-table-sort-up { opacity:.3; }
92
130
  .hig-table[data-sticky-header='true'] > thead > tr > th { position:sticky;inset-block-start:0;z-index:1;background:var(--hig-surface); }
93
131
  .hig-table-state > td { padding-block:24px;color:var(--hig-muted);text-align:center; }
94
132
  /* A host-owned command option supplies its own target, keyboard model and compact row height. */
133
+ /* The name button is the row's identity, so it takes the text colour; the trailing edge is inset as far as the button's own padding
134
+ insets the name, which lines the row up with the content of the cards around it. */
135
+ .hig-market-row[data-mode='action'] { padding-inline-end:20px; }
136
+ .hig-market-row[data-mode='action'] .hig-button[data-intent='ghost'] { color:var(--hig-text); }
95
137
  .hig-market-row[data-mode='presentation'] { display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:var(--hig-gap);padding-block:0; }
96
138
  .hig-market-row[data-mode='presentation'][data-has-volume] { grid-template-columns:minmax(0,1fr) auto auto auto; }
97
139
  .hig-market-row[data-mode='presentation'] .hig-market-identity { display:flex;align-items:center;gap:8px;min-width:0; }
98
- .hig-market-row[data-mode='presentation'] .hig-market-name { min-width:0;overflow-wrap:anywhere; }
99
140
  .hig-market-row[data-mode='presentation'] :is(.hig-market-price,.hig-market-change,.hig-market-volume) { text-align:end; }
100
141
  .hig-market-row[data-mode='presentation'] .hig-number { font-family:inherit; }
101
- .hig-badge { display:inline-flex;align-items:center;gap:4px;width:fit-content;max-width:100%;min-width:0;padding:4px 10px;border-radius:9999px;background:var(--hig-nested);color:var(--hig-text);line-height:1.5;vertical-align:middle;overflow-wrap:anywhere; }
142
+ .hig-badge { display:inline-flex;align-items:center;gap:4px;width:fit-content;max-width:100%;min-width:0;padding:4px 10px;border-radius:9999px;background:var(--hig-fill);color:var(--hig-text);line-height:1.5;vertical-align:middle;overflow-wrap:anywhere; }
102
143
  .hig-badge[data-tone='positive'] { color:var(--hig-positive);background:color-mix(in srgb,var(--hig-positive) 15%,transparent); }
103
144
  .hig-badge[data-tone='negative'] { color:var(--hig-negative);background:color-mix(in srgb,var(--hig-negative) 15%,transparent); }
104
145
  .hig-badge[data-tone='warning'] { color:var(--hig-warning);background:color-mix(in srgb,var(--hig-warning) 15%,transparent); }
105
146
  .hig-badge[data-tone='info'] { color:var(--hig-info);background:color-mix(in srgb,var(--hig-info) 15%,transparent); }
106
- .hig-avatar { display:inline-grid;place-items:center;width:40px;height:40px;border-radius:9999px;background:var(--hig-nested); }
107
- .hig-skeleton { min-height:48px;background:var(--hig-nested);border-radius:10px; }
147
+ .hig-avatar { display:inline-grid;place-items:center;width:40px;height:40px;border-radius:9999px;background:var(--hig-fill); }
148
+ .hig-skeleton { width:100%;min-height:48px;background:var(--hig-fill-raised);border-radius:10px;animation:hig-pulse 1.5s ease-in-out infinite; }
108
149
  .hig-alert,.hig-empty-state { display:flex;flex-direction:column;align-items:flex-start;gap:var(--hig-gap);overflow-wrap:anywhere;line-height:1.5; }
109
150
  .hig-alert > :is(strong,p),.hig-empty-state > :is(h3,p) { margin:0;max-width:100%; }
110
- .hig-empty-state > p { color:var(--hig-muted); }
111
- .hig-alert-actions { display:flex;flex-wrap:wrap;align-items:center;gap:8px;max-width:100%; }
112
- .hig-toast { display:flex;flex-direction:column;gap:var(--hig-gap);min-width:0; }
113
- :where(.hig-surface)[data-severity] { border-radius:16px;background:color-mix(in srgb,var(--hig-surface) 95%,transparent); }
114
- :where(.hig-surface)[data-severity='error'] { border:2px solid var(--hig-negative);box-shadow:0 0 24px color-mix(in srgb,var(--hig-negative) 55%,transparent); }
115
- :where(.hig-surface)[data-severity='warning'] { border:2px solid var(--hig-warning);box-shadow:0 0 24px color-mix(in srgb,var(--hig-warning) 55%,transparent); }
116
- :where(.hig-surface)[data-severity='info'],:where(.hig-surface)[data-severity='note'] { border:2px solid var(--hig-info);box-shadow:0 0 24px color-mix(in srgb,var(--hig-info) 55%,transparent); }
117
- :where(.hig-surface)[data-severity='success'],:where(.hig-surface)[data-severity='tip'] { border:2px solid var(--hig-positive);box-shadow:0 0 24px color-mix(in srgb,var(--hig-positive) 55%,transparent); }
118
- :where(.hig-surface)[data-severity='default'] { border:2px solid var(--hig-border);box-shadow:0 0 20px rgba(255,255,255,0.12); }
119
- :where(.hig-toast) :where(.hig-surface)[data-severity] { border-radius:999px; }
151
+ .hig-empty-state > p,.hig-select-chevron,.hig-empty-state-icon { color:var(--hig-muted); }
152
+ .hig-empty-state { align-items:center;text-align:center;padding-block:var(--hig-space-xxxl,32px); }
153
+ .hig-empty-state-icon { display:inline-flex; }
154
+ .hig-empty-state-icon > svg { width:32px;height:32px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round; }
155
+ .hig-alert-actions { display:flex;flex-wrap:wrap;align-items:center;gap:var(--hig-action-gap);max-width:100%; }
156
+ /* Severity tints the fill and colours the title from a token role: no stroke and no glow, like every other layer. The tint is
157
+ 10% so the negative title keeps 4.5:1 on it (12% measured 4.47). The neutral
158
+ default lifts the surface a touch with the text colour so it still reads inside a card. */
159
+ :where(.hig-surface)[data-severity] { --hig-alert-tone:var(--hig-info);background:color-mix(in srgb,var(--hig-alert-tone) 10%,var(--hig-surface)); }
160
+ :where(.hig-surface)[data-severity] > strong { color:var(--hig-alert-tone); }
161
+ :where(.hig-surface)[data-severity='error'] { --hig-alert-tone:var(--hig-negative); }
162
+ :where(.hig-surface)[data-severity='warning'] { --hig-alert-tone:var(--hig-warning); }
163
+ :where(.hig-surface)[data-severity='success'],:where(.hig-surface)[data-severity='tip'] { --hig-alert-tone:var(--hig-positive); }
164
+ :where(.hig-surface)[data-severity='default'] { --hig-alert-tone:var(--hig-text);background:color-mix(in srgb,var(--hig-text) 6%,var(--hig-surface)); }
165
+ /* A notice is one capsule row: severity symbol, message, optional action, close. */
166
+ .hig-toast-item { display:flex;align-items:center;gap:10px;width:fit-content;max-width:100%;min-height:var(--hig-button,44px);padding-block:5px;padding-inline:16px 5px;border:1px solid transparent;border-radius:9999px;background:var(--hig-nested);color:var(--hig-text);box-shadow:0 8px 24px #0006;font:500 1rem/1.5 var(--hig-font-sans,'Bloxwap Sans',system-ui,sans-serif);overflow-wrap:anywhere; }
167
+ .hig-toast-icon,.hig-toast-close > svg { flex:none;width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round; }
168
+ .hig-toast-icon { color:var(--hig-info); }
169
+ .hig-toast-item[data-severity='success'] .hig-toast-icon { color:var(--hig-positive); }
170
+ .hig-toast-item[data-severity='warning'] .hig-toast-icon { color:var(--hig-warning); }
171
+ .hig-toast-item[data-severity='error'] .hig-toast-icon { color:var(--hig-negative); }
172
+ .hig-toast-message { flex:1;min-width:0; }
173
+ /* Inside Sonner's fixed-width slot the capsule hugs its content and centres. */
174
+ [data-sonner-toast] .hig-toast-item { margin-inline:auto; }
175
+ .hig-toast-item .hig-button { min-height:32px;padding-block:2px; }
176
+ /* 32px disc with a 44px hit area. */
177
+ /* The target is the full button height (44 touch, 36 compact); the 32px disc is drawn inside it and negative margins keep the capsule's size. */
178
+ .hig-toast-close { appearance:none;position:relative;isolation:isolate;flex:none;display:inline-grid;place-items:center;width:var(--hig-button,44px);height:var(--hig-button,44px);margin:calc((32px - var(--hig-button,44px))/2);padding:0;border:0;border-radius:50%;background:transparent;color:var(--hig-muted);cursor:pointer; }
179
+ .hig-toast-close::before { content:'';position:absolute;z-index:-1;inset:calc((var(--hig-button,44px) - 32px)/2);border-radius:50%; }
180
+ .hig-toast-close:active { color:var(--hig-text); }
181
+ .hig-toast-close:active::before { background:var(--hig-border); }
120
182
  @media(prefers-reduced-motion:reduce) { .hig-button:active:not(:disabled) {transform:none;} }
121
183
  [data-hig-motion='reduced'] .hig-button:active:not(:disabled) {transform:none;}
122
- .hig-button[role='tab'][aria-selected='false'] { background:var(--hig-nested); color:var(--hig-text); }
123
184
  .hig-tabs { display:grid;gap:var(--hig-gap);min-width:0; }
124
- .hig-tab-list { flex-wrap:nowrap;overflow-x:auto;padding:4px;margin:-4px; }
125
- .hig-tab { flex:none;white-space:nowrap; }
185
+ .hig-tab-list,.hig-pagination { gap:var(--hig-action-gap); }
186
+ .hig-tab-list { flex-wrap:nowrap;overflow-x:auto;overscroll-behavior-x:contain;padding:4px;margin:-4px; }
187
+ /* The selected tab is a raised neutral capsule and the rest are bare muted labels, as in Navigation and the segmented control.
188
+ The action colour stays reserved for the one primary action on a screen. */
189
+ .hig-tab { flex:none;white-space:nowrap;background:transparent;color:var(--hig-muted); }
190
+ .hig-tab[aria-selected='true'] { background:var(--hig-fill-raised);color:var(--hig-text); }
191
+ .hig-button.hig-tab:disabled:not([aria-busy='true']) { background:transparent;color:var(--hig-faint); }
192
+ /* Disclosure: outline chevron on the trailing edge; the chevron turns and the panel height eases where the browser can interpolate to auto. */
193
+ .hig-accordion { interpolate-size:allow-keywords; }
194
+ /* The summary bleeds to the surface edge so the whole header row is the target. */
195
+ .hig-accordion > .hig-accordion-summary { display:flex;align-items:center;justify-content:space-between;gap:12px;margin:calc(var(--hig-space-xl,20px) * -1);padding:var(--hig-space-xl,20px);list-style:none;font-weight:600;line-height:1.5;cursor:pointer;border-radius:inherit;transition:margin-block-end var(--hig-motion-duration-base,260ms) var(--hig-motion-easing-standard,cubic-bezier(.22,1,.36,1)); }
196
+ .hig-accordion-summary::-webkit-details-marker { display:none; }
197
+ .hig-accordion-chevron { color:var(--hig-muted);transition:transform var(--hig-motion-duration-base,260ms) var(--hig-motion-easing-standard,cubic-bezier(.22,1,.36,1)); }
198
+ .hig-accordion[open] > .hig-accordion-summary .hig-accordion-chevron { transform:rotate(180deg); }
199
+ .hig-accordion[open] > .hig-accordion-summary { margin-block-end:-8px; }
200
+ .hig-accordion > .hig-accordion-summary + * { margin-block-start:0; }
201
+ .hig-accordion::details-content { block-size:0;overflow:clip;opacity:0;transition:block-size var(--hig-motion-duration-base,260ms) var(--hig-motion-easing-standard,cubic-bezier(.22,1,.36,1)),opacity var(--hig-motion-duration-base,260ms) ease,content-visibility var(--hig-motion-duration-base,260ms) allow-discrete; }
202
+ .hig-accordion[open]::details-content { block-size:auto;opacity:1; }
126
203
  .hig-breadcrumb { list-style:none;padding:0;margin:0;gap:8px;color:var(--hig-muted); }
127
204
  .hig-breadcrumb > li { display:inline-flex;align-items:center;gap:8px;min-width:0; }
128
205
  .hig-breadcrumb .hig-link { color:var(--hig-muted);text-decoration:none; }
129
- .hig-breadcrumb .hig-link:hover { color:var(--hig-text);text-decoration:underline; }
130
206
  .hig-breadcrumb [aria-current='page'] { color:var(--hig-text); }
131
207
  .hig-breadcrumb-separator { color:var(--hig-faint);user-select:none; }
132
208
  .hig-navigation { gap:4px; }
133
209
  .hig-navigation > .hig-link { display:flex;align-items:center;min-height:var(--hig-control);padding:8px 16px;border-radius:9999px;color:var(--hig-muted);text-decoration:none;font-weight:500; }
134
- .hig-navigation > .hig-link:hover { background:var(--hig-nested);color:var(--hig-text); }
135
210
  .hig-navigation > .hig-link[aria-current='page'] { background:var(--hig-nested);color:var(--hig-text);font-weight:600; }
136
211
  .hig-pagination > span { color:var(--hig-muted);font-variant-numeric:tabular-nums; }
137
212
 
@@ -139,90 +214,329 @@ textarea.hig-input { border-radius:var(--hig-radius-xl,14px);resize:vertical; }
139
214
 
140
215
  /* Keep native input semantics while giving controls a consistent appearance. */
141
216
  .hig-select { position:relative; min-width:0; }
142
- .hig-select-trigger { display:flex;align-items:center;justify-content:space-between;gap:12px;text-align:start;line-height:1.5;cursor:pointer; }
217
+ .hig-select-trigger,.hig-select-option { display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer; }
218
+ .hig-select-trigger {text-align:start;line-height:1.5; }
143
219
  .hig-select-trigger[aria-expanded='true'] { border-color:var(--hig-faint); }
144
220
  .hig-select-value { min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
145
- .hig-select-chevron,.hig-select-check { flex:none;width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round; }
146
- .hig-select-chevron { color:var(--hig-muted); }
221
+ .hig-select-chevron,.hig-select-check,.hig-accordion-chevron { flex:none;width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round; }
147
222
  .hig-select-trigger[aria-expanded='true'] .hig-select-chevron { transform:rotate(180deg); }
148
- .hig-select-list { position:fixed;inset:auto;margin:0;padding:6px;border:1px solid var(--hig-border);border-radius:var(--hig-radius-xl,14px);background:var(--hig-surface);color:var(--hig-text);font:inherit;line-height:1.5;box-shadow:0 12px 32px #0004;overflow:auto;overscroll-behavior:contain;z-index:50; }
149
- .hig-select-option { display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:var(--hig-control);padding:8px 12px;border-radius:var(--hig-radius-lg,10px);cursor:pointer;overflow-wrap:anywhere; }
223
+ .hig-select-list { position:fixed;inset:auto;margin:0;padding:6px;font:inherit;line-height:1.5;background:var(--hig-nested);box-shadow:0 12px 32px #0006;overflow:auto;overscroll-behavior:contain;z-index:50; }
224
+ /* Floating lists present with a short fade and settle from their anchor edge. */
225
+ .hig-select-list,.hig-popover { animation:hig-present var(--hig-motion-duration-fast,180ms) var(--hig-motion-easing-standard,cubic-bezier(.22,1,.36,1)); }
226
+ .hig-select-list { transform-origin:top center; }
227
+ .hig-select-list[data-placement='top'] { transform-origin:bottom center;--hig-present-from:4px; }
228
+ .hig-popover { transform-origin:var(--radix-dropdown-menu-content-transform-origin,var(--radix-popover-content-transform-origin,var(--radix-tooltip-content-transform-origin,center))); }
229
+ @keyframes hig-present { from { opacity:0;transform:translateY(var(--hig-present-from,-4px)) scale(.97); } }
230
+ .hig-select-option {min-height:var(--hig-control);padding:8px 12px;border-radius:var(--hig-radius-lg,10px);overflow-wrap:anywhere; }
150
231
  .hig-select-option > span { min-width:0; }
151
- .hig-select-option[data-active='true'] { background:var(--hig-nested); }
152
- .hig-select-option[aria-selected='true'] { font-weight:600; }
153
232
  .hig-select-check { visibility:hidden;color:var(--hig-action); }
154
- .hig-select-option[aria-selected='true'] .hig-select-check { visibility:visible; }
155
- .hig-select-option[aria-disabled='true'] { opacity:.5;cursor:not-allowed; }
233
+ .hig-select-option[aria-selected='true'] .hig-select-check,.hig-choice input:checked::before { visibility:visible; }
156
234
  @media(forced-colors:active) {
157
235
  .hig-select-list { border-color:ButtonText; }
158
236
  .hig-select-option[data-active='true'] { outline:1px solid Highlight;outline-offset:-1px; }
159
237
  .hig-select-option[aria-disabled='true'] { color:GrayText;opacity:1; }
160
238
  .hig-select-check { color:Highlight; }
161
239
  }
162
- .hig-input:disabled { opacity:.5; cursor:not-allowed; }
163
240
  .hig-choice { cursor:pointer; line-height:1.5; }
164
- .hig-choice:has(input:disabled) { opacity:.5; cursor:not-allowed; }
165
241
  .hig-choice input { appearance:none; -webkit-appearance:none; display:inline-grid; place-content:center; flex:none; margin:0; border:1.5px solid var(--hig-muted); border-radius:.3rem; background:var(--hig-surface); cursor:inherit; }
166
242
  .hig-choice input::before { content:''; display:block; width:10px; height:6px; border-left:2px solid var(--hig-onAction); border-bottom:2px solid var(--hig-onAction); transform:translateY(-1px) rotate(-45deg); visibility:hidden; }
167
243
  .hig-choice input:checked { border-color:var(--hig-action); background:var(--hig-action); }
168
- .hig-choice input:checked::before { visibility:visible; }
169
244
  .hig-choice input[type='radio'] { border-radius:50%; }
170
245
  .hig-choice input[type='radio']::before { width:8px; height:8px; border:0; border-radius:50%; background:var(--hig-onAction); transform:none; }
171
- .hig-switch input { position:relative; width:40px; height:24px; padding:3px; border:0; border-radius:9999px; background:var(--hig-muted); display:block; }
172
- .hig-switch input::before { position:absolute; inset-block-start:3px; inset-inline-start:3px; visibility:visible; width:18px; height:18px; border:0; border-radius:50%; background:var(--hig-text); transform:none; transition:inset-inline-start .15s ease, background .15s ease; }
246
+ .hig-switch input { position:relative; width:40px; height:24px; padding:3px; border:0; border-radius:9999px; background:var(--hig-fill-raised); display:block; transition:background-color var(--hig-motion-duration-fast) ease; }
247
+ .hig-switch input::before { position:absolute; inset-block-start:3px; inset-inline-start:3px; visibility:visible; width:18px; height:18px; border:0; border-radius:50%; background:var(--hig-text); transform:none; transition:inset-inline-start var(--hig-motion-duration-fast) ease, background var(--hig-motion-duration-fast) ease; }
173
248
  .hig-switch input:checked::before { inset-inline-start:19px; background:var(--hig-onAction); }
174
249
 
175
- .hig-group legend { margin-bottom:.5rem; }
250
+ .hig-group legend { margin-bottom:.5rem; padding:0; }
176
251
  .hig-segmented-control { min-width:0; width:100%; }
177
- .hig-segments { position:relative; isolation:isolate; display:grid; grid-auto-flow:column; grid-auto-columns:minmax(0,1fr); gap:4px; padding:4px; border-radius:9999px; background:var(--hig-nested); }
252
+ .hig-segments { position:relative; isolation:isolate; display:grid; grid-auto-flow:column; grid-auto-columns:minmax(0,1fr); gap:4px; padding:0 4px; border-radius:9999px; background:var(--hig-fill); }
178
253
  /* Logical positioning follows RTL and avoids WebKit rounding percentage transforms at fractional segment widths. */
179
- .hig-segment-indicator { position:absolute; z-index:-1; pointer-events:none; inset-block:4px; inset-inline-start:calc(4px + var(--hig-segment-index) * (100% - 4px) / var(--hig-segment-count)); width:calc((100% - (var(--hig-segment-count) + 1) * 4px) / var(--hig-segment-count)); border-radius:9999px; background:var(--hig-surface); box-shadow:0 1px 3px #0003; transition:inset-inline-start var(--hig-motion-duration-base,260ms) var(--hig-motion-easing-standard,cubic-bezier(.22,1,.36,1)); }
254
+ .hig-segment-indicator { position:absolute; z-index:-1; pointer-events:none; inset-block:4px; inset-inline-start:calc(4px + var(--hig-segment-index) * (100% - 4px) / var(--hig-segment-count)); width:calc((100% - (var(--hig-segment-count) + 1) * 4px) / var(--hig-segment-count)); border-radius:9999px; background:var(--hig-fill-raised); box-shadow:0 1px 3px #0003; transition:inset-inline-start var(--hig-motion-duration-base,260ms) var(--hig-motion-easing-standard,cubic-bezier(.22,1,.36,1)); }
180
255
  .hig-segment-indicator[data-disabled] { opacity:.5; }
181
- .hig-segment { position:relative; min-width:0; cursor:pointer; }
182
- .hig-segment input { position:absolute; inset:0; width:100%; height:100%; margin:0; opacity:0; cursor:inherit; }
183
- .hig-segment span { display:flex; justify-content:center; align-items:center; min-height:var(--hig-control); padding:.5rem .75rem; border-radius:9999px; color:var(--hig-muted); font-weight:500; line-height:1.5; text-align:center; overflow-wrap:anywhere; }
184
- .hig-segment input:checked + span { color:var(--hig-text); }
256
+ /* The label, not the pill inside it, is the target: it spans the full control height (44 touch, 36 compact). */
257
+ .hig-segment { position:relative; min-width:0; padding-block:4px; cursor:pointer; }
258
+ /* The radio covers the pill area only, so it lines up with the indicator; the label around it is the full-height target. */
259
+ .hig-segment input { position:absolute; inset:4px 0; width:100%; height:calc(100% - 8px); margin:0; opacity:0; cursor:inherit; }
260
+ .hig-segment span { display:flex; justify-content:center; align-items:center; min-height:calc(var(--hig-button) - 8px); padding:2px .75rem; border-radius:9999px; color:var(--hig-muted); font-weight:500; line-height:1.5; text-align:center; overflow-wrap:anywhere; }
185
261
  .hig-segment input:focus-visible { outline:0; }
186
- .hig-segment input:focus-visible + span { outline:2px solid var(--hig-focus); outline-offset:-2px; }
187
- .hig-segment:has(input:disabled) { opacity:.5; cursor:not-allowed; }
188
262
 
263
+ /* Filter: capsules in one row that scrolls sideways. The radio covers its capsule; the circle holds the option's image or an
264
+ empty ring, and fills while a check draws in when chosen. */
265
+ .hig-filter { display:flex;gap:var(--hig-action-gap);min-width:0;margin:-4px;padding:4px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none; }
266
+ .hig-filter::-webkit-scrollbar { display:none; }
267
+ .hig-filter-chip { position:relative;flex:none;display:inline-flex;align-items:center;gap:8px;min-height:40px;padding-block:6px;padding-inline:8px 16px;border-radius:9999px;background:var(--hig-fill);color:var(--hig-text);font-size:.875rem;font-weight:600;line-height:1.5;white-space:nowrap;cursor:pointer;transition:var(--hig-motion-duration-fast,180ms) ease;transition-property:background-color,color; }
268
+ /* 40px capsule with a 44px hit area. */
269
+ .hig-filter-chip input { appearance:none;-webkit-appearance:none;position:absolute;inset:-2px 0;width:100%;height:calc(100% + 4px);margin:0;border-radius:9999px;opacity:0;cursor:inherit; }
270
+ .hig-filter-chip:has(input:checked) { background:var(--hig-text);color:var(--hig-background); }
271
+ .hig-filter-chip:has(input:disabled) { opacity:.5;cursor:not-allowed; }
272
+ .hig-filter-chip:has(input:focus-visible) { outline:2px solid var(--hig-focus);outline-offset:2px; }
273
+ .hig-filter-mark { position:relative;flex:none;display:grid;place-items:center;width:24px;height:24px;border-radius:50%;box-shadow:inset 0 0 0 2px currentColor;overflow:hidden;transition:background-color var(--hig-motion-duration-fast,180ms) ease; }
274
+ .hig-filter-mark:has(img) { box-shadow:none; }
275
+ .hig-filter-mark > img { grid-area:1/1;width:100%;height:100%;object-fit:cover;transition:var(--hig-motion-duration-fast,180ms) ease;transition-property:opacity,transform; }
276
+ .hig-filter-mark > svg { grid-area:1/1;width:16px;height:16px;fill:none;stroke:var(--hig-text);stroke-width:2;stroke-linecap:round;stroke-linejoin:round; }
277
+ /* pathLength=1 on the path, so the dash offset is the undrawn fraction. A fully undrawn round-capped stroke still paints its cap as a dot, so the check is also hidden until chosen. */
278
+ .hig-filter-mark path { stroke-dasharray:1;stroke-dashoffset:1;opacity:0;transition:stroke-dashoffset var(--hig-motion-duration-base,260ms) var(--hig-motion-easing-standard,cubic-bezier(.22,1,.36,1)),opacity var(--hig-motion-duration-fast,180ms); }
279
+ .hig-filter-chip:has(input:checked) .hig-filter-mark { background:currentColor; }
280
+ .hig-filter-chip:has(input:checked) .hig-filter-mark > img { opacity:0;transform:scale(.6); }
281
+ .hig-filter-chip:has(input:checked) .hig-filter-mark path { stroke-dashoffset:0;opacity:1; }
282
+ .hig-filter-chip:active:not(:has(input:checked,input:disabled)) { background:var(--hig-fill-raised); }
189
283
  .hig-range { accent-color:var(--hig-action); min-height:48px; width:100%; appearance:none; -webkit-appearance:none; display:block; margin:0; padding:0; border:0; background:transparent; cursor:pointer; }
190
- .hig-range:disabled { opacity:.5; cursor:not-allowed; }
191
- .hig-range::-webkit-slider-runnable-track { height:6px; border-radius:9999px; background:linear-gradient(to right,var(--hig-action) var(--hig-range-fill),var(--hig-border) var(--hig-range-fill)); }
284
+ .hig-range::-webkit-slider-runnable-track { height:6px; border-radius:9999px; background:linear-gradient(to right,var(--hig-action) var(--hig-range-fill),var(--hig-fill-raised) var(--hig-range-fill)); }
192
285
  /* Match the product slider's white 20 × 14 pill while retaining the native range interaction. */
193
286
  .hig-range::-webkit-slider-thumb { appearance:none; -webkit-appearance:none; width:20px; height:14px; margin-top:-4px; border:0; border-radius:9999px; background:var(--hig-text); }
194
- .hig-range::-moz-range-track { height:6px; border-radius:9999px; background:var(--hig-border); }
287
+ .hig-range::-moz-range-track { height:6px; border-radius:9999px; background:var(--hig-fill-raised); }
195
288
  .hig-range::-moz-range-progress { height:6px; border-radius:9999px; background:var(--hig-action); }
196
289
  .hig-range::-moz-range-thumb { width:20px; height:14px; border:0; border-radius:9999px; background:var(--hig-text); }
197
290
  /* Leave 1px inside the 48px range box beyond the 2px outline: WebKit rounds fractional shared edges into the neighbouring control. */
198
291
  .hig-range:focus-visible { outline-offset:-3px; border-radius:var(--hig-radius-lg,10px); }
199
- [dir='rtl'] .hig-range::-webkit-slider-runnable-track { background:linear-gradient(to left,var(--hig-action) var(--hig-range-fill),var(--hig-border) var(--hig-range-fill)); }
292
+ [dir='rtl'] .hig-range::-webkit-slider-runnable-track { background:linear-gradient(to left,var(--hig-action) var(--hig-range-fill),var(--hig-fill-raised) var(--hig-range-fill)); }
200
293
 
201
294
  .hig-progress { display:flex; flex-direction:column; gap:.75rem; width:100%; line-height:1.5; }
202
- .hig-progress progress { appearance:none; -webkit-appearance:none; width:100%; height:6px; border:0; border-radius:9999px; overflow:hidden; background:var(--hig-nested); accent-color:var(--hig-action); }
203
- .hig-progress progress::-webkit-progress-bar { background:var(--hig-nested); border-radius:9999px; }
295
+ .hig-progress progress { appearance:none; -webkit-appearance:none; width:100%; height:6px; border:0; border-radius:9999px; overflow:hidden; background:var(--hig-fill-raised); accent-color:var(--hig-action); }
296
+ .hig-progress progress::-webkit-progress-bar { background:var(--hig-fill-raised); border-radius:9999px; }
204
297
  .hig-progress progress::-webkit-progress-value { background:var(--hig-action); border-radius:9999px; }
205
298
  .hig-progress progress::-moz-progress-bar { background:var(--hig-action); border-radius:9999px; }
206
- .hig-progress progress:not([value]) { background:linear-gradient(90deg,var(--hig-nested) 20%,var(--hig-action) 50%,var(--hig-nested) 80%); background-size:200% 100%; animation:hig-progress 1.5s linear infinite; }
299
+ .hig-progress progress:not([value]) { background:linear-gradient(90deg,var(--hig-fill-raised) 20%,var(--hig-action) 50%,var(--hig-fill-raised) 80%); background-size:200% 100%; animation:hig-progress 1.5s linear infinite; }
207
300
  .hig-progress progress:not([value])::-webkit-progress-bar { background:inherit; background-size:inherit; animation:inherit; }
208
301
  .hig-spinner { display:inline-flex; align-items:center; gap:.625rem; line-height:1.5; color:var(--hig-muted); }
209
- .hig-spinner-indicator { flex:none; width:1rem; height:1rem; border:2px solid var(--hig-border); border-top-color:var(--hig-action); border-radius:50%; animation:hig-spin .8s linear infinite; }
302
+ .hig-spinner-indicator { flex:none; width:1rem; height:1rem; border:2px solid var(--hig-fill-raised); border-top-color:var(--hig-action); border-radius:50%; animation:hig-spin .8s linear infinite; }
210
303
  .hig-status-indicator { display:inline-flex; align-items:center; gap:.5rem; line-height:1.5; }
211
- .hig-status-indicator::before { content:''; flex:none; width:7px; height:7px; border-radius:50%; background:var(--hig-muted); }
212
- .hig-status-indicator[data-state='online']::before { background:var(--hig-positive); }
213
- .hig-status-indicator[data-state='stale']::before { background:var(--hig-warning); }
304
+ .hig-status-indicator { --hig-status:var(--hig-muted); }
305
+ .hig-status-indicator::before { content:''; flex:none; width:7px; height:7px; margin-inline:3px; border-radius:50%; background:var(--hig-status); }
306
+ .hig-status-indicator[data-state='online'] { --hig-status:var(--hig-positive); }
307
+ .hig-status-indicator[data-state='stale'] { --hig-status:var(--hig-warning); }
308
+ /* A live source emits a ring in its own status colour; offline stays still. */
309
+ .hig-status-indicator:is([data-state='online'],[data-state='stale'])::before { animation:hig-status-pulse 2s ease-out infinite; }
310
+ @keyframes hig-status-pulse { 0% { box-shadow:0 0 0 0 color-mix(in srgb,var(--hig-status) 70%,transparent); } 70%,100% { box-shadow:0 0 0 7px color-mix(in srgb,var(--hig-status) 0%,transparent); } }
311
+ @keyframes hig-pulse { 50% { opacity:.45; } }
214
312
  @keyframes hig-spin { to { transform:rotate(360deg); } }
215
313
  @keyframes hig-progress { to { background-position:-200% 0; } }
216
314
  @media(prefers-reduced-motion:reduce) {
217
- .hig-spinner-indicator,.hig-progress progress:not([value]) { animation:none; }
218
- .hig-progress progress::-webkit-progress-bar { animation:none; }
219
- .hig-switch input::before,.hig-segment-indicator { transition:none; }
315
+ .hig-spinner-indicator,.hig-progress progress:not([value]),.hig-skeleton,.hig-status-indicator::before { animation:none; }
316
+ .hig-button-spinner { animation:none; }
317
+ .hig-progress progress::-webkit-progress-bar,.hig-progress progress:not([value])::-webkit-progress-bar { animation:none; }
318
+ .hig-button,.hig-switch input,.hig-switch input::before { transition:none; }
319
+ .hig-filter-chip,.hig-filter-mark,.hig-filter-mark > img,.hig-filter-mark path { transition:none; }
320
+ .hig-segment-indicator,.hig-accordion-chevron,.hig-accordion-summary,.hig-accordion::details-content { transition:none; }
321
+ .hig-select-list,.hig-popover { animation:none; }
220
322
  }
221
- [data-hig-motion='reduced'] :is(.hig-spinner-indicator,.hig-progress progress) { animation:none; }
222
- [data-hig-motion='reduced'] .hig-progress progress::-webkit-progress-bar { animation:none; }
223
- [data-hig-motion='reduced'] .hig-switch input::before,[data-hig-motion='reduced'] .hig-segment-indicator { transition:none; }
323
+ [data-hig-motion='reduced'] :is(.hig-spinner-indicator,.hig-progress progress,.hig-skeleton) { animation:none; }
324
+ [data-hig-motion='reduced'] .hig-status-indicator::before { animation:none; }
325
+ [data-hig-motion='reduced'] .hig-button-spinner { animation:none; }
326
+ [data-hig-motion='reduced'] :is(.hig-accordion-chevron,.hig-accordion-summary) { transition:none; }
327
+ [data-hig-motion='reduced'] .hig-accordion::details-content { transition:none; }
328
+ [data-hig-motion='reduced'] .hig-progress progress::-webkit-progress-bar,[data-hig-motion='reduced'] .hig-progress progress:not([value])::-webkit-progress-bar { animation:none; }
329
+ [data-hig-motion='reduced'] .hig-button,[data-hig-motion='reduced'] .hig-switch input,[data-hig-motion='reduced'] .hig-switch input::before { transition:none; }
330
+ [data-hig-motion='reduced'] .hig-segment-indicator { transition:none; }
331
+ [data-hig-motion='reduced'] :is(.hig-filter-chip,.hig-filter-mark,.hig-filter-mark > img,.hig-filter-mark path) { transition:none; }
332
+ [data-hig-motion='reduced'] .hig-select-list,[data-hig-motion='reduced'].hig-popover { animation:none; }
224
333
  @media(forced-colors:active) {
225
334
  .hig-choice input,.hig-select select,.hig-range { appearance:auto; -webkit-appearance:auto; }
226
335
  .hig-choice input::before,.hig-select::after { display:none; }
227
336
  .hig-segment input:checked + span { outline:2px solid Highlight; outline-offset:-2px; }
228
337
  }
338
+
339
+ /* Touch: HIG controls fire click without the double-tap-zoom wait, draw their own press state instead of the
340
+ browser's tap flash, and a long press never selects a control label or opens the link callout. Content stays selectable. */
341
+ :where(.hig-button,.hig-choice,.hig-segment,.hig-filter-chip,.hig-switch,.hig-range,.hig-menu-item,.hig-select-trigger,.hig-select-option,.hig-table-sort,.hig-navigation > .hig-link,.hig-accordion-summary,.hig-toast-close) { -webkit-tap-highlight-color:transparent;touch-action:manipulation;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none; }
342
+ /* Press feedback on pointer-down for controls that had only hover or keyboard states. */
343
+ .hig-menu-item:active:not([data-disabled]) { background:var(--hig-border); }
344
+ .hig-select-option:active:not([aria-disabled='true']) { background:var(--hig-border); }
345
+ .hig-table-sort:active { background:var(--hig-nested); }
346
+ .hig-navigation > .hig-link:active { background:var(--hig-nested); }
347
+ .hig-segment:active:not(:has(input:disabled)) span { color:var(--hig-text); }
348
+ /* iOS zooms into any text field under 16px and never zooms back out. Inputs inherit the host size, so floor it on touch. */
349
+ @media (pointer:coarse) { :is(input,textarea,select).hig-input { font-size:max(16px,1em); } }
350
+ /* Touch has no hover: browsers latch :hover on the first tap. Hover styles apply only to a precise hovering pointer. */
351
+ @media (hover:hover) and (pointer:fine) {
352
+ .hig-button:hover:not(:disabled) { filter:brightness(.9); }
353
+ .hig-button[data-intent='ghost']:hover:not(:disabled) { background:var(--hig-nested);color:var(--hig-text);filter:none; }
354
+ .hig-tab[aria-selected='false']:hover:not(:disabled) { color:var(--hig-text);filter:none; }
355
+ .hig-navigation > .hig-link:hover { background:var(--hig-nested);color:var(--hig-text); }
356
+ .hig-table-sort:hover { color:var(--hig-text);background:var(--hig-nested); }
357
+ .hig-toast-close:hover { color:var(--hig-text); }
358
+ .hig-toast-close:hover::before { background:var(--hig-border); }
359
+ .hig-filter-chip:hover:not(:has(input:checked,input:disabled)) { background:var(--hig-fill-raised); }
360
+ .hig-accordion-summary:hover .hig-accordion-chevron { color:var(--hig-text); }
361
+ .hig-breadcrumb .hig-link:hover { color:var(--hig-text);text-decoration:underline; }
362
+ }
363
+
364
+ /* Vertical address: fixed-width rows whose height sets the type size, so a column of rows can match a QR code's edge. */
365
+ .hig-vertical-address { display:inline-flex;flex-direction:column;flex:none;font-family:var(--hig-font-mono,'Bloxwap Mono',ui-monospace,monospace);font-size:calc(var(--hig-address-row,1.5em)*.9);line-height:var(--hig-address-row,1.5em);font-weight:500;letter-spacing:.04em;font-variant-numeric:tabular-nums;color:var(--hig-muted);text-align:start;white-space:pre; }
366
+ .hig-vertical-address > [aria-hidden] { display:flex;flex-direction:column; }
367
+ .hig-vertical-address [data-anchor] { font-weight:700;color:var(--hig-text); }
368
+ /* WalletAddress: the QR code and the address column share one height; the hint sits under both. */
369
+ .hig-wallet-address { appearance:none;display:inline-flex;flex-direction:column;align-items:center;gap:12px;max-width:100%;margin:0;padding:12px;border:0;border-radius:var(--hig-radius-xl,14px);background:transparent;color:var(--hig-text);font:inherit;text-align:start; }
370
+ button.hig-wallet-address { cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation; }
371
+ button.hig-wallet-address:active { opacity:.8; }
372
+ .hig-wallet-address-body { display:flex;align-items:center;gap:16px;max-width:100%; }
373
+ .hig-wallet-address-qr { flex:none;display:block;width:var(--hig-qr);height:var(--hig-qr); }
374
+ .hig-wallet-address-qr > svg { display:block;width:100%;height:100%; }
375
+ .hig-wallet-address-hint { display:inline-flex;align-items:center;gap:8px;font-size:.875rem;line-height:1.5;color:var(--hig-muted); }
376
+ .hig-wallet-address-hint > svg { width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round; }
377
+ /* SwapPanel: two cards joined by a flip control. Each card is one target for its token picker; capsules and the
378
+ amount sit on a pass-through layer above that target and take their own presses. */
379
+ .hig-swap-panel { display:flex;flex-direction:column;width:100%;max-width:28rem;min-width:0;color:var(--hig-text);font-family:var(--hig-font-sans,'Bloxwap Sans',system-ui,sans-serif);line-height:1.5;outline:none; }
380
+ .hig-swap-card { --hig-fill:var(--hig-nested);--hig-fill-raised:var(--hig-border);position:relative;display:flex;flex-direction:column;border:1px solid transparent;border-radius:24px;background:var(--hig-surface);transition:background var(--hig-motion-duration-fast,180ms) ease; }
381
+ .hig-swap-slot,.hig-swap-amount-area { position:relative; }
382
+ .hig-swap-hit { appearance:none;position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;border:0;border-radius:inherit;background:transparent;cursor:pointer; }
383
+ .hig-swap-slot { border-radius:24px 24px 0 0; }
384
+ .hig-swap-slot-content { position:relative;display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:5.25rem;padding:16px;pointer-events:none; }
385
+ .hig-swap-placeholder { font-size:2.5rem;line-height:1.1;font-weight:500;letter-spacing:-.02em;color:var(--hig-faint); }
386
+ .hig-swap-kbd { flex:none;padding:2px 8px;border-radius:var(--hig-radius-sm,6px);background:var(--hig-fill);color:var(--hig-muted);font:inherit;font-size:.75rem;font-weight:500;letter-spacing:.04em; }
387
+ .hig-swap-selected { display:flex;align-items:flex-start;gap:12px;width:100%;min-width:0; }
388
+ .hig-swap-stack { position:relative;flex:none;display:flex;flex-direction:column;align-items:center; }
389
+ .hig-swap-stack > * { width:28px;height:28px;border-radius:50%;object-fit:cover;background:var(--hig-nested);box-shadow:0 0 0 2px var(--hig-surface); }
390
+ .hig-swap-stack > * + * { margin-block-start:-14px; }
391
+ .hig-swap-initials,.hig-swap-token-icon > span { display:grid;place-items:center;font-size:.625rem;font-weight:600;color:var(--hig-muted); }
392
+ .hig-swap-identity { display:flex;flex-direction:column;flex:1;min-width:0;font-size:.875rem;line-height:1.3;color:var(--hig-muted);overflow-wrap:anywhere; }
393
+ .hig-swap-identity > strong { font-size:1rem;font-weight:600;color:var(--hig-text); }
394
+ .hig-swap-meta { display:flex;flex-direction:column;align-items:flex-end;gap:8px;flex:none;max-width:60%;font-size:.875rem;color:var(--hig-muted);text-align:end; }
395
+ .hig-swap-pills { display:flex;flex-wrap:wrap;justify-content:flex-end;gap:var(--hig-action-gap); }
396
+ .hig-swap-pill { appearance:none;display:inline-flex;align-items:center;gap:6px;min-height:var(--hig-button,44px);margin-block:calc((32px - var(--hig-button,44px))/2);padding:4px 12px;border:0;border-radius:9999px;background:transparent;color:var(--hig-muted);font:inherit;font-size:.875rem;font-weight:500;cursor:pointer;pointer-events:auto;position:relative;isolation:isolate; }
397
+ /* A 32px capsule drawn inside a full-height target (44 touch, 36 compact); negative margins keep the row as tall as the capsule. */
398
+ .hig-swap-pill::before { content:'';position:absolute;z-index:-1;inset:calc((var(--hig-button,44px) - 32px)/2) 0;border-radius:9999px;background:var(--hig-fill); }
399
+ .hig-swap-equals { opacity:.5; }
400
+ .hig-swap-icon { flex:none; }
401
+ .hig-swap-amount-content { position:relative;display:flex;flex-direction:column;align-items:center;gap:8px;padding:4px 16px 20px;pointer-events:none; }
402
+ .hig-swap-amount { max-width:100%;border-radius:var(--hig-radius-lg,10px);font-size:clamp(2rem,10vw,3rem);line-height:1.15;font-weight:700;letter-spacing:-.02em;overflow:hidden;pointer-events:auto;cursor:text; }
403
+ .hig-swap-amount .hig-number,.hig-swap-pill .hig-number,.hig-swap-meta .hig-number,.hig-swap-row .hig-number,.hig-swap-fees .hig-number { font-family:inherit; }
404
+ .hig-swap-amount[data-muted] { color:var(--hig-muted);pointer-events:none; }
405
+ /* An account reads name over caption beside one 40px disc; a pending destination is a placeholder. */
406
+ .hig-swap-selected[data-account] { align-items:center; }
407
+ .hig-swap-selected[data-account] .hig-swap-stack > * { width:40px;height:40px; }
408
+ .hig-swap-identity > strong { display:inline-flex;align-items:center;gap:4px; }
409
+ .hig-swap-identity > strong > svg { color:var(--hig-muted); }
410
+ .hig-swap-meta[data-row] { flex-direction:row;align-items:center; }
411
+ .hig-swap-meta[data-row] > span { display:flex;flex-direction:column;align-items:flex-end;gap:8px; }
412
+ .hig-swap-card[data-pending] .hig-swap-identity > strong { font-weight:500; }
413
+ /* Label and value rows: the bottom card of a stake, or under a destination. */
414
+ .hig-swap-details { display:flex;flex-direction:column;gap:12px;margin:0;padding:16px; }
415
+ .hig-swap-slot + .hig-swap-details { padding-block-start:0; }
416
+ .hig-swap-details > div { display:flex;justify-content:space-between;gap:12px;color:var(--hig-muted); }
417
+ .hig-swap-details dd { margin:0;color:var(--hig-text);text-align:end;overflow-wrap:anywhere; }
418
+ /* A line under the cards. Muted is plain text; warning and negative are tinted capsules in the tone's colour. */
419
+ .hig-swap-note { margin:8px 0 0;padding:0 4px;font-size:.875rem;line-height:1.5;color:var(--hig-muted); }
420
+ .hig-swap-note:not([data-tone='muted']) { padding:12px 16px;border-radius:16px;color:var(--hig-swap-tone);background:color-mix(in srgb,var(--hig-swap-tone) 14%,transparent); }
421
+ .hig-swap-note[data-tone='warning'] { --hig-swap-tone:var(--hig-warning); }
422
+ .hig-swap-note[data-tone='negative'] { --hig-swap-tone:var(--hig-negative); }
423
+ .hig-swap-panel > .hig-swap-view > .hig-swap-view-header { margin-block-end:12px; }
424
+ .hig-swap-view-header[data-plain] { margin-inline-start:4px;min-height:44px; }
425
+ /* A compact card is the slot row alone: a fixed destination with no amount. */
426
+ .hig-swap-card[data-compact] > .hig-swap-slot { border-radius:24px; }
427
+ .hig-swap-card[data-compact] .hig-swap-selected { align-items:center; }
428
+ .hig-swap-card[data-compact] .hig-swap-stack > * { width:40px;height:40px; }
429
+ .hig-swap-flip { position:relative;z-index:1;display:flex;justify-content:center;height:8px; }
430
+ .hig-swap-flip > * { appearance:none;position:absolute;top:50%;translate:0 -50%;display:grid;place-items:center;width:var(--hig-button,44px);height:var(--hig-button,44px);isolation:isolate;padding:0;border:0;border-radius:50%;background:transparent;color:var(--hig-muted);cursor:pointer;transition:transform var(--hig-motion-duration-base,260ms) var(--hig-motion-easing-standard,cubic-bezier(.22,1,.36,1)); }
431
+ /* The 32px disc and its page-coloured ring are drawn inside the full-size target. */
432
+ .hig-swap-flip > *::before { content:'';position:absolute;z-index:-1;inset:calc((var(--hig-button,44px) - 32px)/2);border-radius:50%;background:var(--hig-nested);box-shadow:0 0 0 3px var(--hig-background); }
433
+ .hig-swap-flip > span { cursor:auto; }
434
+ .hig-swap-flip > :disabled { color:var(--hig-faint);cursor:not-allowed; }
435
+ .hig-swap-flip > :disabled::before { background:var(--hig-surface); }
436
+ .hig-swap-flip > :active:not(:disabled,span) { transform:rotate(180deg); }
437
+ .hig-swap-actions { display:flex;align-items:center;gap:var(--hig-action-gap);margin-block-start:var(--hig-action-offset); }
438
+ /* The row uses the standard button height (44 touch, 36 compact). */
439
+ .hig-swap-actions > .hig-icon-button { flex:none; }
440
+ .hig-swap-keypad { display:grid;grid-template-columns:repeat(3,1fr);padding-block-start:8px; }
441
+ .hig-swap-key { appearance:none;display:grid;place-items:center;height:56px;border:0;border-radius:16px;background:transparent;color:var(--hig-text);font:inherit;font-size:1.5rem;font-weight:600;line-height:1;cursor:pointer; }
442
+ .hig-swap-key:active { background:var(--hig-nested); }
443
+ .hig-swap-receive { appearance:none;position:relative;display:flex;align-items:center;justify-content:space-evenly;gap:12px;width:100%;margin:0;padding:8px 16px 20px;border:0;border-radius:0 0 24px 24px;background:transparent;color:inherit;font:inherit;text-align:start; }
444
+ button.hig-swap-receive { cursor:pointer; }
445
+ button.hig-swap-receive:active { opacity:.8; }
446
+ .hig-swap-qr { flex:none;display:grid;width:clamp(112px,38vw,196px);aspect-ratio:1;padding:8px;border-radius:16px;background:var(--hig-background);color:var(--hig-text); }
447
+ .hig-swap-qr > :is(svg,img,canvas) { display:block;width:100%;height:100%; }
448
+ .hig-swap-receive .hig-vertical-address { --hig-address-row:clamp(1rem,5.3vw,1.72rem); }
449
+ .hig-swap-receive .hig-vertical-address[data-kind='solana'] { --hig-address-row:clamp(.69rem,3.75vw,1.24rem); }
450
+ /* Pushed views: the token pickers and settings replace the cards inside the panel. A push arrives from the trailing
451
+ edge and a pop from the leading edge. */
452
+ .hig-swap-view { --hig-swap-from:24px;display:flex;flex-direction:column;min-width:0;animation:hig-swap-push var(--hig-motion-duration-base,260ms) var(--hig-motion-easing-standard,cubic-bezier(.22,1,.36,1)); }
453
+ .hig-swap-view[data-direction='pop'],[dir='rtl'] .hig-swap-view[data-direction='push'] { --hig-swap-from:-24px; }
454
+ @keyframes hig-swap-push { from { opacity:0;transform:translateX(var(--hig-swap-from)); } }
455
+ .hig-swap-picker,.hig-swap-settings-view { display:flex;flex-direction:column;gap:16px;min-width:0; }
456
+ .hig-swap-view-header { display:flex;align-items:center;gap:4px;min-width:0;margin-inline-start:-8px; }
457
+ .hig-swap-view-title { margin:0;min-width:0;font-size:1.5rem;line-height:1.25;font-weight:700;overflow-wrap:anywhere;outline:none; }
458
+ .hig-swap-back { appearance:none;flex:none;display:grid;place-items:center;width:44px;height:44px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--hig-muted);cursor:pointer; }
459
+ .hig-swap-back:active { background:var(--hig-surface);color:var(--hig-text); }
460
+ [dir='rtl'] .hig-swap-back > svg,[dir='rtl'] .hig-swap-setting-value > svg { transform:scaleX(-1); }
461
+ /* In a gesture sheet the panel fills the sheet width and the sheet follows the height of the view on show. */
462
+ .hig-gesture-sheet.hig-swap-sheet { max-width:30rem;margin-inline:auto;border-radius:24px 24px 0 0; }
463
+ .hig-swap-sheet .hig-swap-panel { max-width:none;padding:4px 12px calc(16px + env(safe-area-inset-bottom,0px)); }
464
+ /* From and To pickers: a wallet or address row, the search, the chain filter and the token list, 16 apart. */
465
+ .hig-picker { display:flex;flex-direction:column;gap:16px;width:100%;min-width:0;color:var(--hig-text);line-height:1.5; }
466
+ /* The Generate address switch is a capsule the height of the button beside it: label, then the switch. */
467
+ .hig-picker-toggle { flex:none;justify-content:space-between;gap:12px;min-height:var(--hig-button);padding:0 12px 0 16px;border-radius:9999px;background:var(--hig-fill);font-weight:500;white-space:nowrap; }
468
+ .hig-swap-wallet { display:flex;align-items:stretch;gap:var(--hig-action-gap); }
469
+ .hig-swap-wallet > .hig-button:not(.hig-icon-button) { flex:1; }
470
+ .hig-swap-wallet > .hig-button[aria-pressed='true'] { background:var(--hig-text);color:var(--hig-background); }
471
+ .hig-swap-wallet > .hig-icon-button { flex:none;min-width:var(--hig-control); }
472
+ .hig-swap-wallet-id { display:flex;align-items:center;gap:12px;flex:1;min-width:0;min-height:var(--hig-control);padding:8px 16px;border-radius:9999px;background:var(--hig-fill);font-weight:600;color:var(--hig-text); }
473
+ .hig-swap-wallet-id > span:nth-child(2) { flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis; }
474
+ .hig-swap-wallet-id > .hig-swap-icon { color:var(--hig-muted); }
475
+ .hig-swap-avatar { flex:none;width:28px;height:28px;border-radius:50%; }
476
+ .hig-swap-list { min-height:8rem;max-height:min(56dvh,30rem);margin-inline:-12px;padding:0 12px;overflow-y:auto;overscroll-behavior:contain; }
477
+ .hig-swap-section { display:flex;align-items:center;gap:6px;margin:0;padding:12px 8px 6px;font-size:.75rem;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--hig-muted); }
478
+ .hig-swap-section:first-child { padding-block-start:0; }
479
+ .hig-swap-empty { margin:0;padding:32px 0;text-align:center;font-size:.875rem;color:var(--hig-muted); }
480
+ .hig-swap-row { appearance:none;display:flex;align-items:center;gap:12px;width:100%;margin:0 0 4px;padding:8px 16px 8px 8px;border:0;border-radius:9999px;background:transparent;color:var(--hig-text);font:inherit;text-align:start;cursor:pointer; }
481
+ .hig-swap-row[data-active='true'] { background:var(--hig-fill); }
482
+ .hig-swap-row[data-selected] { opacity:.5; }
483
+ .hig-swap-row-text,.hig-swap-row-balance { display:flex;flex-direction:column;min-width:0;font-size:.875rem;color:var(--hig-muted); }
484
+ .hig-swap-row-text { flex:1;overflow-wrap:anywhere; }
485
+ .hig-swap-row-balance { flex:none;align-items:flex-end; }
486
+ .hig-swap-row :is(strong) { font-size:1rem;font-weight:600;color:var(--hig-text); }
487
+ .hig-swap-token-icon { position:relative;flex:none;display:grid;border-radius:50%;background:var(--hig-nested); }
488
+ .hig-swap-token-icon > img:first-child { width:100%;height:100%;border-radius:50%;object-fit:cover; }
489
+ .hig-swap-chain-badge { position:absolute;inset-block-end:0;inset-inline-end:0;width:16px;height:16px;border-radius:50%;object-fit:cover;background:var(--hig-surface);box-shadow:0 0 0 2px var(--hig-background); }
490
+ .hig-swap-sheet .hig-swap-chain-badge { box-shadow:0 0 0 2px var(--hig-overlay,#111); }
491
+ .hig-swap-settings { display:flex;flex-direction:column;gap:12px;min-width:0; }
492
+ /* The view title already names the presets; the group keeps its legend for assistive technology only. */
493
+ .hig-swap-presets .hig-segmented-control > legend { position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap; }
494
+ .hig-swap-setting { appearance:none;display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:var(--hig-control);padding:8px 16px;border:0;border-radius:9999px;background:var(--hig-fill);color:var(--hig-text);font:inherit;font-size:1rem;font-weight:600;text-align:start;cursor:pointer; }
495
+ .hig-swap-setting-value { display:inline-flex;align-items:center;gap:6px;font-weight:500;color:var(--hig-muted); }
496
+ .hig-swap-fees { display:flex;flex-direction:column;gap:12px;margin:0; }
497
+ .hig-swap-fees > div { display:flex;justify-content:space-between;gap:12px;color:var(--hig-muted); }
498
+ .hig-swap-fees dd { margin:0;color:var(--hig-text); }
499
+ .hig-swap-fees-total { padding-block-start:12px;font-weight:600; }
500
+ .hig-swap-fees-total > dt { color:var(--hig-text); }
501
+ :where(.hig-swap-hit,.hig-swap-pill,.hig-swap-flip > button,.hig-swap-key,.hig-swap-row,.hig-swap-setting,.hig-swap-back,button.hig-swap-receive) { -webkit-tap-highlight-color:transparent;touch-action:manipulation;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none; }
502
+ .hig-swap-hit:focus-visible { outline-offset:-2px; }
503
+ .hig-swap-pill:active { color:var(--hig-text); }
504
+ .hig-swap-pill:active::before,.hig-swap-setting:active { background:var(--hig-fill-raised); }
505
+ .hig-swap-setting:active { color:var(--hig-text); }
506
+ .hig-swap-row:active { background:var(--hig-fill); }
507
+ .hig-swap-card:has(.hig-swap-hit:active) { background:color-mix(in srgb,var(--hig-surface) 92%,var(--hig-text)); }
508
+ @media (hover:hover) and (pointer:fine) {
509
+ .hig-swap-card:has(.hig-swap-hit:hover) { background:color-mix(in srgb,var(--hig-surface) 97%,var(--hig-text)); }
510
+ .hig-swap-pill:hover,.hig-swap-setting:hover { color:var(--hig-text); }
511
+ .hig-swap-pill:hover::before,.hig-swap-setting:hover { background:var(--hig-fill-raised); }
512
+ .hig-swap-flip > button:hover:not(:disabled) { color:var(--hig-text); }
513
+ .hig-swap-key:hover,.hig-swap-back:hover { background:var(--hig-surface); }
514
+ .hig-swap-back:hover { color:var(--hig-text); }
515
+ }
516
+ @media(prefers-reduced-motion:reduce) { .hig-swap-view { animation:none; } .hig-swap-flip > *,.hig-swap-card { transition:none; } .hig-swap-flip > :active { transform:none; } }
517
+ [data-hig-motion='reduced'] .hig-swap-view { animation:none; }
518
+ [data-hig-motion='reduced'] :is(.hig-swap-flip > *,.hig-swap-card) { transition:none; }
519
+ [data-hig-motion='reduced'] .hig-swap-flip > :active { transform:none; }
520
+ /* Inline prose links retain line layout (WCAG inline-text exception). */
521
+ p .hig-link { display:inline;min-height:0;min-width:0; }
522
+ .hig-input,.hig-range,.hig-menu-item,.hig-select-option,.hig-table-sort,.hig-choice,.hig-segment { min-width:var(--hig-button); }
523
+
524
+ /* Reduced-motion stops for the selectors above, one per animated or transitioned selector in each preference path
525
+ (tests/motion-css.test.ts). Elements portalled out of the provider carry data-hig-motion themselves and are stopped where they are styled. */
526
+ @media(prefers-reduced-motion:reduce) {
527
+ .hig-accordion > .hig-accordion-summary { transition:none; }
528
+ .hig-status-indicator:is([data-state='online'],[data-state='stale'])::before { animation:none; }
529
+ }
530
+ [data-hig-motion='reduced'] .hig-accordion > .hig-accordion-summary { transition:none; }
531
+ [data-hig-motion='reduced'] .hig-accordion-chevron { transition:none; }
532
+ [data-hig-motion='reduced'] .hig-filter-chip { transition:none; }
533
+ [data-hig-motion='reduced'] .hig-filter-mark { transition:none; }
534
+ [data-hig-motion='reduced'] .hig-filter-mark > img { transition:none; }
535
+ [data-hig-motion='reduced'] .hig-filter-mark path { transition:none; }
536
+ [data-hig-motion='reduced'] .hig-swap-card { transition:none; }
537
+ [data-hig-motion='reduced'] .hig-swap-flip > * { transition:none; }
538
+ [data-hig-motion='reduced'] .hig-skeleton { animation:none; }
539
+ [data-hig-motion='reduced'] .hig-popover { animation:none; }
540
+ [data-hig-motion='reduced'] .hig-progress progress:not([value]) { animation:none; }
541
+ [data-hig-motion='reduced'] .hig-spinner-indicator { animation:none; }
542
+ [data-hig-motion='reduced'] .hig-status-indicator:is([data-state='online'],[data-state='stale'])::before { animation:none; }