@keystone-sites/marketing-design-system 1.0.13 → 1.0.15

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.
@@ -0,0 +1,567 @@
1
+ /* The report kit (ks-Grader 170:3424): the parts a Grader report is
2
+ built from, on the Surface panel (surface.css, tone paper). Material
3
+ sizes are fixed px; the few things that change shape between a phone
4
+ and a desktop do so at the package's gates: the area cards fall from
5
+ a 2 × 2 of cards to hairline rows below the tablet anchor, the stat
6
+ cards below the first desktop anchor, and a finding's chip moves under
7
+ its text on a phone. Colour is tokens; a grade arrives through
8
+ data-grade and the status ramps. */
9
+
10
+ /* Designed constants for this file. */
11
+ :root {
12
+ /* The area card's ring sits at the head's right; its summary clips at
13
+ four lines. The score row's columns: score, grade. The finding row's
14
+ number column, and where its fix indents to. */
15
+ --rpt-area-clamp: 4;
16
+ --rpt-score-col: 72px;
17
+ --rpt-grade-col: 112px;
18
+ --rpt-score-col-phone: 44px;
19
+ --rpt-grade-col-phone: 100px;
20
+ --rpt-finding-number: 28px;
21
+ --rpt-row-body-measure: 600px;
22
+ --rpt-finding-measure: 680px;
23
+ /* The stat card's radius and the fact chip's flag triangle. */
24
+ --rpt-flag-size: 10px;
25
+ /* The rank badge is a 24px box set in sm-medium (grader/rank-badge). */
26
+ --rpt-rank-height: 24px;
27
+ /* The scale bar: a 4px track under a 14px marker (ks-Grader 06). */
28
+ --rpt-scale-h: 4px;
29
+ --rpt-scale-mark-h: 14px;
30
+ --rpt-scale-mark-w: 3px;
31
+ }
32
+
33
+ /* ---- panel head ---- */
34
+
35
+ .rpt-panel-head {
36
+ display: flex;
37
+ flex-direction: column;
38
+ gap: var(--space-2xs);
39
+ padding: var(--space-xl);
40
+ border-bottom: 1px solid var(--color-border-000);
41
+ }
42
+ .rpt-panel-title {
43
+ margin: var(--space-none);
44
+ min-width: 0;
45
+ color: var(--color-text-000);
46
+ --font: var(--ts-text-md-medium-font);
47
+ --ls: var(--ts-text-md-medium-ls);
48
+ --opsz: var(--ts-text-md-medium-opsz);
49
+ }
50
+ .rpt-panel-meta {
51
+ display: flex;
52
+ flex-wrap: wrap;
53
+ align-items: center;
54
+ gap: var(--space-lg);
55
+ min-width: 0;
56
+ }
57
+ .rpt-panel-note {
58
+ color: var(--color-border-500);
59
+ }
60
+ @container (--rt) {
61
+ .rpt-panel-head {
62
+ flex-direction: row;
63
+ flex-wrap: wrap;
64
+ align-items: baseline;
65
+ justify-content: space-between;
66
+ gap: var(--space-xl);
67
+ padding: var(--space-2xl) var(--space-3xl);
68
+ }
69
+ .rpt-panel-title {
70
+ --font: var(--ts-text-lg-medium-font);
71
+ --ls: var(--ts-text-lg-medium-ls);
72
+ --opsz: var(--ts-text-lg-medium-opsz);
73
+ }
74
+ }
75
+
76
+ /* ---- fact ---- */
77
+
78
+ .rpt-fact {
79
+ display: flex;
80
+ flex-direction: column;
81
+ gap: var(--space-xs);
82
+ min-width: 0;
83
+ }
84
+ .rpt-fact-label {
85
+ margin: var(--space-none);
86
+ color: var(--color-border-500);
87
+ }
88
+ .rpt-fact-value {
89
+ margin: var(--space-none);
90
+ color: var(--color-text-000);
91
+ overflow-wrap: anywhere;
92
+ }
93
+ .rpt-fact-detail {
94
+ color: var(--color-border-500);
95
+ }
96
+
97
+ /* ---- fact chip ---- */
98
+
99
+ /* A long fact wraps inside its column; the flag keeps to the first line. */
100
+ .rpt-fact-chip {
101
+ display: inline-flex;
102
+ align-items: flex-start;
103
+ gap: var(--space-sm);
104
+ box-sizing: border-box;
105
+ min-height: 30px;
106
+ max-width: 100%;
107
+ padding: var(--space-xs) var(--space-lg);
108
+ border-radius: var(--radius-xs);
109
+ background: var(--color-bg-200);
110
+ color: var(--color-text-200);
111
+ }
112
+ .rpt-fact-chip[data-tone="flag"] {
113
+ background: var(--color-red-100);
114
+ color: var(--color-red-500);
115
+ }
116
+ /* The area a finding belongs to (ks-Grader grader/area-chip 170:3454):
117
+ 22 tall, the badge's brown tint behind its brown ink, squared off. */
118
+ .rpt-area-chip {
119
+ display: inline-flex;
120
+ align-items: center;
121
+ box-sizing: border-box;
122
+ height: 22px;
123
+ padding-inline: var(--space-md);
124
+ border-radius: var(--radius-xs);
125
+ background: var(--color-brown-200);
126
+ color: var(--color-brown-600);
127
+ white-space: nowrap;
128
+ }
129
+ /* The flag is a plain triangle: CSS, not a file. */
130
+ .rpt-fact-chip-flag {
131
+ flex: none;
132
+ width: var(--rpt-flag-size);
133
+ height: var(--rpt-flag-size);
134
+ margin-top: calc((1lh - var(--rpt-flag-size)) / 2);
135
+ background: var(--color-red-400);
136
+ clip-path: polygon(50% 15%, 90% 85%, 10% 85%);
137
+ }
138
+
139
+ /* ---- locked chip, you badge, report link ---- */
140
+
141
+ .rpt-locked {
142
+ display: inline-flex;
143
+ align-items: center;
144
+ gap: var(--space-sm);
145
+ padding: var(--space-xs) var(--space-sm) var(--space-xs) var(--space-xs);
146
+ border-radius: var(--radius-xs);
147
+ background: var(--color-bg-200);
148
+ color: var(--color-text-300);
149
+ white-space: nowrap;
150
+ }
151
+ .rpt-locked > svg {
152
+ flex: none;
153
+ color: var(--color-text-500);
154
+ }
155
+
156
+ .rpt-rank {
157
+ display: inline-block;
158
+ padding-inline: var(--space-sm);
159
+ line-height: var(--rpt-rank-height);
160
+ border-radius: var(--radius-xs);
161
+ white-space: nowrap;
162
+ }
163
+ .rpt-rank[data-tier="first"] {
164
+ background: var(--color-teal-400);
165
+ color: var(--color-teal-800);
166
+ }
167
+ .rpt-rank[data-tier="top"] {
168
+ background: var(--color-teal-250);
169
+ color: var(--color-teal-700);
170
+ }
171
+ .rpt-rank[data-tier="placed"] {
172
+ background: var(--color-yellow-300);
173
+ color: var(--color-yellow-700);
174
+ }
175
+ .rpt-rank[data-tier="none"] {
176
+ background: var(--color-danger-200);
177
+ color: var(--color-danger-500);
178
+ }
179
+
180
+ .rpt-scale {
181
+ position: relative;
182
+ display: flex;
183
+ gap: 2px;
184
+ width: 100%;
185
+ height: var(--rpt-scale-mark-h);
186
+ align-items: center;
187
+ }
188
+ .rpt-scale-seg {
189
+ flex: 1 1 0;
190
+ height: var(--rpt-scale-h);
191
+ border-radius: var(--radius-full);
192
+ }
193
+ .rpt-scale-seg[data-tone="good"] { background: var(--color-teal-500); }
194
+ .rpt-scale-seg[data-tone="fair"] { background: var(--color-yellow-400); }
195
+ .rpt-scale-seg[data-tone="poor"] { background: var(--color-red-400); }
196
+ .rpt-scale-seg[data-tone="neutral"] { background: var(--color-bg-300); }
197
+ .rpt-scale-mark {
198
+ position: absolute;
199
+ top: 0;
200
+ left: calc(var(--at) * 100%);
201
+ width: var(--rpt-scale-mark-w);
202
+ height: 100%;
203
+ border-radius: 1px;
204
+ background: var(--color-text-100);
205
+ transform: translateX(-50%);
206
+ }
207
+
208
+ .rpt-you {
209
+ display: inline-flex;
210
+ align-items: center;
211
+ vertical-align: middle;
212
+ padding: var(--space-2xs) var(--space-md);
213
+ border-radius: var(--radius-full);
214
+ background: var(--color-teal-250);
215
+ color: var(--color-teal-700);
216
+ white-space: nowrap;
217
+ }
218
+
219
+ .rpt-link {
220
+ display: inline-flex;
221
+ align-items: center;
222
+ gap: var(--space-sm);
223
+ padding-block: var(--space-xs);
224
+ color: var(--color-text-200);
225
+ text-decoration: none;
226
+ white-space: nowrap;
227
+ transition: color var(--motion-hover-duration) var(--motion-hover-ease);
228
+ }
229
+ .rpt-link > svg {
230
+ flex: none;
231
+ transition: translate var(--motion-hover-duration) var(--motion-hover-ease);
232
+ }
233
+ @media (hover: hover) {
234
+ .rpt-link:hover {
235
+ color: var(--color-text-000);
236
+ }
237
+ .rpt-link:hover > svg {
238
+ translate: 2px 0;
239
+ }
240
+ }
241
+ .rpt-link:focus-visible {
242
+ outline: none;
243
+ box-shadow: 0 0 0 var(--ring-w) var(--color-border-200);
244
+ border-radius: var(--radius-xs);
245
+ }
246
+
247
+ /* ---- area card ---- */
248
+
249
+ .rpt-areas {
250
+ display: flex;
251
+ flex-direction: column;
252
+ }
253
+ .rpt-area {
254
+ display: flex;
255
+ flex-direction: column;
256
+ gap: var(--space-lg);
257
+ box-sizing: border-box;
258
+ min-width: 0;
259
+ padding: var(--space-xl);
260
+ background: var(--color-bg-050);
261
+ }
262
+ /* Stacked cards share a hairline; once they stand in a grid each wears its
263
+ own border, which hover may recolour on all four sides. */
264
+ @container (--below-rt) {
265
+ .rpt-areas > .rpt-area + .rpt-area {
266
+ border-top: 1px solid var(--color-border-000);
267
+ }
268
+ }
269
+ /* A card that is the link: plain ink, its border deepening on hover and
270
+ its footer cue answering as the link would. */
271
+ a.rpt-area {
272
+ color: inherit;
273
+ text-decoration: none;
274
+ transition: border-color var(--motion-hover-duration) var(--motion-hover-ease);
275
+ }
276
+ a.rpt-area:focus-visible {
277
+ outline: none;
278
+ box-shadow: inset 0 0 0 var(--ring-w) var(--color-border-200);
279
+ }
280
+ @media (hover: hover) {
281
+ a.rpt-area:hover {
282
+ border-color: var(--color-border-200);
283
+ }
284
+ a.rpt-area:hover .rpt-link {
285
+ color: var(--color-text-000);
286
+ }
287
+ a.rpt-area:hover .rpt-link > svg {
288
+ translate: 2px 0;
289
+ }
290
+ }
291
+ /* The title wraps between its words beside the ring; when its longest word
292
+ (or its pill) and the ring cannot share the row, the ring drops under it
293
+ rather than over it. */
294
+ .rpt-area-head {
295
+ display: flex;
296
+ flex-wrap: wrap;
297
+ justify-content: space-between;
298
+ align-items: flex-start;
299
+ gap: var(--space-lg);
300
+ }
301
+ .rpt-area-title {
302
+ display: flex;
303
+ flex: 1 1 0;
304
+ flex-direction: column;
305
+ align-items: flex-start;
306
+ gap: var(--space-md);
307
+ min-width: min-content;
308
+ }
309
+ .rpt-area-name {
310
+ margin: var(--space-none);
311
+ color: var(--color-text-200);
312
+ }
313
+ .rpt-area-summary {
314
+ margin: var(--space-none);
315
+ color: var(--color-text-200);
316
+ display: -webkit-box;
317
+ -webkit-box-orient: vertical;
318
+ -webkit-line-clamp: var(--rpt-area-clamp);
319
+ overflow: hidden;
320
+ }
321
+ .rpt-area-footer {
322
+ display: flex;
323
+ align-items: center;
324
+ margin-top: auto;
325
+ padding-top: var(--space-xs);
326
+ }
327
+ @container (--rt) {
328
+ .rpt-areas {
329
+ display: grid;
330
+ grid-template-columns: repeat(2, minmax(0, 1fr));
331
+ gap: var(--space-lg);
332
+ }
333
+ .rpt-area {
334
+ padding: var(--space-xl);
335
+ border: 1px solid var(--color-border-000);
336
+ border-radius: var(--radius-xl);
337
+ }
338
+ }
339
+
340
+ /* ---- score row ---- */
341
+
342
+ .rpt-score-row {
343
+ border-top: 1px solid var(--color-border-000);
344
+ }
345
+ .rpt-score-row:first-child {
346
+ border-top: 0;
347
+ }
348
+ .rpt-score-row:not(details),
349
+ .rpt-score-summary {
350
+ display: flex;
351
+ align-items: center;
352
+ gap: var(--space-lg);
353
+ min-height: 56px;
354
+ padding-block: var(--space-md);
355
+ box-sizing: border-box;
356
+ }
357
+ .rpt-score-summary {
358
+ list-style: none;
359
+ cursor: pointer;
360
+ }
361
+ .rpt-score-summary::-webkit-details-marker {
362
+ display: none;
363
+ }
364
+ .rpt-score-area {
365
+ flex: 1 1 auto;
366
+ min-width: 0;
367
+ color: var(--color-text-000);
368
+ --font: var(--ts-text-md-regular-font);
369
+ --ls: var(--ts-text-md-regular-ls);
370
+ --opsz: var(--ts-text-md-regular-opsz);
371
+ }
372
+ .rpt-score-value {
373
+ flex: none;
374
+ width: var(--rpt-score-col-phone);
375
+ color: var(--color-text-000);
376
+ text-align: right;
377
+ font-variant-numeric: tabular-nums;
378
+ }
379
+ .rpt-score-grade {
380
+ flex: none;
381
+ display: flex;
382
+ justify-content: flex-end;
383
+ width: var(--rpt-grade-col-phone);
384
+ }
385
+ .rpt-row-chevron {
386
+ flex: none;
387
+ color: var(--color-border-300);
388
+ transition: rotate var(--motion-drawer-duration) var(--motion-drawer-ease);
389
+ }
390
+ details[open] > summary .rpt-row-chevron {
391
+ rotate: 180deg;
392
+ }
393
+ .rpt-score-summary:focus-visible,
394
+ .rpt-finding-summary:focus-visible {
395
+ outline: none;
396
+ box-shadow: inset 0 0 0 var(--ring-w) var(--color-border-200);
397
+ }
398
+ @container (--rt) {
399
+ .rpt-score-row:not(details),
400
+ .rpt-score-summary {
401
+ gap: var(--space-2xl);
402
+ min-height: 60px;
403
+ }
404
+ .rpt-score-area {
405
+ --font: var(--ts-text-lg-regular-font);
406
+ --ls: var(--ts-text-lg-regular-ls);
407
+ --opsz: var(--ts-text-lg-regular-opsz);
408
+ }
409
+ .rpt-score-value {
410
+ width: var(--rpt-score-col);
411
+ }
412
+ .rpt-score-grade {
413
+ width: var(--rpt-grade-col);
414
+ }
415
+ }
416
+
417
+ /* The body a row opens to: the finding, then its fix, in a reading measure. */
418
+ .rpt-row-body {
419
+ display: flex;
420
+ flex-direction: column;
421
+ gap: var(--space-lg);
422
+ max-width: var(--rpt-row-body-measure);
423
+ padding: var(--space-2xs) 0 var(--space-3xl);
424
+ }
425
+ .rpt-row-body > p {
426
+ margin: var(--space-none);
427
+ }
428
+
429
+ /* ---- finding row ---- */
430
+
431
+ .rpt-finding-row {
432
+ border-top: 1px solid var(--color-border-000);
433
+ }
434
+ .rpt-finding-row:first-child {
435
+ border-top: 0;
436
+ }
437
+ .rpt-finding-row:not(details),
438
+ .rpt-finding-summary {
439
+ display: flex;
440
+ flex-wrap: wrap;
441
+ align-items: center;
442
+ gap: var(--space-md) var(--space-lg);
443
+ padding-block: var(--space-lg);
444
+ }
445
+ .rpt-finding-summary {
446
+ list-style: none;
447
+ cursor: pointer;
448
+ }
449
+ .rpt-finding-summary::-webkit-details-marker {
450
+ display: none;
451
+ }
452
+ .rpt-finding-number {
453
+ flex: none;
454
+ width: var(--rpt-finding-number);
455
+ color: var(--color-border-500);
456
+ font-variant-numeric: tabular-nums;
457
+ }
458
+ /* The finding wraps where its fix does: the fix body's measure less the
459
+ indent they share. Whatever follows takes the room left over. */
460
+ .rpt-finding-text {
461
+ flex: 1 1 0;
462
+ min-width: 0;
463
+ max-width: calc(var(--rpt-finding-measure) - var(--rpt-finding-number) - var(--space-lg));
464
+ color: var(--color-text-000);
465
+ }
466
+ .rpt-finding-text + * {
467
+ margin-inline-start: auto;
468
+ }
469
+ /* On a phone the chip takes a line of its own under the finding. */
470
+ .rpt-finding-chip {
471
+ flex: none;
472
+ order: 3;
473
+ width: 100%;
474
+ padding-left: calc(var(--rpt-finding-number) + var(--space-lg));
475
+ }
476
+ .rpt-finding-row .rpt-row-chevron {
477
+ order: 2;
478
+ }
479
+ .rpt-finding-body {
480
+ max-width: var(--rpt-finding-measure);
481
+ padding: 0 0 var(--space-2xl) calc(var(--rpt-finding-number) + var(--space-lg));
482
+ }
483
+ @container (--rt) {
484
+ .rpt-finding-row:not(details),
485
+ .rpt-finding-summary {
486
+ flex-wrap: nowrap;
487
+ gap: var(--space-xl);
488
+ }
489
+ .rpt-finding-text {
490
+ max-width: calc(var(--rpt-finding-measure) - var(--rpt-finding-number) - var(--space-xl));
491
+ }
492
+ .rpt-finding-chip {
493
+ order: 0;
494
+ width: auto;
495
+ padding-left: 0;
496
+ }
497
+ .rpt-finding-row .rpt-row-chevron {
498
+ order: 0;
499
+ }
500
+ .rpt-finding-body {
501
+ padding-left: calc(var(--rpt-finding-number) + var(--space-xl));
502
+ }
503
+ }
504
+
505
+ /* ---- stat card ---- */
506
+
507
+ .rpt-stats {
508
+ display: flex;
509
+ flex-direction: column;
510
+ }
511
+ .rpt-stat {
512
+ display: flex;
513
+ flex-direction: column;
514
+ gap: var(--space-lg);
515
+ box-sizing: border-box;
516
+ min-width: 0;
517
+ padding: var(--space-xl);
518
+ }
519
+ .rpt-stats > .rpt-stat + .rpt-stat {
520
+ border-top: 1px solid var(--color-border-000);
521
+ }
522
+ .rpt-stat-label {
523
+ color: var(--color-text-200);
524
+ }
525
+ .rpt-stat-value {
526
+ color: var(--color-text-000);
527
+ font-variant-numeric: tabular-nums;
528
+ --fs-rm: 36;
529
+ --lh-rm: 42;
530
+ --fs-rd1: 40;
531
+ --lh-rd1: 48;
532
+ --fs-rd2: 40;
533
+ --lh-rd2: 48;
534
+ --fs-rt-to: var(--fs-rd1);
535
+ --lh-rt-to: var(--lh-rd1);
536
+ }
537
+ .rpt-stat-sub {
538
+ display: flex;
539
+ align-items: center;
540
+ gap: var(--space-sm);
541
+ min-width: 0;
542
+ color: var(--color-text-000);
543
+ }
544
+ .rpt-stat-note {
545
+ color: var(--color-border-500);
546
+ }
547
+ @container (--rt) {
548
+ .rpt-stat {
549
+ padding: var(--space-3xl);
550
+ }
551
+ }
552
+ @container (--rd1) {
553
+ .rpt-stats {
554
+ display: grid;
555
+ grid-template-columns: repeat(var(--rpt-stat-cols), minmax(0, 1fr));
556
+ gap: var(--space-lg);
557
+ padding: var(--space-3xl);
558
+ }
559
+ .rpt-stat {
560
+ padding: var(--space-xl);
561
+ border: 1px solid var(--color-border-000);
562
+ border-radius: var(--radius-xl);
563
+ }
564
+ .rpt-stats > .rpt-stat + .rpt-stat {
565
+ border-top: 1px solid var(--color-border-000);
566
+ }
567
+ }