|
4 | 4 |
|
5 | 5 | /* Accessibility improvements */ |
6 | 6 | @layer base { |
| 7 | + html { |
| 8 | + font-family: 'Inter Variable', 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; |
| 9 | + /* Inter's stylistic sets: cv11 = single-storey a, ss03 = better default cursive. Subtle polish. */ |
| 10 | + font-feature-settings: 'cv11', 'ss03'; |
| 11 | + -webkit-font-smoothing: antialiased; |
| 12 | + -moz-osx-font-smoothing: grayscale; |
| 13 | + } |
| 14 | + code, pre, kbd, samp { |
| 15 | + font-family: 'JetBrains Mono Variable', 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace; |
| 16 | + } |
7 | 17 | body { |
8 | 18 | @apply bg-gray-50 text-gray-900 dark:bg-gray-900 dark:text-gray-100; |
9 | 19 | } |
|
67 | 77 |
|
68 | 78 | @layer components { |
69 | 79 | .card { |
70 | | - @apply bg-white dark:bg-gray-800 rounded-lg shadow-md p-3; |
| 80 | + @apply bg-white dark:bg-gray-800 rounded-lg shadow-md p-3 transition-shadow duration-200 ease-out; |
| 81 | + } |
| 82 | + /* Subtle lift on hover — adds life without being distracting */ |
| 83 | + .card:hover { |
| 84 | + @apply shadow-lg; |
71 | 85 | } |
72 | 86 |
|
73 | 87 | .card-title { |
|
101 | 115 | .resizable-chart-container { |
102 | 116 | @apply relative min-h-[200px] max-h-[600px] resize-y overflow-hidden border border-gray-200 dark:border-gray-700 rounded-lg; |
103 | 117 | } |
| 118 | + |
| 119 | + /* Tabular figures — for number columns / stats so digits don't jitter */ |
| 120 | + .tabular { |
| 121 | + font-variant-numeric: tabular-nums; |
| 122 | + font-feature-settings: 'tnum'; |
| 123 | + } |
| 124 | + |
| 125 | + /* Subtle card hover affordance — gentle lift + shadow bump. Cheap visual feedback. */ |
| 126 | + .card-hover { |
| 127 | + @apply transition-[transform,box-shadow] duration-200 ease-out; |
| 128 | + } |
| 129 | + .card-hover:hover { |
| 130 | + @apply -translate-y-px shadow-lg; |
| 131 | + } |
104 | 132 | } |
105 | 133 |
|
106 | 134 | /* Custom styles */ |
@@ -242,8 +270,33 @@ input[type="checkbox"]:focus { |
242 | 270 | animation: pageFadeIn 0.5s ease-out; |
243 | 271 | } |
244 | 272 |
|
| 273 | +/* Sidebar cards stagger entrance — 40ms apart, small translateY for a "settling in" feel. |
| 274 | + `backwards` fill keeps each card invisible until its delay elapses. */ |
| 275 | +@keyframes cardSettleIn { |
| 276 | + from { |
| 277 | + opacity: 0; |
| 278 | + transform: translateY(6px); |
| 279 | + } |
| 280 | + to { |
| 281 | + opacity: 1; |
| 282 | + transform: translateY(0); |
| 283 | + } |
| 284 | +} |
| 285 | + |
| 286 | +.sidebar-stagger > * { |
| 287 | + animation: cardSettleIn 0.3s ease-out backwards; |
| 288 | +} |
| 289 | +.sidebar-stagger > *:nth-child(1) { animation-delay: 0ms; } |
| 290 | +.sidebar-stagger > *:nth-child(2) { animation-delay: 40ms; } |
| 291 | +.sidebar-stagger > *:nth-child(3) { animation-delay: 80ms; } |
| 292 | +.sidebar-stagger > *:nth-child(4) { animation-delay: 120ms; } |
| 293 | +.sidebar-stagger > *:nth-child(5) { animation-delay: 160ms; } |
| 294 | +.sidebar-stagger > *:nth-child(6) { animation-delay: 200ms; } |
| 295 | +.sidebar-stagger > *:nth-child(7) { animation-delay: 240ms; } |
| 296 | + |
245 | 297 | @media (prefers-reduced-motion: reduce) { |
246 | | - .page-fade-in { |
| 298 | + .page-fade-in, |
| 299 | + .sidebar-stagger > * { |
247 | 300 | animation: none !important; |
248 | 301 | } |
249 | 302 | } |
|
0 commit comments