-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathstyle.css
More file actions
4097 lines (3818 loc) · 157 KB
/
Copy pathstyle.css
File metadata and controls
4097 lines (3818 loc) · 157 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
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/* Brian Dew BD Economics - style.css */
/* ===== Font Face ===== */
@font-face { font-family: 'Lato'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/lato-400.woff2') format('woff2'); }
@font-face { font-family: 'Lato'; font-style: italic; font-weight: 400; font-display: swap; src: url('fonts/lato-400i.woff2') format('woff2'); }
@font-face { font-family: 'Lato'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/lato-700.woff2') format('woff2'); }
@font-face { font-family: 'Lato'; font-style: italic; font-weight: 700; font-display: swap; src: url('fonts/lato-700i.woff2') format('woff2'); }
@font-face { font-family: 'Albert Sans'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('fonts/albert-sans-normal.woff2') format('woff2'); }
@font-face { font-family: 'Albert Sans'; font-style: italic; font-weight: 400; font-display: swap; src: url('fonts/albert-sans-400i.woff2') format('woff2'); }
/* ===== Variables ===== */
:root {
color-scheme: light dark;
/* Native form-control tint matches the brand red used for primary actions
(nav active state, blog tag). One line — browsers handle the rest. */
accent-color: #E04040;
--font: 'Lato', sans-serif;
--font-accent: 'Albert Sans', sans-serif;
--radius: 0;
/* Spacing Scale — 4px base, 1.5× progression (Swiss grid) */
--space-1: 4px;
--space-2: 8px;
--space-3: 12px;
--space-4: 16px;
--space-5: 24px;
--space-6: 32px;
--space-7: 48px;
--space-8: 64px;
--space-9: 96px;
/* Type Scale — fluid from 320px to 1080px viewport */
--text-xs: 13px;
--text-sm: 15px;
--text-base: 18px;
--text-lg: 19px;
--text-xl: clamp(18px, 0.5vw + 16.5px, 20px);
--text-2xl: clamp(19px, 0.5vw + 17.5px, 21px);
--text-3xl: clamp(21px, 0.7vw + 18px, 25px);
--text-4xl: clamp(25px, 1vw + 21px, 30px);
/* Display: H1s for hero areas. Middle ground between the old 56px (too loud)
and the briefly-tried 36px (too tame). 44px max reads as a proper hero. */
--text-display: clamp(30px, 2vw + 16px, 44px);
/* Width Tiers — all content snaps to one of these */
--width-page: 1080px;
--width-xl: 1030px;
--width-content: 880px; /* inset content (feature pages: blog, reports, python, about) — leaves visible page-side margin */
--width-lg: 720px;
--width-md: 600px;
--width-chart: 480px;
--width-sm: 360px;
/* Transitions */
--transition-fast: 0.15s ease;
--transition-normal: 0.2s ease;
/* Z-index Scale */
--z-nav: 999;
--z-dropdown: 1000;
--z-overlay: 1001;
/* Brand Colors */
--color-accent-red: #E04040;
/* Navigation */
--color-nav-bg: #4B4B4B;
--color-nav-text: #f2f2f2;
--color-nav-hover: #111;
/* Text Colors — 3-tier hierarchy */
--color-text-strong: #161616;
--color-text: #3a3a3a;
--color-text-muted: #666;
/* Backgrounds: canvas (page) → surface (panels) → highlight (emphasis) → alt (zebra rows) */
--color-canvas: #f5f5f5;
--color-surface: #fff;
--color-bg-input: #fff;
--color-bg-alt: #f2f2f2;
--color-bg-highlight: #e8e8e8;
/* Links */
--color-link: #A80038;
--color-link-visited: #900C3F;
--color-link-hover: #CC9900;
/* Borders */
--color-border: #e9ecef;
--color-border-light: #ccc;
/* Code */
--color-code-bg: #efefef;
/* Elevation */
--elevation-border: 2px solid var(--color-border-light);
/* Chart colors */
--color-grid: color-mix(in srgb, black 6%, transparent);
--color-tooltip-bg: color-mix(in srgb, #4b4b4b 95%, transparent);
/* Card/chart body background */
--color-card-bg: #fff;
/* Trail badge colors */
--color-trail-intro: #1f6822; /* was #2e7d32 — slightly darker so it passes 4.5:1 on the 12%-tinted bg used by .trail-intro */
--color-trail-beginner: #1565c0;
--color-trail-other: #555;
/* Syntax highlighting */
--syn-base: #333;
--syn-comment: #6b6b6b; /* was #8d8d8d — darker so it passes 4.5:1 on the #efefef code bg */
--syn-keyword: #713bc5;
--syn-number: #a04600; /* was #c95b00 (which was ~3.7:1 on #efefef) — now ~5.3:1 AA-safe. Also used by .hljs-literal / .hljs-variable. */
--syn-string: #056d2a; /* was #009e07 — darker so it passes 4.5:1 on the #efefef code bg */
--syn-title: #900;
--syn-function: #a31257; /* was #e22978 — darker so it passes 4.5:1 on the #efefef code bg (also used by .hljs-built_in) */
--syn-type: #458;
--syn-tag: #000080;
--syn-symbol: #990073;
--syn-deletion-bg: #fdd;
--syn-addition-bg: #dfd;
/* Card Header / Accent Colors
Tuned 2026-05 for distinguishability: spread on hue + lightness so
dots remain readable at small sizes against the gray surface.
Used for card accent dots, section accents, AND chart line colors
on indicators.html (via CATEGORY_CSS_VARS in scripts/indicators.js
and the homepage sparkline). Changing these values changes those
chart colors too. */
--color-card-blue: #2c4a85; /* Monetary — deep navy */
--color-card-green: #3d8550; /* Government */
--color-card-red: #d63b3b; /* Prices */
--color-card-orange: #d97f2c; /* Labor — true orange */
--color-card-purple: #7e4ea7; /* Trade — saturated violet */
--color-card-ltblue: #5497c4; /* Output — clearly lighter than blue */
--color-card-teal: #2e9aa0; /* Businesses — bright cyan, distinct from green */
--color-card-brown: #a89043; /* (was muddy; now olive / mustard) */
/* Strong (darker) variants for use BEHIND white text or AS text on
white background — only for the four accents that fail WCAG-AA
contrast against white at the standard tone above. The strong
variants ensure ≥4.5:1 contrast for normal text. */
--color-card-orange-strong: #a05d20;
--color-card-ltblue-strong: #2e6c95;
--color-card-teal-strong: #1a6e72;
--color-card-brown-strong: #6e5e2a;
/* Darker variants for accents that fail WCAG AA at body-text-size when
placed directly on white. Used by accent-{green,red} via the accent-X
classes below so accent-text-on-surface meets 4.5:1. */
--color-card-green-strong: #2a6038;
--color-card-red-strong: #b62a2a;
}
/* Dark theme
Surface hierarchy (darker = further back):
Canvas #121212 → Panel #1e1e1e → Panel-item #252525 → Highlight #2e2e2e → Chrome #333
Header #424242 is distinct from nav to avoid blending
Borders provide structural edges (no shadows in dark mode) */
[data-theme="dark"] {
--color-nav-bg: #333;
--color-nav-text: #e0e0e0;
--color-nav-hover: #4a4a4a;
/* Body text bumped from #c8c8c8 → #dcdcdc for prose readability.
Muted bumped from #999 → #a8a8a8 to keep secondary text legible.
Both still under pure white so we don't get the "shimmer" effect. */
--color-text-strong: #f0f0f0;
--color-text: #dcdcdc;
--color-text-muted: #a8a8a8;
--color-canvas: #121212;
--color-surface: #1e1e1e;
--color-bg-input: #1e1e1e;
--color-bg-alt: #1a1a1a;
--color-bg-highlight: #383838;
/* Links: softer red aligned with brand (was pink #ff6b8a + orange hover). */
--color-link: #ec7878;
--color-link-visited: #d06262;
--color-link-hover: #f49a9a;
/* Borders bumped #444 → #565656 so card edges read clearly against
#282828 cards on #1a1a1a body. Also see card top-highlight rule. */
--color-border: #565656;
--color-border-light: #6a6a6a;
--color-code-bg: #2a2a2a;
--elevation-border: 1px solid var(--color-border);
--color-grid: color-mix(in srgb, white 8%, transparent);
--color-tooltip-bg: color-mix(in srgb, #282828 95%, transparent);
--color-card-bg: #282828;
--color-trail-intro: #66bb6a;
--color-trail-beginner: #42a5f5;
--color-trail-other: #bbb;
--syn-base: #c0c0c0;
--syn-comment: #9ca3af;
--syn-keyword: #a78bfa;
--syn-number: #fb923c;
--syn-string: #4ade80;
--syn-title: #f472b6;
--syn-function: #f472b6;
--syn-type: #a78bfa;
--syn-tag: #60a5fa;
--syn-symbol: #f472b6;
--syn-deletion-bg: none;
--syn-addition-bg: none;
/* Dark-mode accents — lighter variants so they read on dark surfaces. */
--color-card-blue: #6e90c8;
--color-card-green: #5fa872;
--color-card-red: #ec5d5d;
--color-card-orange: #f0a05c;
--color-card-purple: #a578d0;
--color-card-ltblue: #7fb5dc;
--color-card-teal: #4dbcc4;
--color-card-brown: #c8b06b;
/* In dark mode, the base accent is already light enough — strong
variants alias to the base. Without these definitions the
-strong vars would inherit the light-mode (darker) values which
would be hard to read on the dark surface. */
--color-card-orange-strong: var(--color-card-orange);
--color-card-ltblue-strong: var(--color-card-ltblue);
--color-card-teal-strong: var(--color-card-teal);
--color-card-brown-strong: var(--color-card-brown);
--color-card-green-strong: var(--color-card-green);
--color-card-red-strong: var(--color-card-red);
}
/* ===== Accent Colors =====
Each class sets --accent (used for borders, dots, and decorative
accents) and --accent-strong (used for white-on-accent fills like
info-box-tab, .btn.active, etc.). For 4 accents the strong variant
is identical to the base (they already meet WCAG-AA on white); for
the lighter 4, --accent-strong is a darker variant defined above. */
.accent-blue { --accent: var(--color-card-blue); --accent-strong: var(--color-card-blue); }
.accent-green { --accent: var(--color-card-green); --accent-strong: var(--color-card-green-strong); }
.accent-red { --accent: var(--color-card-red); --accent-strong: var(--color-card-red-strong); }
.accent-orange { --accent: var(--color-card-orange); --accent-strong: var(--color-card-orange-strong); }
.accent-purple { --accent: var(--color-card-purple); --accent-strong: var(--color-card-purple); }
.accent-teal { --accent: var(--color-card-teal); --accent-strong: var(--color-card-teal-strong); }
.accent-ltblue { --accent: var(--color-card-ltblue); --accent-strong: var(--color-card-ltblue-strong); }
.accent-brown { --accent: var(--color-card-brown); --accent-strong: var(--color-card-brown-strong); }
/* Dark-mode "deep" accent variants — darker than -strong, chosen so white
text passes 4.5:1 contrast on them. Components that paint white text on
accent-colored backgrounds (subfooter .current, .info-box-tab, .btn.active)
prefer var(--accent-deep, --accent-strong, --accent) so they pick the
deep variant in dark mode and fall back to -strong in light mode. */
[data-theme="dark"] {
& .accent-blue { --accent-deep: #1f3a72; }
& .accent-green { --accent-deep: #1f5230; }
& .accent-red { --accent-deep: #8e1f1f; }
& .accent-orange { --accent-deep: #6e4014; }
& .accent-purple { --accent-deep: #4a2e6a; }
& .accent-teal { --accent-deep: #154852; }
& .accent-ltblue { --accent-deep: #20567a; }
& .accent-brown { --accent-deep: #524320; }
}
/* ===== Base & Typography ===== */
/* Focus styles for keyboard navigation */
:is(a, button, select, input):focus-visible { outline: 2px solid var(--color-link); outline-offset: 2px; }
.site-nav :is(a, button):focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
/* Skip-to-content link */
.skip-link {
position: absolute;
top: -50px;
left: 0;
background: var(--color-accent-red);
color: #fff;
padding: var(--space-2) var(--space-4);
z-index: var(--z-dropdown);
font-size: var(--text-sm);
text-decoration: none;
&:focus { top: 0; color: #fff; }
}
/* Screen reader only — accessible hidden text */
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip-path: inset(50%);
white-space: nowrap;
border: 0;
}
/* General document styling */
html{
margin: 0 auto;
max-width: var(--width-page);
min-width: 300px;
overflow-x: hidden;
scrollbar-gutter: stable;
}
body{
margin: 0;
padding: 50px 0 0; /* clear fixed nav universally */
font-family: var(--font);
background-color: var(--color-canvas);
color: var(--color-text-strong);
text-size-adjust: 100%;
-webkit-tap-highlight-color: transparent;
}
main {
padding: var(--space-2) var(--space-5) var(--space-5);
box-sizing: border-box;
background: var(--color-surface);
border: var(--elevation-border);
border-bottom: none;
}
p, li { font-size: var(--text-base); color: var(--color-text); line-height: 1.65; text-wrap: pretty; }
p { margin-bottom: 0.75em; }
/* Button reset — bare interactive element, no browser chrome */
button { background: none; border: none; cursor: pointer; font: inherit; color: inherit; }
hr {
border: none;
border-top: 2px solid var(--color-border-light);
margin: var(--space-6) auto;
width: 90%;
}
/* Prose content wrapper — standard readable width */
.prose {
max-width: var(--width-lg);
margin: 0 auto;
padding: 0 var(--space-3);
box-sizing: border-box;
& h2 { font-size: var(--text-3xl); margin: var(--space-7) 0 var(--space-3); }
& h3 { font-size: var(--text-2xl); margin: var(--space-7) 0 var(--space-3); }
& h4 { color: var(--color-text-muted); margin: var(--space-6) 0 var(--space-3); }
/* Prevent prose spacing from bleeding into nested containers */
& .card-body :is(h2, h3, h4),
& .info-box :is(h2, h4) { margin-top: var(--space-4); }
& .card-body h4, & .info-box h4 { color: var(--color-text-strong); }
& .card-body p { margin-bottom: var(--space-3); }
& ul, & ol { padding-left: 1.5em; margin: var(--space-2) 0 var(--space-5); }
& li { margin-bottom: 0.4em; }
& p { margin-bottom: 1.5em; }
& p code { font-weight: bold; }
& img { max-width: 100%; }
& .card, & .info-box { margin-bottom: var(--space-5); }
}
/* Report prose — typography for long-form report body.
Also applies to .report-split-text (break-out text alongside a chart or image). */
.prose-report > p:not(.callout),
.report-split-text > p {
font-size: var(--text-lg);
line-height: 1.75;
margin-bottom: 30px;
}
.report-split-text > p:first-child { margin-top: 0; }
/* Noscript fallback warning */
.noscript-warning { background: var(--color-bg-highlight); color: var(--color-text); padding: var(--space-3); font-size: var(--text-sm); border: var(--elevation-border); }
:is(h1, h2, h3, h4) { font-family: var(--font-accent); font-weight: 800; line-height: 1.2; text-wrap: balance; letter-spacing: -0.02em; scroll-margin-top: var(--space-8); }
h1 { margin: var(--space-2) 0; }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-lg); }
/* Styling for links — underline by default (accessibility), remove on hover */
a {
&:link { color: var(--color-link); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
&:visited { color: var(--color-link-visited); }
&:hover { text-decoration: none; color: var(--color-link-hover); }
}
/* Code blocks */
pre {
background: var(--color-code-bg);
border: 2px solid var(--color-border-light);
padding: var(--space-4);
margin: var(--space-4) 0;
overflow-x: auto;
font-size: var(--text-sm);
line-height: 1.5;
position: relative; /* anchor for .code-copy button */
& .hljs { background: none; padding: 0; }
}
code {
text-align: left; background: var(--color-bg-highlight);
padding: 2px 4px; font-size: 0.9em;
pre & { background: none; padding: 0; border-radius: 0; font-size: inherit; }
}
/* Code copy button — JS appends one to each <pre> that contains a <code>.
Invisible until the pre is hovered or the button receives focus. */
.code-copy {
position: absolute;
top: var(--space-2);
right: var(--space-2);
display: inline-flex;
align-items: center;
gap: var(--space-1);
padding: 4px 6px;
background: var(--color-bg-input);
border: 1px solid var(--color-border-light);
color: var(--color-text-muted);
font: inherit;
font-size: var(--text-xs);
line-height: 1;
cursor: pointer;
opacity: 0;
transition: opacity var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
&:hover { color: var(--color-text-strong); border-color: var(--color-text); }
&:focus-visible { opacity: 1; outline: 2px solid var(--accent, var(--color-text-strong)); outline-offset: 2px; }
&.is-copied { color: var(--color-card-green-strong, var(--color-card-green)); border-color: var(--color-card-green-strong, var(--color-card-green)); }
}
pre:hover .code-copy { opacity: 1; }
/* Visually hidden span for screen reader feedback */
.code-copy-feedback {
position: absolute;
width: 1px; height: 1px;
overflow: hidden;
clip: rect(0 0 0 0);
white-space: nowrap;
}
/* Inline SVG icons */
svg.icon { width: 1em; height: 1em; vertical-align: -0.125em; }
/* ===== Navigation ===== */
/* Top Navigation Bar */
/* Site nav header (top-level <header> child of <body>). Use direct-child
selector so inner <header> elements (e.g., .post-header) don't inherit
the fixed positioning. */
body > header {
position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: var(--z-nav);
}
body > header > nav {
background-color: var(--color-nav-bg);
}
.site-nav {
list-style: none;
max-width: var(--width-page);
margin: 0 auto;
padding: 0;
display: flex;
flex-direction: row-reverse;
justify-content: flex-start;
align-items: center;
& li:first-child { margin-right: auto; order: 1; }
& li a, & li p {
display: inline-block;
font-family: var(--font-accent);
color: var(--color-nav-text);
text-align: center;
padding: 14px 24px;
text-decoration: none;
transition: var(--transition-normal);
font-size: var(--text-sm);
font-weight: 500;
text-transform: uppercase;
letter-spacing: 0.06em;
line-height: 22px;
}
& .icon-external { width: 0.7em; height: 0.7em; }
& li a:hover { background-color: var(--color-nav-hover); }
& li a.active { background-color: #b62a2a; color: #fff; font-weight: 700; } /* fixed dark red — passes AA white-on-bg in both themes */
& li.icon { display: none; }
& .icon button { padding: 14px 16px; font-size: var(--text-base); }
/* Dropdown */
& ul {
display: none;
position: fixed;
background: var(--color-nav-bg);
padding: 0;
overflow: hidden;
& li { display: block; }
& li a {
display: block;
padding: 12px 20px;
color: var(--color-nav-text);
text-align: left;
font-size: var(--text-base);
border-bottom: 1px solid color-mix(in srgb, white 10%, transparent);
}
& li:last-child a { border-bottom: none; }
& li a:hover { background: var(--color-nav-hover); }
}
}
.nav-main { font-weight: bold; }
.brand-logo {
height: 16px;
width: auto;
vertical-align: middle;
}
ul li a:hover + .hidden, .hidden:hover { display: block; }
/* Theme toggle button */
.theme-toggle {
color: var(--color-nav-text);
padding: 14px 10px; margin-right: var(--space-4);
font-size: var(--text-base); line-height: 1; opacity: 0.7; transition: opacity var(--transition-normal);
&:hover { opacity: 1; }
}
/* Top Navigation - Responsive */
@media screen and (max-width: 760px) {
.site-nav {
width: 100%;
& li:not(:first-child) { display: none; }
& li.icon { display: inline-block; }
& li:has(.theme-toggle) {
display: inline-block !important;
position: absolute;
right: 42px;
top: 13px;
& .theme-toggle { padding: 6px 20px; font-size: var(--text-lg); line-height: 1; }
}
& li a { min-width: 0; }
& .icon button { color: white; font-size: var(--text-3xl); padding: 4px 16px; line-height: 1; }
/* Menu open: right-side slide panel */
&.responsive {
position: fixed;
top: 50px;
right: 0;
width: 240px;
max-height: calc(100vh - 50px);
overflow-y: auto;
flex-direction: column;
align-items: stretch;
background-color: var(--color-nav-bg);
border-left: var(--elevation-border);
z-index: var(--z-dropdown);
& li { display: block; }
& li:first-child {
position: fixed; top: 0; left: 10px;
z-index: var(--z-overlay); margin-right: 0; order: 0;
& a { border-bottom: none; }
}
& li.icon { position: fixed; right: 0; top: 7px; z-index: var(--z-overlay); }
& li:has(.theme-toggle) { display: inline-block !important; position: fixed; right: 42px; top: 13px; z-index: var(--z-overlay); }
& li:nth-child(5) { order: 1; }
& li:nth-child(4) { order: 2; }
& li:nth-child(3) { order: 3; }
& li:nth-child(2) { order: 4; }
& li a {
display: block; text-align: left; min-width: 0;
font-size: var(--text-lg); padding: 16px 20px;
min-height: 52px; box-sizing: border-box;
border-bottom: 1px solid color-mix(in srgb, white 10%, transparent);
&:hover { background-color: var(--color-nav-hover); }
&.active { background-color: transparent; border-left: 3px solid var(--color-accent-red); padding-left: 17px; font-weight: 700; }
}
& ul.hidden { display: none !important; }
& .nav-arrow { display: none; }
}
}
nav { height: 50px; padding: 0; }
.card-nav { min-height: auto; }
.card-nav .card-body { min-height: auto; }
main { padding: var(--space-2) var(--space-3) var(--space-3); }
footer { padding: var(--space-4) var(--space-3) var(--space-2); }
}
/* Phone — tighter spacing, touch targets, stacked controls
Breakpoints: 760px (tablet), 480px (phone) */
@media (max-width: 480px) {
main { padding: var(--space-2) var(--space-2) var(--space-3); }
.prose { padding: 0 var(--space-2); }
footer { padding: var(--space-3) var(--space-2) var(--space-2); }
/* Tighten vertical rhythm */
.prose h2 { margin-top: var(--space-6); }
.prose h3 { margin-top: var(--space-6); }
hr { margin: var(--space-5) auto; }
section { padding-top: var(--space-4); }
/* Touch targets — 44px minimum */
.btn, .form-select, summary { min-height: 44px; }
.form-select { font-size: var(--text-base); }
/* Stack controls vertically */
.control-panel { flex-direction: column; align-items: stretch; }
.control-row { flex-wrap: wrap; }
/* Full-bleed cards on phone */
.card-grid { gap: var(--space-3); }
/* Subfooter */
.subfooter { padding: var(--space-4) var(--space-2) 0; }
.subfooter-siblings { gap: var(--space-1); }
.subfooter-siblings a { padding: var(--space-2) var(--space-3); font-size: var(--text-xs); }
/* Footer sitemap tighter */
.footer-sitemap { padding: var(--space-4) var(--space-3); }
.footer-bottom { padding: var(--space-2) var(--space-3); }
}
/* ===== Layout ===== */
/* Page title bar — gray bar with centered white heading */
.page-title {
padding: var(--space-4) 0;
text-align: center;
background-color: #707070;
color: white;
[data-theme="dark"] & { background-color: #424242; }
& h1 { margin: 0 auto; max-width: var(--width-lg); font-weight: 700; font-size: clamp(22px, 2vw + 16px, 30px); letter-spacing: 0.06em; text-transform: uppercase; padding: 0 var(--space-3); }
& .page-title-byline { color: color-mix(in srgb, white 55%, transparent); margin: var(--space-1) 0 0; line-height: 1; letter-spacing: 0.12em; }
@media (max-width: 480px) { padding: var(--space-3) var(--space-2); & h1 { letter-spacing: 0.03em; } }
}
/* Feature page-title — just text, no box. Lives inside main, sits on main's
white background. Optional kicker above, big h1, optional deck below.
max-width matches the page's main content so the heading aligns with cards
below (not flush to the panel edge while content sits inset). */
.page-title-feature {
max-width: var(--width-content);
margin-left: auto;
margin-right: auto;
padding: var(--space-6) var(--space-6) var(--space-5);
text-align: left;
background: none;
border: none;
/* Pages whose body is wrapped in .prose (720px) — match it so the header
aligns with the body text/cards rather than sitting wider or narrower. */
.page-about &,
.page-indicators &,
.page-gdpm &,
.page-weo &,
.page-calendar &,
.page-chartbook &,
.page-blsapi &, .page-beaapi &, .page-censusapi &, .page-censusapi2 &,
.page-cps &, .page-getstarted &, .page-treasuryapi &,
.page-imfapi1 &, .page-imfapi2 &, .page-imfapi3 & { max-width: var(--width-lg); }
& .page-title-kicker {
margin: 0 0 var(--space-2);
font-family: var(--font-accent);
font-weight: 700;
font-size: var(--text-xs);
letter-spacing: 0.16em;
text-transform: uppercase;
color: var(--accent-strong, var(--accent));
/* In dark mode the kicker sits on the #424242 page-title bar; the
light-mode accent colors don't pass 4.5:1 there. Brighten by mixing
with white so all accents read clearly. */
[data-theme="dark"] & { color: color-mix(in srgb, var(--accent) 55%, white); }
}
& h1 {
margin: 0;
font-size: clamp(28px, 1.5vw + 16px, 38px); /* middle ground between 44 (too loud) and 33 (too tame) */
font-weight: 800;
letter-spacing: -0.02em;
text-transform: none;
max-width: none;
line-height: 1.1;
text-align: left;
color: var(--color-text-strong);
}
& .page-title-deck {
max-width: var(--width-lg);
margin: var(--space-3) 0 0;
padding: 0;
font-size: var(--text-base);
color: var(--color-text);
line-height: 1.5;
}
}
/* Footer styling */
footer {
background: var(--color-surface);
border: var(--elevation-border);
border-top: none;
position: relative;
&::before { content: ''; position: absolute; top: 0; left: 5%; width: 90%; border-top: 2px solid var(--color-border-light); }
}
.footer-sitemap {
display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5);
max-width: var(--width-lg); margin: 0 auto; padding: var(--space-6) var(--space-5) var(--space-4);
/* Footer column titles use <h2> (was <h4>) for heading-order a11y.
Visual styling stays small + uppercase to fit the footer compact pattern. */
& h2 {
font-family: var(--font-accent); font-size: var(--text-xs); font-weight: 700;
text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-text-strong);
margin: 0 0 var(--space-2);
& a { color: inherit; text-decoration: none; &:hover { text-decoration: underline; } }
}
& ul { list-style: none; margin: 0; padding: 0; }
& li { margin: 0; }
& a {
display: block; padding: var(--space-1) 0;
font-size: var(--text-sm); color: var(--color-text-muted); text-decoration: none;
&:hover { color: var(--color-text-strong); }
}
@media (max-width: 760px) { grid-template-columns: 1fr; gap: var(--space-4); padding: var(--space-5) var(--space-4); }
}
.footer-bottom {
display: flex; justify-content: space-between; align-items: flex-start;
padding: var(--space-3) var(--space-5) var(--space-2);
border-top: 1px solid var(--color-border-light);
}
.footer-left {
font-family: var(--font-accent); font-weight: 600; color: var(--color-text-muted);
& p { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.08em; }
}
.footer-right { text-align: right; }
.footer-right a {
display: inline-flex; align-items: center; justify-content: center;
min-width: 36px; min-height: 36px; padding: var(--space-2); margin: 1px;
text-decoration: none; font-size: var(--text-2xl); transition: var(--transition-normal);
color: var(--color-accent-red);
&:hover { color: var(--color-text-strong); }
}
/* Subfooter — sibling page navigation at bottom of tutorials */
.subfooter { max-width: var(--width-lg); margin: var(--space-6) auto 0; padding: var(--space-5) var(--space-3) 0; box-sizing: border-box; border-top: 2px solid var(--color-border-light); }
.subfooter-hub {
font-size: var(--text-sm); color: var(--color-text-muted); margin: 0 0 var(--space-2);
& a { text-decoration: none; color: var(--color-text-muted); &:hover { text-decoration: underline; } }
}
.subfooter-siblings {
display: flex; flex-wrap: wrap; gap: var(--space-2);
& a {
display: inline-block; padding: var(--space-2) var(--space-3);
border: 1px solid var(--color-border-light);
font-size: var(--text-sm); text-decoration: none; color: var(--color-text-strong);
transition: border-color var(--transition-fast), color var(--transition-fast);
&:hover { border-color: var(--color-link); color: var(--color-link); }
&.current { background: var(--accent-deep, var(--accent-strong, var(--accent, var(--color-card-blue)))); border-color: var(--accent-deep, var(--accent-strong, var(--accent, var(--color-card-blue)))); color: white; font-weight: 600; pointer-events: none; }
}
}
/* Section formatting */
section { margin: 0; padding: var(--space-5) 0 0; }
article:not(.prose) > :first-child { margin-top: 0; }
/* Side-by-side row — two items, stacks on mobile */
.split-row {
display: flex;
gap: var(--space-5);
align-items: flex-start;
@media (max-width: 760px) { flex-direction: column; }
}
/* Two .report-figure charts in a .split-row: both fixed at --width-sm, right one spills past prose. */
.split-row > .report-figure { flex: 0 0 var(--width-sm); margin: var(--space-6) 0 var(--space-7); }
/* ===== Report page components =====
Long-form report patterns used on pages with <article class="prose prose-report">.
Color accent comes from an ancestor .accent-{color} class (e.g. accent-teal on body). */
/* Report H2: magazine section heading with "Section NN" eyebrow + hairline top rule. */
.prose-report { counter-reset: h2-counter; }
.prose-report > h2 {
margin: var(--space-8) 0 var(--space-4);
padding-top: var(--space-5);
border-top: 1px solid var(--color-border-light);
font-size: clamp(28px, 2vw + 14px, 40px);
font-weight: 800;
letter-spacing: -0.01em;
line-height: 1.1;
}
.prose-report > h2::before {
content: 'Section ' counter(h2-counter, decimal-leading-zero);
counter-increment: h2-counter;
display: block;
margin-bottom: var(--space-2);
font-family: var(--font-accent);
font-size: var(--text-xs);
font-weight: 700;
letter-spacing: 0.22em;
text-transform: uppercase;
color: var(--accent, var(--color-text-muted));
}
/* Report H3: closer in scale to H2, with short accent underline. */
.prose-report > h3 {
margin: var(--space-6) 0 var(--space-3);
font-size: var(--text-3xl);
font-weight: 700;
color: var(--color-text-strong);
}
.prose-report > h3::after {
content: '';
display: block;
width: 32px; height: 2px;
background: var(--accent, var(--color-text-muted));
margin-top: var(--space-2);
}
/* Report hero — full-width photo with overlay title, kicker, byline, meta. */
.report-hero {
position: relative;
margin: 0 auto;
max-width: var(--width-page);
overflow: hidden;
}
.report-hero-photo { margin: 0; max-width: none; }
.report-hero-photo img { display: block; width: 100%; height: auto; }
.report-hero::before {
content: '';
position: absolute; top: 0; left: 0; right: 0; height: 80px;
background: linear-gradient(to bottom, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0) 100%);
pointer-events: none;
}
.report-hero::after {
content: '';
position: absolute; bottom: 0; left: 0; right: 0; height: 70%;
background: linear-gradient(to top,
rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.74) 10%,
rgba(0,0,0,0.60) 22%, rgba(0,0,0,0.44) 36%,
rgba(0,0,0,0.28) 52%, rgba(0,0,0,0.15) 70%,
rgba(0,0,0,0.06) 85%, rgba(0,0,0,0) 100%);
pointer-events: none;
}
.report-hero-kicker {
position: absolute; top: var(--space-4); left: var(--space-5);
margin: 0;
padding: 6px 12px;
font-family: var(--font-accent);
font-size: var(--text-xs);
font-weight: 700;
letter-spacing: 0.22em;
text-transform: uppercase;
color: #fff;
background: var(--accent, var(--color-text-muted));
line-height: 1;
z-index: 1;
}
.report-hero-title {
position: absolute; left: var(--space-5); right: var(--space-5); bottom: var(--space-4);
color: #fff;
z-index: 1;
& h1 {
margin: 0;
font-size: clamp(38px, 5.4vw + 4px, 76px);
font-weight: 800;
letter-spacing: -0.01em;
line-height: 1.0;
color: #fff;
max-width: var(--width-lg);
}
& .report-hero-deck {
margin: var(--space-4) 0 0;
font-family: Georgia, 'Iowan Old Style', 'Times New Roman', serif;
font-size: clamp(18px, 1vw + 11px, 24px);
font-style: italic;
font-weight: 400;
line-height: 1.35;
color: rgba(255,255,255,0.94);
max-width: 600px;
}
& .report-hero-byline {
margin: var(--space-4) 0 0;
font-family: var(--font-accent);
font-size: var(--text-sm);
letter-spacing: 0.16em;
text-transform: uppercase;
color: rgba(255,255,255,0.78);
}
}
.report-hero-meta {
position: absolute; top: var(--space-4); right: var(--space-5);
margin: 0;
font-family: var(--font-accent);
font-size: var(--text-xs);
font-weight: 600;
letter-spacing: 0.16em;
text-transform: uppercase;
color: rgba(255,255,255,0.85);
z-index: 1;
}
@media (max-width: 600px) {
.report-hero-meta { display: none; }
}
@media (max-width: 480px) {
.report-hero-kicker { left: var(--space-3); letter-spacing: 0.12em; padding: 5px 9px; }
.report-hero-title { left: var(--space-3); right: var(--space-3); bottom: var(--space-3); }
}
/* Report abstract — italic serif lede paragraph. */
.report-abstract {
font-family: Georgia, 'Iowan Old Style', 'Times New Roman', serif;
font-size: clamp(19px, 0.6vw + 16px, 23px);
line-height: 1.5;
color: var(--color-text);
margin: var(--space-7) 0 var(--space-6);
font-style: italic;
}
/* Report TOC — accent-bordered card, column-first ordered list. */
.report-toc {
/* height: auto overrides site-wide mobile `nav { height: 50px }` rule */
height: auto;
margin: var(--space-6) 0 var(--space-7);
padding: var(--space-4) var(--space-5);
background: var(--color-bg-highlight);
border-left: 4px solid var(--accent, var(--color-text-muted));
& .report-toc-label {
margin: 0 0 var(--space-3);
font-family: var(--font-accent);
font-size: var(--text-xs);
font-weight: 700;
letter-spacing: 0.20em;
text-transform: uppercase;
color: var(--accent, var(--color-text-muted));
}
& ol {
list-style: none; padding: 0; margin: 0;
counter-reset: toc;
display: grid;
grid-template-rows: repeat(4, auto);
grid-auto-flow: column;
gap: var(--space-2) var(--space-5);
}
@media (max-width: 600px) {
& ol { grid-auto-flow: row; grid-template-rows: auto; grid-template-columns: 1fr; }
}
& li { counter-increment: toc; margin: 0; }
& li a {
display: block;
padding: var(--space-1) 0;
font-size: var(--text-base);
text-decoration: none;
color: var(--color-text);
border-bottom: 1px solid transparent;
&:hover { color: var(--accent, var(--color-text-muted)); border-bottom-color: var(--accent, var(--color-text-muted)); }
}
& li a::before {
content: counter(toc, decimal-leading-zero);
display: inline-block;
width: 36px;
font-family: var(--font-accent);
font-size: var(--text-xs);
font-weight: 700;
letter-spacing: 0.08em;
color: var(--accent, var(--color-text-muted));
}
}
/* Report figure — chart or photo wrapped in a .card with figcaption. */
.report-figure {
max-width: var(--width-sm);
margin: var(--space-6) auto var(--space-7);
& .card { margin: 0; }
& .card-body h3 { font-size: var(--text-2xl); margin-bottom: 4px; }
& .card-body .chart-subtitle { font-size: var(--text-base); margin-bottom: 4px; }
& .chart-source { font-size: var(--text-sm); }
& figcaption { font-size: var(--text-sm); }
& img { height: auto; }
}
/* Tight footer inside report-figure — beats .card-compact.card-chart .card-footer (0,3,0). */
.report-figure .card.card-compact .card-footer { padding-bottom: 6px; }
/* Photo figure modifier — image fills card edge to edge.
Extra class selector beats .card-compact.card-chart .card-body (specificity 0,3,0). */
.report-figure-photo .card.card-compact .card-body { padding: 0; }
.report-figure-photo .card.card-compact .card-body img { width: 100%; display: block; }
/* Width modifiers for wider chart figures (default is --width-sm). */
.report-figure-md { max-width: var(--width-md); }
.report-figure-lg { max-width: var(--width-lg); }
/* Report-scoped break-out: narrow text column paired with a side figure (chart or image).
Escapes the .prose max-width so the pair can breathe wider than the article column.
Place OUTSIDE <article class="prose">; wraps text in .report-split-text + a <figure>. */
.report-split {
max-width: var(--width-xl);
margin: var(--space-6) auto var(--space-7);
padding: 0 var(--space-3) 0 calc((var(--width-xl) - var(--width-lg)) / 2 + var(--space-3));
box-sizing: border-box;
display: flex;
flex-wrap: wrap;
gap: 60px;
justify-content: flex-start;
align-items: center;
& .report-split-text { flex: 0 1 340px; max-width: 340px; min-width: 0; }
& > figure, & .report-figure { margin: 0; }
@media (max-width: 760px) {
flex-direction: column;
align-items: stretch;
padding: 0 var(--space-3);
& .report-split-text { flex-basis: auto; max-width: none; }
}
}
/* Comparison table — small 2- or 3-column side-by-side comparison.
Use <caption> for the title. Pair with .flag-img for flag-image headers. */
.compare-table {