Repository navigation
Expand file tree
/
Copy pathindex.css
More file actions
480 lines (432 loc) · 17.5 KB
/
Copy pathindex.css
File metadata and controls
480 lines (432 loc) · 17.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
@import 'tailwindcss';
@import 'tw-animate-css';
@import 'shadcn/tailwind.css';
@import '@fontsource-variable/inter';
@import '@fontsource-variable/fraunces';
@import '@fontsource-variable/fraunces/wght-italic.css';
@custom-variant dark (&:is(.dark *));
@theme {
--animate-fade-in-up: fade-in-up 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
/* A dose just registered (option 38): the row flashes green once and its
status icon pops in as a check. */
--animate-flash-ok: flash-ok 0.9s ease-out;
--animate-pop: pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
@keyframes flash-ok {
from {
box-shadow: 0 0 0 0 rgb(16 185 129 / 0.55);
}
to {
box-shadow: 0 0 0 12px rgb(16 185 129 / 0);
}
}
@keyframes pop {
from {
opacity: 0;
transform: translateY(8px) scale(0.92);
}
}
/* The theme button's icon turns in when it changes (ThemeToggle). */
--animate-icon-swap: icon-swap 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
@keyframes icon-swap {
from {
opacity: 0;
transform: rotate(-90deg) scale(0.6);
}
}
/* Progress bars fill from empty when they first appear (option 36). */
--animate-grow-x: grow-x 1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.2s both;
@keyframes grow-x {
from {
transform: scaleX(0);
}
}
/* ServerWakingNotice: the bar fills over the minute a sleeping Render instance takes. */
--animate-server-wake: server-wake 60s linear forwards;
@keyframes server-wake {
from {
width: 0;
}
to {
width: 100%;
}
}
@keyframes fade-in-up {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
/* The brand green is Tailwind's stock **emerald**, so it is not redefined
here — there is no `--color-emerald-*` block on purpose.
It used to be a hand-tuned teal ramp. That ramp is gone (25/08/2026):
the auth screens had already been built against emerald, and keeping two
greens meant every screen had to declare which one it belonged to. Using
the stock ramp also removes a trap the custom one had — `text-teal-800`
was in use while only 50/100/200/400/500/600/700 were defined, so that one
class silently resolved to stock Tailwind teal, a different hue from its
six siblings.
Consequence to respect: stock shades do **not** flip with the theme, and
the tokens above do. So a tint used as a fill behind text needs an
explicit `dark:` counterpart at the call site, and the fill and the text
have to move together — changing only one turns white-on-white into
dark-on-dark, which reads as fixed and is not. */
--color-amber-50: #fef3e8;
--color-amber-100: #fdddb8;
--color-amber-400: #f4a261;
--color-amber-500: #e8853a;
--color-rose-50: #fef0f1;
--color-rose-400: #e8727a;
--color-rose-500: #d95560;
--color-violet-50: #f0eeff;
--color-violet-400: #8b80f9;
--color-violet-500: #6c63ff;
/* Quiet auth surfaces, with dark equivalents below. The dashboard's four
tinted card fills (`--color-overview-*`) were removed on 2026-10-12: the
cards are white, and each area's colour lives in its icon, date pill and
badge, so the screen no longer reads as a patchwork. */
--color-auth-surface: #f7f4ef;
--color-auth-button: #2d6a4f;
--color-auth-button-hover: #245540;
--color-auth-action: #2d6a4f;
--color-auth-panel: #1a2e25;
--color-surface: #f6f7f4;
--color-ink: #1a2332;
--color-ink-muted: #5a6478;
/* Tertiary text. #5F6E81, not the reference's literal #9AA5B4: that value
lands at 2.49:1 on white, well under the WCAG AA 4.5:1 floor for normal
text, and it is used as small (10-12px) secondary copy in 25 places. Same
call, and same reason, as --primary below. #5F6E81 clears 4.5:1 on every
background it is actually painted on (white, --color-surface, slate-50,
slate-100 — worst case 4.75:1).
Consequence worth knowing: this compresses the ink scale at the bottom, so
`ink-muted` and `ink-faint` now read closer together than the reference
intended. That is the cost of the token being legible at all. */
--color-ink-faint: #5f6e81;
}
@layer base {
body {
@apply font-sans antialiased bg-background text-foreground;
}
* {
@apply border-border outline-ring/50;
}
html {
@apply font-sans;
}
button:not(:disabled),
[role='button']:not([aria-disabled='true']) {
@apply cursor-pointer;
}
}
/* Respect the OS-level "reduce motion" preference: content using the
fade-in-up entrance animation appears instantly instead of animating. */
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
}
.animate-fade-in-up {
animation: none;
opacity: 1;
transform: none;
}
}
/* Cards that answer the mouse (option 39 of the 2026-10-12 redesign): on a
device that hovers, a card rises 3px, gains a soft shadow and a green edge.
`hover: hover` keeps it off touch screens, where a "hover" is a tap that
sticks; the rise also waits for a no-preference motion setting, while the
colour cue, which does not move, applies either way. */
@media (hover: hover) {
.card-lift {
transition:
translate 0.25s ease,
box-shadow 0.25s ease,
border-color 0.25s ease;
}
.card-lift:hover {
border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
box-shadow: 0 18px 36px -24px rgb(26 46 37 / 0.5);
}
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
.card-lift:hover {
translate: 0 -3px;
}
}
/* The mark folds itself (option 35): each paper face of the swan opens from a
small, turned piece into place, back faces first (`--k`), and the three
stars light last. BrandSignature asks for it once per visit, so it greets
the first screen and never repeats on every page. */
@keyframes mark-fold {
from {
opacity: 0;
transform: scale(0.25) rotate(-35deg);
}
}
@keyframes mark-star {
from {
opacity: 0;
transform: scale(0.4);
}
}
@media (prefers-reduced-motion: no-preference) {
[data-mark-fold] polygon {
transform-box: fill-box;
transform-origin: center;
animation: mark-fold 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
animation-delay: calc(0.15s + var(--k, 0) * 70ms);
}
[data-mark-fold] path {
transform-box: fill-box;
transform-origin: center;
animation: mark-star 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.95s both;
}
}
/* Page changes as a view transition (option 37). The sidebar links set
`viewTransition`, the content area is named `cy-page` and the active menu
item `cy-nav`. The rest of the page (root) does not cross-fade, so the
sidebar and header stay still; the content steps out upward and the next
page rises in, and the active item's highlight slides to its new place.
These replaced the pages' own fade-in-up entrance, so nothing animates
twice. Under reduced motion the swap is instant. */
@keyframes page-out {
to {
opacity: 0;
transform: translateY(-6px);
}
}
@keyframes page-in {
from {
opacity: 0;
transform: translateY(12px);
}
}
@media (prefers-reduced-motion: no-preference) {
::view-transition-old(root),
::view-transition-new(root) {
animation: none;
}
::view-transition-old(cy-page) {
animation: page-out 0.18s ease-in both;
}
::view-transition-new(cy-page) {
animation: page-in 0.28s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
::view-transition-group(cy-nav) {
animation-duration: 0.3s;
animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
}
}
@media (prefers-reduced-motion: reduce) {
::view-transition-group(*),
::view-transition-old(*),
::view-transition-new(*) {
animation: none !important;
}
}
@layer utilities {
.pb-safe {
padding-bottom: env(safe-area-inset-bottom);
}
}
@theme inline {
--font-heading: var(--font-display);
/* **Os nomes têm espaço, e isso já foi um bug.** O `@fontsource` registra
`'Inter Variable'` (e registrava `'Nunito Variable'`); estas linhas pediam
`'InterVariable'` e `'NunitoVariable'`. Nome de família CSS ignora
maiúsculas, **não ignora espaço** — então nenhuma das duas casava, as duas
caíam calada e ordeiramente no `system-ui` seguinte, e os dois arquivos de
fonte nunca chegavam a ser baixados. O app inteiro renderizou em system-ui
até 03/09/2026.
Falha desse tipo não tem sintoma: a página renderiza inteira, bem, numa
fonte parecida. Foi medida, não notada — comparando a largura de um
elemento real com o mesmo texto forçado a `system-ui`, no build do
container: `.font-display` dava 119.19 nos dois, e o corpo 157.03 nos dois.
Se mexer nestes nomes, confira contra o `font-family` que o pacote declara
no `index.css` dele, dentro de `node_modules`. (Sem escrever o caminho com
curinga aqui: a sequência que ele formaria fecha este comentário no meio e
derruba o build do Tailwind — já derrubou.) */
/* Serifa no display, sans no corpo, mono no dado: três vozes com papéis
separados. A Fraunces entrou no lugar da Nunito vinda da referência
`LoginAndDashboardDesign`, e é o que dá o tom de caderno de família em vez
de painel de SaaS.
**Custou -2.508 bytes**, não custou nada: o `index.css` do pacote serve o
subset de um eixo só (peso), 36.620 bytes de woff2 latin, contra os 39.128
da Nunito que ela substituiu. Os outros cortes da Fraunces são bem mais
caros — 67.304 com o eixo óptico, 121.016 com todos — e nenhum deles é
importado aqui.
**Sem itálico**, e é uma ausência deliberada: a referência escreve metade
das manchetes em itálico, e o corte itálico custaria outros 45.656 bytes,
mais que dobrando a família. Nenhuma tela deste app usa `italic` hoje. Se
alguma passar a usar, o navegador vai inclinar o desenho por conta própria
— falso itálico, que numa serifa fica pior que numa sans, porque a serifa
de verdade tem outro desenho e não é a mesma letra tombada. Nesse caso,
importar `@fontsource-variable/fraunces/wght-italic.css` e escrever o custo
aqui antes. */
--font-display: 'Fraunces Variable', Georgia, 'Times New Roman', serif;
--font-sans: 'Inter Variable', system-ui, 'Segoe UI', Roboto, sans-serif;
/* Monospace is for code only (the landing page's embed snippet), and it is
the system's own: nothing is downloaded for it.
Until 2026-10-12 this was DM Mono, the "record voice" for every date,
time, count and percentage, a deliberate third family measured at 14,820
bytes. Option 8 of the portfolio redesign reversed it, and Samuel chose
it knowing the rule it undid: three families on one screen read as noise
more than as a record. Factual data now uses the body font with tabular
figures, `font-sans tabular-nums`, so digits still line up in columns
and do not jitter as values change, which was the useful half of the
old rule. */
--font-mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, Consolas, monospace;
--color-sidebar-ring: var(--sidebar-ring);
--color-sidebar-border: var(--sidebar-border);
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
--color-sidebar-accent: var(--sidebar-accent);
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
--color-sidebar-primary: var(--sidebar-primary);
--color-sidebar-foreground: var(--sidebar-foreground);
--color-sidebar: var(--sidebar);
--color-chart-5: var(--chart-5);
--color-chart-4: var(--chart-4);
--color-chart-3: var(--chart-3);
--color-chart-2: var(--chart-2);
--color-chart-1: var(--chart-1);
--color-ring: var(--ring);
--color-input: var(--input);
--color-border: var(--border);
--color-destructive: var(--destructive);
--color-accent-foreground: var(--accent-foreground);
--color-accent: var(--accent);
--color-muted-foreground: var(--muted-foreground);
--color-muted: var(--muted);
--color-secondary-foreground: var(--secondary-foreground);
--color-secondary: var(--secondary);
--color-primary-foreground: var(--primary-foreground);
--color-primary: var(--primary);
--color-popover-foreground: var(--popover-foreground);
--color-popover: var(--popover);
--color-card-foreground: var(--card-foreground);
--color-card: var(--card);
--color-foreground: var(--foreground);
--color-background: var(--background);
--radius-sm: calc(var(--radius) * 0.6);
--radius-md: calc(var(--radius) * 0.8);
--radius-lg: var(--radius);
--radius-xl: calc(var(--radius) * 1.4);
--radius-2xl: calc(var(--radius) * 1.8);
--radius-3xl: calc(var(--radius) * 2.2);
--radius-4xl: calc(var(--radius) * 2.6);
}
:root {
--background: oklch(1 0 0);
--foreground: oklch(0.145 0 0);
--card: oklch(1 0 0);
--card-foreground: oklch(0.145 0 0);
--popover: oklch(1 0 0);
--popover-foreground: oklch(0.145 0 0);
/* Brand primary — emerald-700, and the shade is measured, not picked.
--primary drives both white-on-fill (buttons) and fill-on-white (text
links/eyebrows). Those are the same ratio, so one number decides both,
and it is the measurement the old teal-500 failed at ~3.3:1.
Against white: emerald-500 2.54, emerald-600 3.77, emerald-700 5.48.
emerald-600 is the obvious pick — it is what the auth screens use for
focus rings — and it does not clear AA for text. On emerald-50, which is
what the tinted badges are painted on, emerald-700 is still 5.10.
The 400/500/600 steps stay available for decorative fills that carry
nothing, or that carry an icon and only owe the 3:1 graphical floor. */
--primary: #047857;
--primary-foreground: #ffffff;
--secondary: oklch(0.97 0 0);
--secondary-foreground: oklch(0.205 0 0);
--muted: oklch(0.97 0 0);
/* Darkened from shadcn's stock 0.556: that renders #737373, which is 4.34:1
on --muted (#F5F5F5) — just under AA. 0.532 gives 4.80:1. */
--muted-foreground: oklch(0.532 0 0);
--accent: oklch(0.97 0 0);
--accent-foreground: oklch(0.205 0 0);
/* Darkened well past shadcn's stock 0.577, and the reason is structural: this
token is used as *text* on a tint of **itself** (Button/Badge `destructive`),
so moving it moves both sides of the pairing and the ratio saturates. The
surface underneath the tint decides the outcome, and the component cannot
know what that surface is.
Measured at 0.49, text on `bg-destructive/10`: 5.07:1 on white, 4.86:1 on
the rose danger-zone wash, 4.66:1 on `--muted`. The previous 0.529 read
4.55 / 4.36 / 4.18 — passing only on white, and only by 0.05.
The 4.77 this comment used to claim was never reproducible; re-measuring
0.529 on the tint gives 4.55. */
--destructive: oklch(0.49 0.245 27.325);
--border: oklch(0.922 0 0);
--input: oklch(0.922 0 0);
--ring: #059669;
--chart-1: oklch(0.87 0 0);
--chart-2: oklch(0.556 0 0);
--chart-3: oklch(0.439 0 0);
--chart-4: oklch(0.371 0 0);
--chart-5: oklch(0.269 0 0);
--radius: 0.625rem;
--sidebar: oklch(0.985 0 0);
--sidebar-foreground: oklch(0.145 0 0);
--sidebar-primary: #059669;
--sidebar-primary-foreground: #ffffff;
--sidebar-accent: oklch(0.97 0 0);
--sidebar-accent-foreground: oklch(0.205 0 0);
--sidebar-border: oklch(0.922 0 0);
--sidebar-ring: #059669;
}
.dark {
/* The brand scale in @theme is light-mode-only: `surface` and the three
`ink` steps are fixed hex values, so without these overrides `bg-surface`
stayed a near-white slab in dark mode and `text-ink-muted` (#5A6478) sat
far below AA on a dark card. Ratios below are against --card (oklch .205),
the darkest surface these are painted on. */
--color-auth-surface: #171e1b;
--color-auth-action: #9dceb4;
--color-surface: oklch(0.185 0 0);
--color-ink: #f2f5f9; /* 16.4:1 */
--color-ink-muted: #aab4c4; /* 8.6:1 */
--color-ink-faint: #8b95a5; /* 5.9:1 */
--background: oklch(0.145 0 0);
--foreground: oklch(0.985 0 0);
--card: oklch(0.205 0 0);
--card-foreground: oklch(0.985 0 0);
--popover: oklch(0.205 0 0);
--popover-foreground: oklch(0.985 0 0);
--primary: #34d399;
--primary-foreground: oklch(0.145 0 0);
--secondary: oklch(0.269 0 0);
--secondary-foreground: oklch(0.985 0 0);
--muted: oklch(0.269 0 0);
--muted-foreground: oklch(0.708 0 0);
--accent: oklch(0.269 0 0);
--accent-foreground: oklch(0.985 0 0);
/* Brightened from 0.704 for the same pairing as the light token, measured on
the surfaces this button actually lands on: 4.81:1 on `--card`, 4.66:1 on
the rose-950/40 danger-zone wash (was 4.64 / 4.46).
Known bound: on a dark `--muted` surface the pairing tops out at 4.29:1 and
no lightness fixes it — the red channel is already clipped, so brightening
the text brightens the tint by the same amount. No destructive control in
this app sits on that surface; putting one there would need an opaque fill
rather than a tint of the text colour. */
--destructive: oklch(0.74 0.191 22.216);
--border: oklch(1 0 0 / 10%);
--input: oklch(1 0 0 / 15%);
--ring: #34d399;
--chart-1: oklch(0.87 0 0);
--chart-2: oklch(0.556 0 0);
--chart-3: oklch(0.439 0 0);
--chart-4: oklch(0.371 0 0);
--chart-5: oklch(0.269 0 0);
--sidebar: oklch(0.205 0 0);
--sidebar-foreground: oklch(0.985 0 0);
--sidebar-primary: #34d399;
--sidebar-primary-foreground: oklch(0.145 0 0);
--sidebar-accent: oklch(0.269 0 0);
--sidebar-accent-foreground: oklch(0.985 0 0);
--sidebar-border: oklch(1 0 0 / 10%);
--sidebar-ring: #34d399;
}