-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
3462 lines (3374 loc) · 291 KB
/
Copy pathindex.html
File metadata and controls
3462 lines (3374 loc) · 291 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="Cache-Control" content="no-store" />
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
<title>GEO The Kalshi Weather Bot (DEMO)</title>
<!-- Progressive Web App: lets iOS Safari "Add to Home Screen" install
this as a standalone app with our icon, no browser chrome. -->
<link rel="manifest" href="manifest.json" />
<link rel="apple-touch-icon" href="apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="192x192" href="icon-192.png" />
<link rel="icon" type="image/png" sizes="512x512" href="icon-512.png" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="apple-mobile-web-app-title" content="GEO" />
<!-- theme-color paints the Safari URL/tab/bookmarks chrome so the GEO
brand visually extends UP through the entire browser top — Redbubble
pulls the same trick with their purple. We use the SAME saturated
navy in light AND dark mode (Redbubble does the same with their
purple) — letting dark mode fall back to a near-neutral like #0d1a36
produces a band so close to Safari's default dark toolbar that the
tint is imperceptible. #1a4380 is GEO's brand navy (also
--refresh-color, --footer-link); vivid enough that Safari renders a
clear band in both modes. -->
<meta id="meta-theme-color" name="theme-color" content="#1a4380" />
<!-- Theme bootstrap — runs before the stylesheet is applied so the
dark-mode CSS variables are active by the time the page paints. Avoids
a "flash of light theme" on reload for users who picked dark. -->
<!-- Theme defaults to light. The toggle button flips to dark and the
choice is persisted to localStorage so reloads keep the same theme. -->
<script>
// Inline + synchronous: must run before <style> evaluates so dark
// CSS vars apply on first paint instead of after a light flash.
// Also pre-syncs the dynamic theme-color meta tag so the Safari URL bar
// tints to match the sticky header on first paint (no flash of brand-navy
// over a light-mode page).
try {
var __geoDark = localStorage.getItem('geo-theme') === 'dark';
if (__geoDark) {
document.documentElement.setAttribute('data-theme', 'dark');
}
// Theme-color stays fixed at GEO brand navy in BOTH modes — same
// strategy as Redbubble's purple. A dark-matching fallback like
// #0d1a36 is too close to Safari's default dark toolbar to read as
// an intentional brand band. Left in place in case we ever want
// per-mode tints again.
var __metaTC = document.getElementById('meta-theme-color');
if (__metaTC) __metaTC.setAttribute('content', '#1a4380');
} catch (e) { /* localStorage blocked — fall back to light */ }
</script>
<style>
:root {
color-scheme: light;
/* Themed color tokens — light mode defaults. Dark overrides below in
:root[data-theme="dark"]. The key insight: only invert "page surface"
colors (bg, text, card chrome, table chrome). Pill accents and
brand colors stay similar and just get tweaked for legibility. */
--bg-start: #dceeff;
--bg-end: #b6d8f7;
--text-main: #1a1a1a;
--text-title: #0c234e;
--text-tagline: rgba(12, 35, 78, 0.78);
--text-secondary: #666;
--text-muted: #999;
--card-bg: rgba(255, 255, 255, 0.86);
--card-border: rgba(255, 255, 255, 0.5);
--card-shadow: 0 1px 2px rgba(12, 35, 78, 0.06), 0 8px 20px rgba(12, 35, 78, 0.08);
--card-shadow-hover: 0 1px 2px rgba(12, 35, 78, 0.06), 0 12px 28px rgba(12, 35, 78, 0.12);
--card-title-color: rgba(12, 35, 78, 0.55);
--card-title-border: rgba(12, 35, 78, 0.12);
--section-header-color: rgba(12, 35, 78, 0.7);
--section-line: rgba(12, 35, 78, 0.15);
--table-th-color: #666;
--table-th-border: #e3e3e3;
--table-td-border: #f3f3f3;
--table-th-sticky-bg: rgba(255, 255, 255, 0.96);
--footer-color: rgba(12, 35, 78, 0.7);
--footer-line: rgba(12, 35, 78, 0.12);
--footer-link: #1a4380;
--footer-link-border: rgba(26, 67, 128, 0.25);
--pos-color: #1f7a3a;
--neg-color: #b3261e;
--code-bg: #f3f3f3;
--chart-axis: #888;
--chart-grid: rgba(12, 35, 78, 0.08);
--chart-zero: #ccc;
--chart-tip-bg: rgba(12, 35, 78, 0.95);
--chart-tip-fg: #fff;
--refresh-bg: rgba(255, 255, 255, 0.9);
--refresh-bg-hover: #fff;
--refresh-bg-active: #eaf2ff;
--refresh-border: rgba(26, 67, 128, 0.15);
--refresh-color: #1a4380;
--pill-tip-pos: #7fdfa1;
--pill-tip-neg: #ffa1a1;
/* Sticky title bar background — semi-transparent so the bg gradient
still shows through but readable, paired with backdrop blur. */
/* Bar uses a top-to-bottom gradient: nearly solid up top so the title
reads cleanly, fading toward translucent at the bottom so clouds in
the side gutters can scroll UP through the bar instead of getting
hard-clipped at the lower edge. The bar's tint is a SHADE darker
than the page bg (#dceeff = rgb(220,238,255)) — earlier we matched
page bg exactly, which made the bar visually disappear on mobile in
light mode (only the cloud decorations defined its edges, so the
full-bleed bar read as a constrained-width chip). The 1px rim
shadow + soft drop shadow then gives a clean bottom edge so the bar
reads as a real top bar even when the bar tint is subtle. */
--sticky-title-bg: linear-gradient(180deg, rgba(190, 220, 250, 0.92) 0%, rgba(190, 220, 250, 0.88) 55%, rgba(190, 220, 250, 0.55) 100%);
--sticky-title-shadow: 0 4px 0 rgba(12, 35, 78, 0.10), 0 8px 18px rgba(12, 35, 78, 0.18);
}
:root[data-theme="dark"] {
color-scheme: dark;
--bg-start: #0d1a36;
--bg-end: #060c1f;
--text-main: #e3eaf6;
--text-title: #f5f9ff;
--text-tagline: rgba(229, 236, 247, 0.78);
--text-secondary: #9ba8bd;
--text-muted: #687389;
--card-bg: rgba(22, 36, 64, 0.78);
--card-border: rgba(255, 255, 255, 0.06);
--card-shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 8px 22px rgba(0, 0, 0, 0.45);
--card-shadow-hover: 0 1px 2px rgba(0, 0, 0, 0.4), 0 14px 32px rgba(0, 0, 0, 0.55);
--card-title-color: rgba(229, 236, 247, 0.55);
--card-title-border: rgba(255, 255, 255, 0.1);
--section-header-color: rgba(229, 236, 247, 0.7);
--section-line: rgba(229, 236, 247, 0.15);
--table-th-color: #9ba8bd;
--table-th-border: rgba(255, 255, 255, 0.12);
--table-td-border: rgba(255, 255, 255, 0.06);
--table-th-sticky-bg: rgba(22, 36, 64, 0.96);
--footer-color: rgba(229, 236, 247, 0.65);
--footer-line: rgba(229, 236, 247, 0.12);
--footer-link: #7fb1ff;
--footer-link-border: rgba(127, 177, 255, 0.3);
--pos-color: #4fd16f;
--neg-color: #ff7a7a;
--code-bg: rgba(255, 255, 255, 0.08);
--chart-axis: #8ea0bf;
--chart-grid: rgba(229, 236, 247, 0.08);
--chart-zero: rgba(229, 236, 247, 0.25);
--chart-tip-bg: rgba(245, 249, 255, 0.96);
--chart-tip-fg: #0c234e;
--refresh-bg: rgba(255, 255, 255, 0.08);
--refresh-bg-hover: rgba(255, 255, 255, 0.16);
--refresh-bg-active: rgba(127, 177, 255, 0.25);
--refresh-border: rgba(255, 255, 255, 0.12);
--refresh-color: #c8d8f5;
--pill-tip-pos: #4fd16f;
--pill-tip-neg: #ff7a7a;
--sticky-title-bg: linear-gradient(180deg, rgba(13, 26, 54, 0.92) 0%, rgba(13, 26, 54, 0.92) 55%, rgba(13, 26, 54, 0.55) 100%);
--sticky-title-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}
* { box-sizing: border-box; }
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
/* Sky-blue gradient — slightly deeper at the bottom so cards "float"
against it. background-attachment: fixed keeps the gradient still
while content scrolls. Themed via --bg-start / --bg-end. */
background: linear-gradient(180deg, var(--bg-start) 0%, var(--bg-end) 100%);
background-attachment: fixed;
color: var(--text-main); margin: 0; padding: 16px;
font-size: 13px; line-height: 1.5;
transition: background 220ms ease, color 220ms ease;
/* position: relative anchors the absolutely-positioned cloud gutters
to the full document height so they scroll with content rather than
staying glued to the viewport. min-height: 100vh ensures the gutters
still have a viewport's worth of clouds on short-content pages. */
position: relative;
min-height: 100vh;
}
/* Centered stack: refresh button on top, title centered below, health
badge centered under that. The whole header is itself centered in
the page. */
.header {
display: flex; flex-direction: column; align-items: center;
gap: 10px; margin-bottom: 14px; text-align: center;
}
h1 { margin: 0; color: var(--text-title); line-height: 1; }
/* Stacked title layout: "GEO" + icon on top, tagline beneath as a
subtitle. The whole h1 is one item inside the column-flex .header,
so refresh button + health badge continue stacking below. */
.title-block {
display: flex; flex-direction: column; align-items: center;
gap: 6px;
}
.title-main {
display: flex; flex-direction: row; align-items: center;
gap: 14px;
}
/* "GEO" — the brand mark. Big, tight letter-spacing so it reads as a
wordmark instead of just bigger text. */
.title-block .brand {
font-size: 84px;
font-weight: 800;
letter-spacing: -2.2px;
line-height: 1;
}
/* Tagline — meaningfully smaller so the visual hierarchy is "GEO" first,
"what GEO is" second. Slightly lower weight + slight transparency to
defer to the brand mark. */
.title-block .title-sub {
font-size: 28px;
font-weight: 600;
letter-spacing: -0.4px;
color: var(--text-tagline);
line-height: 1.1;
}
/* Sticky title wrapper — pins the GEO wordmark to the top of the viewport
as the user scrolls down. Lives OUTSIDE .header so the buttons / health
badge / last-refreshed stamp scroll away normally; only the brand stays
pinned. Negative horizontal margin extends the bar edge-to-edge over
the body padding so the translucent backdrop reads as a real top bar
rather than a floating chip. backdrop-filter blur + semi-transparent
bg gives the iOS-style "frosted" look that fits the PWA aesthetic and
keeps the cloud gradient visible underneath. */
.sticky-title {
position: sticky;
top: 0;
z-index: 50;
margin: -16px -16px 14px -16px;
padding: 14px 16px 12px 16px;
background: var(--sticky-title-bg);
backdrop-filter: blur(14px) saturate(140%);
-webkit-backdrop-filter: blur(14px) saturate(140%);
box-shadow: var(--sticky-title-shadow);
text-align: center;
}
.sticky-title h1 { display: inline-flex; position: relative; z-index: 1; }
/* Decoration layer behind the title text. Two SVG/HTML layers stacked: a
drifting-cloud layer for light mode and a starfield layer for dark
mode. Theme rule below toggles which one renders. pointer-events:none
so the deco never intercepts clicks on the title or its parent. */
.sticky-title-deco {
position: absolute;
inset: 0;
overflow: hidden;
pointer-events: none;
z-index: 0;
}
.sticky-title-clouds { display: block; }
.sticky-title-stars { display: none; }
:root[data-theme="dark"] .sticky-title-clouds { display: none; }
:root[data-theme="dark"] .sticky-title-stars { display: block; }
/* Cloud bands drift L→R at varying speeds for parallax. translate range
starts off-screen left and ends past the right edge so clouds fade
into and out of the bar gently rather than popping at the boundary.
Each band has a different duration so they don't sync up; negative
animation-delay starts each band partway through its cycle so the
bar is never empty on first paint. opacity stays modest so clouds
never compete with the GEO wordmark. */
.sticky-title-clouds .cloud {
position: absolute;
will-change: transform;
}
/* Three speed tiers across the 14 clouds for parallax depth: 5 fast,
5 medium (1.6× slower), 4 slow (2.5× slower). All staggered via
animation-delay so adjacent clouds don't sync up at the same point
in their drift cycle. */
/* Fast tier (~50–90s per drift) */
.sticky-title-clouds .cloud-a { animation: geo-cloud-drift 60s linear infinite; }
.sticky-title-clouds .cloud-b { animation: geo-cloud-drift 80s linear infinite; animation-delay: -27s; }
.sticky-title-clouds .cloud-c { animation: geo-cloud-drift 50s linear infinite; animation-delay: -17s; }
.sticky-title-clouds .cloud-d { animation: geo-cloud-drift 92s linear infinite; animation-delay: -40s; }
.sticky-title-clouds .cloud-e { animation: geo-cloud-drift 70s linear infinite; animation-delay: -33s; }
/* Medium tier (~80–145s per drift) */
.sticky-title-clouds .cloud-am { animation: geo-cloud-drift 96s linear infinite; animation-delay: -8s; }
.sticky-title-clouds .cloud-bm { animation: geo-cloud-drift 128s linear infinite; animation-delay: -50s; }
.sticky-title-clouds .cloud-cm { animation: geo-cloud-drift 80s linear infinite; animation-delay: -22s; }
.sticky-title-clouds .cloud-dm { animation: geo-cloud-drift 147s linear infinite; animation-delay: -68s; }
.sticky-title-clouds .cloud-em { animation: geo-cloud-drift 112s linear infinite; animation-delay: -42s; }
/* Slow tier (~125–230s per drift) — these are the "distant" clouds */
.sticky-title-clouds .cloud-as { animation: geo-cloud-drift 150s linear infinite; animation-delay: -25s; }
.sticky-title-clouds .cloud-bs { animation: geo-cloud-drift 200s linear infinite; animation-delay: -80s; }
.sticky-title-clouds .cloud-cs { animation: geo-cloud-drift 125s linear infinite; animation-delay: -55s; }
.sticky-title-clouds .cloud-ds { animation: geo-cloud-drift 230s linear infinite; animation-delay: -110s; }
/* Drift loop: ±110vw range guarantees that every cloud — regardless of
its `left` anchor (4% to 96%) — starts and ends fully off-screen, so
the keyframe loop reset is never visible (no "cloud disappearing in
mid-air"). Tradeoff: each cloud is off-screen for ~half the cycle,
but with 14 clouds the bar still reads as continuously populated. */
@keyframes geo-cloud-drift {
0% { transform: translateX(-110vw); }
100% { transform: translateX(110vw); }
}
/* Dark-mode starfield. Mostly static so the bar doesn't feel busy at
night; ~5 stars get a slow opacity twinkle, staggered via per-element
animation-delay so the twinkles don't pulse in unison. */
.sticky-title-stars .star {
position: absolute;
width: 2px; height: 2px;
border-radius: 50%;
background: rgba(255, 255, 255, 0.85);
}
.sticky-title-stars .star.dim { background: rgba(255, 255, 255, 0.45); }
.sticky-title-stars .star.bright { background: rgba(255, 255, 255, 1); width: 2.5px; height: 2.5px; }
.sticky-title-stars .star.twinkle { animation: geo-twinkle 6s ease-in-out infinite; }
@keyframes geo-twinkle {
0%, 100% { opacity: 0.95; }
50% { opacity: 0.30; }
}
/* Open-exposure pulse dot — sits inline in the title row right after
the thermometer icon. Green + expanding-ring pulse when the bot has
open positions, gray + static when in cash. The ring is a CSS
box-shadow keyframe (no extra DOM), and prefers-reduced-motion below
respects users who don't want the heartbeat. */
.geo-pulse {
width: 10px; height: 10px;
border-radius: 50%;
background: var(--text-tagline);
flex-shrink: 0;
align-self: center;
margin-left: 2px;
opacity: 0.45;
transition: background 220ms ease, opacity 220ms ease;
}
.geo-pulse[data-state="active"] {
background: var(--pos-color);
opacity: 1;
animation: geo-pulse-ring 1.9s ease-out infinite;
}
@keyframes geo-pulse-ring {
0% { box-shadow: 0 0 0 0 rgba(31, 122, 58, 0.55); }
70% { box-shadow: 0 0 0 11px rgba(31, 122, 58, 0); }
100% { box-shadow: 0 0 0 0 rgba(31, 122, 58, 0); }
}
:root[data-theme="dark"] .geo-pulse[data-state="active"] {
animation-name: geo-pulse-ring-dark;
}
/* Pulse + label group. Absolutely positioned to the right of the
title-main row so it doesn't count toward the row's flex layout
width. We then nudge the WHOLE title-main left by ~12px (half the
dot's visible reach) so the visible cluster's optical center —
including the dot the eye perceives — aligns with the tagline below.
The label is hidden by default and fades in only on hover. */
.title-main { position: relative; transform: translateX(-12px); }
.geo-pulse-group {
position: absolute;
left: 100%;
top: 50%;
transform: translateY(-50%);
margin-left: 14px;
display: inline-flex;
align-items: center;
}
.geo-pulse-label {
position: absolute;
left: 100%;
top: 50%;
transform: translateY(-50%);
font-size: 12px;
font-weight: 500;
color: var(--text-tagline);
margin-left: 6px;
letter-spacing: 0.1px;
white-space: nowrap;
opacity: 0;
transition: opacity 180ms ease;
pointer-events: none;
}
.geo-pulse-group:hover .geo-pulse-label { opacity: 1; }
@keyframes geo-pulse-ring-dark {
0% { box-shadow: 0 0 0 0 rgba(79, 209, 111, 0.55); }
70% { box-shadow: 0 0 0 11px rgba(79, 209, 111, 0); }
100% { box-shadow: 0 0 0 0 rgba(79, 209, 111, 0); }
}
/* Note: deliberately NOT honoring prefers-reduced-motion for the title
bar's drift/twinkle/pulse. The motion is the entire point of these
decorations — without it, the bar reads as a static brand mark and
loses its "live trading product" feel. Aaron has reduced-motion on
at the OS level for unrelated reasons; the bar opts back in. */
.app-icon {
width: 60px; height: 60px;
border-radius: 22%; /* iOS-style "squircle" — matches Add-to-Home-Screen visual */
box-shadow: 0 2px 8px rgba(12, 35, 78, 0.22);
flex-shrink: 0; /* never let the icon squish if the title wraps */
}
.subtitle { font-size: 11px; color: var(--text-tagline); }
/* The health badge sits on its own line right under the title. */
.health-line { display: block; }
/* "Last refreshed" stamp — quiet, sits under the health badge. */
.last-refreshed { font-size: 11px; color: var(--text-tagline); opacity: 0.85; }
/* Page footer — credit line + tech-stack stamp. Sits below the card
grid with breathing room so it reads as a separate signature block. */
.page-footer {
text-align: center;
margin: 32px auto 12px auto;
padding: 18px 12px 6px 12px;
color: var(--footer-color);
border-top: 1px solid var(--footer-line);
max-width: 720px;
}
.footer-line { font-size: 13px; letter-spacing: 0.2px; margin-bottom: 4px; }
.footer-link { color: var(--footer-link); text-decoration: none; border-bottom: 1px solid var(--footer-link-border); transition: border-color 120ms ease; }
.footer-link:hover { border-bottom-color: var(--footer-link); }
.footer-line strong { font-weight: 700; color: var(--text-title); }
.footer-tech { font-size: 11px; color: var(--footer-color); opacity: 0.8; line-height: 1.6; }
.footer-quiet { font-size: 10px; color: var(--footer-color); opacity: 0.65; margin-top: 2px; font-style: italic; }
/* Page layout is now sectioned: an outer grid of single-column rows
(one per section header + one per card-row), with each card-row
itself a centered flexbox. This guarantees the cards in EVERY
section are centered in the viewport, instead of relying on the
grid's auto-fit math (which only centers when columns happen to cap
before consuming all available width). */
.grid {
display: grid;
grid-template-columns: 1fr;
gap: 18px;
margin-top: 14px;
}
.section-row {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 18px;
}
.section-row .card {
flex: 0 1 440px;
min-width: 320px;
}
/* "Wide" cards (open positions table, resting orders, P&L chart, etc.)
keep their inline `grid-column: span 2` style — we re-target it via
attribute selector to give them a 2x flex-basis under the new flex
layout. */
.section-row .card[style*="span 2"] {
flex: 0 1 900px;
min-width: 320px;
max-width: 100%;
}
/* Section dividers — break the wall-of-cards into thematic groups so the
eye has somewhere to land. Spans the full grid width (1 / -1). The
fading rules on BOTH sides center the label visually so each section
reads as its own anchored block. */
.section-header {
grid-column: 1 / -1;
display: flex; align-items: center; gap: 14px;
font-size: 14px; font-weight: 700;
letter-spacing: 1.6px; text-transform: uppercase;
color: var(--section-header-color);
margin: 18px 0 -4px 0;
padding: 6px 6px 4px 6px;
text-align: center;
}
.section-header::before, .section-header::after {
content: ""; flex: 1; height: 1px;
}
.section-header::before {
background: linear-gradient(to left, var(--section-line), transparent);
}
.section-header::after {
background: linear-gradient(to right, var(--section-line), transparent);
}
.section-header:first-child { margin-top: 0; }
/* Section <details> wrapper — let the user collapse whole sections to
reduce density. The <summary> IS the section header. Default open. */
.dash-section > summary { list-style: none; cursor: pointer; user-select: none; }
.dash-section > summary::-webkit-details-marker { display: none; }
.dash-section > summary:hover { color: var(--text-title); }
/* When collapsed, drop the bottom margin since there's no content under it */
.dash-section:not([open]) > .section-header { margin-bottom: 0; }
.section-label {
display: inline-flex; align-items: center; gap: 12px;
white-space: nowrap;
}
.section-chevron {
display: inline-block;
transition: transform 200ms ease;
opacity: 0.85;
font-size: 1.15em;
font-weight: 700;
color: var(--text-title);
}
/* Collapsed state: chevrons point inward (toward each other) so the row
reads like "> TITLE <" — signaling "click to expand outward". Open
state: both point down (rotate 0). */
.dash-section:not([open]) .section-label > .section-chevron:first-child { transform: rotate(-90deg); }
.dash-section:not([open]) .section-label > .section-chevron:last-child { transform: rotate(90deg); }
/* Inside details, .section-row needs its own vertical margin so successive
rows don't smoosh together (the grid gap doesn't apply inside details) */
.dash-section > .section-row { margin-bottom: 18px; }
.dash-section > .section-row:last-of-type { margin-bottom: 0; }
/* sectionLocked() — demo build only. Same header height as section() so
the layout is unchanged, but with a lock icon, a "redacted in demo"
pill, and no clickable chevrons (cursor: default, pointer-events:
none). The card area below it is empty by design — the data has also
been stripped from window.DATA at the data-feed layer. */
.dash-section-locked {
margin: 0 0 18px 0;
border: 1px dashed var(--border, #d1d5db);
border-radius: 8px;
background: rgba(0, 0, 0, 0.02);
}
.section-header-locked {
cursor: default;
user-select: none;
padding: 14px 16px;
margin-bottom: 0;
opacity: 0.7;
}
.section-chevron-locked {
font-size: 1em;
margin-right: 4px;
color: var(--text-muted, #6b7280);
}
.section-locked-pill {
display: inline-block;
margin-left: 12px;
padding: 2px 9px;
font-size: 11px;
font-weight: 600;
letter-spacing: 0.04em;
text-transform: uppercase;
color: #f1faee;
background: #457b9d;
border-radius: 4px;
vertical-align: middle;
}
/* Center the title and primary metric content inside each card so the
page reads symmetrically. Tables stay left-aligned (with .numeric
overrides for right-alignment) because data scans better that way,
and .help paragraphs stay left-aligned because centered paragraphs
read poorly. */
.card-title { text-align: center; }
.card > .big-number { text-align: center; }
.card > .sub-stat { text-align: center; }
.kpi-row > div { text-align: center; }
/* min-width: 0 is the canonical fix for "grid items overflow their track":
without it, a wide child (an 8-col table) forces the column to be its
min-content width — pushing content off-screen on phones. With it, the
child gets clamped to the column width and its own .table-scroll
wrapper takes over for horizontal scroll. */
.card {
background: var(--card-bg);
backdrop-filter: saturate(180%) blur(14px);
-webkit-backdrop-filter: saturate(180%) blur(14px);
border: 1px solid var(--card-border);
border-radius: 16px;
padding: 18px 20px;
box-shadow: var(--card-shadow);
min-width: 0;
transition: transform 180ms ease, box-shadow 180ms ease, background 220ms ease, border-color 220ms ease;
}
/* Subtle lift on hover/focus — gives the page a hint of interactivity
without being distracting. Disabled on touch via @hover query. */
@media (hover: hover) {
/* Cartoon-style hover: card lifts up-left and the offset shadow grows
to match — same visual language as the pills + round buttons.
Soft fallback shadow stays under the cartoon offset for a touch of
depth without flattening the page. */
.card:hover {
transform: translate(-2px, -2px);
box-shadow: 4px 4px 0 rgba(12, 35, 78, 0.12), var(--card-shadow-hover);
}
:root[data-theme="dark"] .card:hover {
box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5), var(--card-shadow-hover);
}
}
.card-title {
font-size: 11px; font-weight: 700;
color: var(--card-title-color);
letter-spacing: 0.6px; text-transform: uppercase;
/* position:relative lets the trade-mode-toggle pin itself to the
card's left edge while the title text stays centered. Only the
Watch List card uses this — every other .card-title has no
absolute-positioned children, so this is a no-op for them. */
position: relative;
/* Pull the title up so the visual space above the text equals the
space below it (between text and the divider line). The card has
18px top-padding; with line-height: 1 (no implicit line-box buffer)
and margin-top: -7px, the gap above the text matches the 8px
padding-bottom below. -10px overshot — text sat slightly high. */
line-height: 1;
margin: -7px 0 12px 0; padding-bottom: 8px;
border-bottom: 1px solid var(--card-title-border);
}
/* About card — editorial / intro tile that reads as prose. Collapsible
<details> element. Collapsed: shows just the summary as a slim click
target. Expanded: shows the full prose with looser leading. Overrides
the global .card { text-align: center }. */
.about-card { text-align: left; padding: 0; line-height: 1.65; font-size: 14px; }
.about-summary {
list-style: none; /* hide default disclosure triangle */
cursor: pointer;
padding: 10px 18px;
font-size: 13px;
color: var(--text-tagline);
text-align: center;
user-select: none;
transition: background 120ms ease;
border-radius: 16px; /* match card border radius when collapsed */
}
.about-summary::-webkit-details-marker { display: none; }
.about-summary:hover { background: rgba(12, 35, 78, 0.04); }
:root[data-theme="dark"] .about-summary:hover { background: rgba(255, 255, 255, 0.04); }
/* When the <details> is open, restyle the summary as a top-banner */
.about-card[open] .about-summary {
border-bottom: 1px solid var(--card-title-border);
border-radius: 16px 16px 0 0;
padding-bottom: 14px;
}
.about-body { padding: 18px 26px 22px 26px; }
.about-card p { margin: 0 0 12px 0; }
.about-card p:last-child { margin-bottom: 0; }
.about-card .about-lead { font-size: 15px; }
.about-card strong { color: var(--text-title); font-weight: 700; }
/* Roadmap card — two-column "Recently shipped | Planned" grid, with a
stat row of counts above and a collapsible Backlog teaser below. */
.roadmap-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 24px;
text-align: left;
}
@media (max-width: 720px) { .roadmap-grid { grid-template-columns: 1fr; gap: 16px; } }
.roadmap-col-title {
font-size: 11px; font-weight: 700;
color: var(--card-title-color);
letter-spacing: 0.6px; text-transform: uppercase;
margin-bottom: 8px; padding-bottom: 4px;
border-bottom: 1px solid var(--card-title-border);
}
.roadmap-table { font-size: 12px; }
.roadmap-table td { border-bottom: 1px solid var(--table-td-border); padding: 6px 0; }
.roadmap-table tr:last-child td { border-bottom: none; }
.roadmap-later summary { list-style: none; }
.roadmap-later summary::-webkit-details-marker { display: none; }
/* Stack the three collapsible lists with vertical breathing room */
.roadmap-collapsibles > details { margin-bottom: 10px; }
.roadmap-collapsibles > details:last-child { margin-bottom: 0; }
.roadmap-collapsibles > details > summary:hover { color: var(--text-title); }
.big-number { font-size: 36px; font-weight: 700; line-height: 1.1; letter-spacing: -0.6px; }
.big-number.pos { color: var(--pos-color); }
.big-number.neg { color: var(--neg-color); }
.big-number.neutral { color: var(--text-main); }
.sub-stat { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { text-align: left; font-weight: 600; color: var(--table-th-color); border-bottom: 1px solid var(--table-th-border); padding: 4px 6px 4px 0; font-size: 10px; letter-spacing: 0.4px; text-transform: uppercase; }
td { padding: 4px 6px 4px 0; vertical-align: top; border-bottom: 1px solid var(--table-td-border); }
td.numeric, th.numeric { text-align: right; }
td.mono, th.mono { font-family: "SF Mono", Menlo, Consolas, monospace; font-size: 11px; }
.pos { color: var(--pos-color); }
.neg { color: var(--neg-color); }
.muted { color: var(--text-muted); }
/* Cartoon-outline pills with original pastel backgrounds preserved. The
border + offset shadow give the cartoon look; the soft pastel fill is
the original color shading Aaron wanted to keep. Border + shadow
inherit from `color`, so each variant only sets bg + color. */
.pill {
display: inline-block;
padding: 2px 8px;
border-radius: 10px;
font-size: 10px;
font-weight: 700;
letter-spacing: 0.3px;
border: 1.6px solid currentColor;
box-shadow: 2px 2px 0 currentColor;
}
.pill-open { background: #e7f0fe; color: #1a4380; }
.pill-won, .pill-good, .pill-agree, .pill-ok { background: #d8edd8; color: #1f5e2c; }
.pill-lost, .pill-disagree, .pill-error, .pill-overdue { background: #f8dadb; color: #8d2422; }
.pill-warn, .pill-split, .pill-stale { background: #fff0c2; color: #806100; }
.pill-unknown { background: #eee; color: #666; }
/* Click-to-trade button that replaces the static "would trade" pill in
the watch-list verdict column. Light-blue palette (matches
.wl-refresh-btn) so it reads as a deliberate action surface and is
visually distinct from the green "good"/red "bad" verdict pills.
The disabled state covers in-flight clicks (the user already
submitted, we're waiting on the bot subprocess to spin up and
Telegram to fire). 2026-05-05: recolored from green to blue at
Aaron's request; green was too easily mistaken for a passive
"verdict" pill. */
/* Cartoon-outline action pill — outlined style with hover lift + active
press, on the original light-blue pastel bg. */
.pill-action { background: #e7f0fe; color: #1a4380; cursor: pointer;
border: 1.6px solid #1a4380; padding: 3px 10px;
font-family: inherit;
box-shadow: 2px 2px 0 #1a4380;
transition: transform 100ms ease, box-shadow 100ms ease; }
.pill-action:hover { background: #d0e0f6; transform: translate(-1px, -1px); box-shadow: 3px 3px 0 #1a4380; }
.pill-action:active { background: #b8d0ec; transform: translate(1px, 1px); box-shadow: 0 0 0 #1a4380; }
.pill-action[disabled] { background: #eee; color: #888; border-color: #ccc; box-shadow: 2px 2px 0 #ccc;
cursor: wait; transform: none; }
/* pill-action-direct is now visually identical to pill-action — Aaron
prefers a single color for both trade modes (the toggle text says
which one is armed). Kept as a class alias so existing JS
(setTradeMode) and tests don't need to change their semantics if
we ever want to re-differentiate in the future. */
.pill-action-direct { background: #e7f0fe; color: #1a4380; cursor: pointer;
border: 1.6px solid #1a4380; padding: 3px 10px;
font-family: inherit;
box-shadow: 2px 2px 0 #1a4380;
transition: transform 100ms ease, box-shadow 100ms ease; }
.pill-action-direct:hover { background: #d0e0f6; transform: translate(-1px, -1px); box-shadow: 3px 3px 0 #1a4380; }
.pill-action-direct:active { background: #b8d0ec; transform: translate(1px, 1px); box-shadow: 0 0 0 #1a4380; }
.pill-action-direct[disabled] { background: #eee; color: #888; border-color: #ccc; box-shadow: 2px 2px 0 #ccc;
cursor: wait; transform: none; }
/* Trade-mode toggle — segmented control at the top-left of the Watch
List card title. Two pills, only one visually "pressed" at a time.
Inactive pills are outlined-only (no fill, no shadow) so the active
state stands out at a glance. The toggle's state lives in
localStorage under `kalshi.trade_mode` and is applied to every
per-row trade button via setTradeMode(). Default is "telegram"
(the safe path); "direct" arms place-directly across all rows. */
/* Pinned to the card's left edge via absolute positioning; the title
text remains centered in its .card-title parent (which is now
position: relative). top: 50% + translateY centers the toggle
against the title text vertically. */
.trade-mode-toggle { display: inline-flex; flex-direction: row; gap: 0;
position: absolute; left: 0; top: 50%;
transform: translateY(calc(-50% - 4px));
border-radius: 6px; overflow: hidden; }
.trade-mode-toggle .mode-pill {
font-family: inherit; font-size: 11px; font-weight: 600;
padding: 3px 10px; cursor: pointer;
border: 1.6px solid #ccc; background: #f7f7f7; color: #777;
box-shadow: none;
/* font-size + padding included so the size shift between active /
inactive animates smoothly when the toggle is flipped. */
transition: background 100ms ease, color 100ms ease,
font-size 100ms ease, padding 100ms ease;
}
/* Active pill renders larger so the current mode reads at a glance —
selection is signaled by size in addition to color/fill. */
.trade-mode-toggle .mode-pill-active {
font-size: 13px; padding: 4px 11px;
}
.trade-mode-toggle .mode-pill + .mode-pill { margin-left: -1.6px; }
.trade-mode-toggle .mode-pill:first-child { border-top-left-radius: 6px; border-bottom-left-radius: 6px; }
.trade-mode-toggle .mode-pill:last-child { border-top-right-radius: 6px; border-bottom-right-radius: 6px; }
.trade-mode-toggle .mode-pill:hover:not(.mode-pill-active) { background: #efefef; color: #444; }
.trade-mode-toggle .mode-pill-active[data-mode="telegram"] {
background: #e7f0fe; color: #1a4380; border-color: #1a4380;
box-shadow: inset 0 0 0 1px #1a4380;
}
.trade-mode-toggle .mode-pill-active[data-mode="direct"] {
background: #e7f0fe; color: #1a4380; border-color: #1a4380;
box-shadow: inset 0 0 0 1px #1a4380;
}
/* Verdict cell: single button per row; class and label are swapped
dynamically by setTradeMode() based on the current toggle state. */
.verdict-cell { white-space: nowrap; }
.verdict-cell .pill-action,
.verdict-cell .pill-action-direct { white-space: nowrap; }
.trade-status { display: block; font-size: 10px; margin-top: 4px;
color: var(--text-muted); }
.trade-status.error { color: #8d2422; }
.trade-status.ok { color: #1f5e2c; }
/* Watch-list refresh button. Lives in the card title; intentionally
subtler than the click-to-trade buttons (those are the ones that
actually move money) but still has clear hover feedback. Note: the
class is `wl-refresh-btn` not `refresh-btn` to avoid colliding with
the existing 40px circular page-level "Refresh now" button. */
/* Round outlined refresh button — matches the page-level refresh + theme
toggle visual language (cartoon offset shadow, lift on hover). Sits
inline with the Watch List card title. icon-only since the round shape
doesn't have room for a text label. */
.wl-refresh-btn {
display: inline-flex; align-items: center; justify-content: center;
margin-left: 10px; vertical-align: middle;
width: 28px; height: 28px; padding: 0;
border-radius: 50%;
background: #e7f0fe; color: #1a4380;
border: 1.6px solid #1a4380;
box-shadow: 2px 2px 0 #1a4380;
cursor: pointer;
font-family: inherit;
font-size: 13px; font-weight: 700;
line-height: 1;
transition: transform 100ms ease, box-shadow 100ms ease, background 120ms ease;
}
.wl-refresh-btn:hover { background: #d0e0f6; transform: translate(-1px, -1px); box-shadow: 3px 3px 0 #1a4380; }
.wl-refresh-btn:active { background: #b8d0ec; transform: translate(1px, 1px); box-shadow: 0 0 0 #1a4380; }
.wl-refresh-btn[disabled] { background: #eee; color: #888; cursor: wait;
border-color: #ccc; box-shadow: 2px 2px 0 #ccc;
transform: none; }
/* Circuit-OPEN state (2026-05-20). Refresh button turns red + becomes a
no-op while Open-Meteo's circuit breaker is short-circuiting fetches.
Server-side bail-out in _refresh_watch_list.py already makes clicks
harmless during cooldown — this just removes the temptation. */
.wl-refresh-btn.circuit-open { background: #fde0e0; color: #8a2d2d;
border-color: #8a2d2d;
box-shadow: 2px 2px 0 #8a2d2d;
cursor: not-allowed; }
.wl-refresh-btn.circuit-open:hover { background: #fde0e0; transform: none;
box-shadow: 2px 2px 0 #8a2d2d; }
.wl-refresh-btn.circuit-open:active { background: #fde0e0; transform: none;
box-shadow: 2px 2px 0 #8a2d2d; }
.wl-refresh-status { display: inline-block; margin-left: 8px;
font-size: 11px; color: var(--text-muted);
font-weight: normal; vertical-align: middle; }
.wl-refresh-status.error { color: #8d2422; }
.wl-refresh-status.ok { color: #1f5e2c; }
/* Sortable Watch List headers. Click to sort the table by that column.
Active column shows ▲/▼ in the arrow span; inactive columns show a
muted ↕ on hover so it's discoverable. Persisted via localStorage —
see applyWatchListSort() / handleWatchListSortClick() in the JS block. */
th.wl-sortable { cursor: pointer; user-select: none; }
th.wl-sortable:hover { background: rgba(26, 67, 128, 0.06); }
.wl-sort-arrow { display: inline-block; margin-left: 5px;
font-size: 10px; opacity: 0.35; min-width: 8px; }
th.wl-sortable:hover .wl-sort-arrow::before { content: "↕"; opacity: 0.6; }
th.wl-sortable.wl-sort-active .wl-sort-arrow { opacity: 1; }
th.wl-sortable.wl-sort-active.wl-sort-desc .wl-sort-arrow::before { content: "▼"; }
th.wl-sortable.wl-sort-active.wl-sort-asc .wl-sort-arrow::before { content: "▲"; }
/* When a sort is active, suppress the hover-only ↕ so it doesn't flicker. */
th.wl-sortable.wl-sort-active:hover .wl-sort-arrow::before { content: ""; }
th.wl-sortable.wl-sort-active.wl-sort-desc:hover .wl-sort-arrow::before { content: "▼"; }
th.wl-sortable.wl-sort-active.wl-sort-asc:hover .wl-sort-arrow::before { content: "▲"; }
/* Loud full-width banner for dashboard self-checks (e.g. aggregate-filter
drift). Red so it can't be missed; sits above all sections. */
.demo-banner {
background: linear-gradient(90deg, #1d3557 0%, #457b9d 100%);
color: #f1faee; border: 1px solid #1d3557;
padding: 14px 18px; margin: 0 0 16px 0; border-radius: 8px;
font-size: 14px; line-height: 1.5;
}
.demo-banner strong { display: block; margin-bottom: 4px; font-size: 15px; }
.demo-banner a { color: #a8dadc; text-decoration: underline; }
.sanity-banner { background: #f8dadb; color: #8d2422; border: 1px solid #d68a8d;
border-radius: 6px; padding: 10px 14px; margin: 10px 0 16px; }
.sanity-banner strong { display: block; margin-bottom: 4px; }
.sanity-banner .detail { font-size: 12px; line-height: 1.45; }
.health-badge { font-size: 11px; padding: 3px 10px; border-radius: 12px; font-weight: 600; margin-left: 8px; }
button { background: #1a4380; color: #fff; border: none; padding: 6px 12px; border-radius: 4px; font-size: 12px; font-weight: 600; cursor: pointer; }
button:hover { background: #245397; }
.help { font-size: 10px; color: var(--text-muted); margin-top: 6px; line-height: 1.4; }
.empty { color: var(--text-muted); font-style: italic; padding: 6px 0; }
.kpi-row { display: flex; gap: 16px; flex-wrap: wrap; }
.kpi-row > div { flex: 1; min-width: 120px; }
/* Roadmap stat tiles wrapped in <a> become clickable deep-links into
the matching #shipped / #planned / #backlog anchors of the roadmap
HTML. Inherit color so the green/orange "big-number" tints survive
and add a subtle hover affordance so users can tell they're tappable.
`flex: 1; min-width: 120px` keeps these matching the sizing of the
plain-<div> tiles in other .kpi-row instances elsewhere on the page. */
.roadmap-stat-link {
display: block; text-decoration: none; color: inherit; text-align: center;
flex: 1; min-width: 120px;
border-radius: 8px; padding: 4px 6px;
transition: background 120ms ease, transform 120ms ease;
}
.roadmap-stat-link:hover { background: var(--refresh-bg-hover); }
.roadmap-stat-link:active { transform: scale(0.97); background: var(--refresh-bg-active); }
code { font-family: "SF Mono", Menlo, Consolas, monospace; font-size: 11px; background: var(--code-bg); padding: 1px 4px; border-radius: 2px; }
/* P&L chart hover dots + tooltip. Dots grow slightly on hover so the
hit-target is forgiving; the tooltip is positioned in JS by reading
each dot's getBoundingClientRect at hover time. The card itself is
position:relative so the absolute tooltip lives in card-space. */
.pnl-dot { cursor: pointer; transition: r 120ms ease; }
.pnl-dot:hover { r: 5.5; }
/* Calibration plot bubbles — same hover behavior; size grows ~25%. */
.cal-dot { cursor: pointer; transition: fill-opacity 120ms ease, stroke-width 120ms ease; }
.cal-dot:hover { fill-opacity: 0.85; stroke-width: 2.5; }
.chart-tip {
position: absolute;
background: var(--chart-tip-bg);
color: var(--chart-tip-fg);
padding: 8px 12px;
border-radius: 8px;
font-size: 11px;
line-height: 1.5;
pointer-events: none;
opacity: 0;
transition: opacity 120ms ease;
z-index: 100;
white-space: nowrap;
box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
transform: translate(-50%, calc(-100% - 10px)); /* center above the dot */
}
.chart-tip.visible { opacity: 1; }
.chart-tip .tip-date { font-weight: 600; font-size: 12px; }
.chart-tip .tip-ticker { font-family: "SF Mono", Menlo, monospace; font-size: 9.5px; opacity: 0.7; margin-top: 1px; }
.chart-tip .tip-row { margin-top: 4px; }
.chart-tip .tip-pos { color: var(--pill-tip-pos); }
.chart-tip .tip-neg { color: var(--pill-tip-neg); }
/* iOS PWA standalone: pad for the notch/dynamic island and the home-bar. */
@supports (padding: max(0px)) {
body { padding-top: max(16px, env(safe-area-inset-top));
padding-bottom: max(16px, env(safe-area-inset-bottom)); }
}
/* Wrapper inserted around every <table> by JS at render time. Lets the
table itself scroll horizontally inside its card while the page stays
put. The negative margin + matching padding visually extends the
scroll surface to the card edges so the swipe area feels natural. */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch;
margin: 0 -14px; padding: 0 14px; }
/* For data sections that can grow long, cap the table at a sensible
height and let it scroll vertically inside the card. Sticky thead
keeps column labels visible while scrolling. */
.scrollable {
max-height: 320px;
overflow: auto;
-webkit-overflow-scrolling: touch;
margin: 0 -14px;
padding: 0 14px;
border-radius: 4px;
}
.scrollable thead th {
position: sticky;
top: 0;
background: var(--table-th-sticky-bg);
backdrop-filter: blur(6px);
-webkit-backdrop-filter: blur(6px);
z-index: 2;
}
/* Phone layout: collapse the 2-column "wide" cards (set inline by the
renderers) into one column, tighten the body padding, and dial sizes
down a touch so the cards still feel balanced on a 390px viewport.
Top/bottom padding USES env(safe-area-inset-*) so the title clears
the Dynamic Island / notch and the home indicator doesn't sit on
top of cards. */
@media (max-width: 720px) {
/* Belt + suspenders against horizontal overflow on phones. The 2026-05
symptom was: at default zoom, an iPhone load showed cards extending
past the right edge ("$168.62" rendering as "$168.6"), forcing the
user to pinch-zoom out to read the dashboard. The fix is two-part:
(1) clamp html/body so any rogue child can't make the page itself
wider than the viewport, and (2) drop the desktop `.section-row .card
{ min-width: 320px }` floor — that floor is correct on tablets, but
on a 375pt iPhone SE (347px usable after padding) it forced the card
wider than its parent. */
html, body { overflow-x: hidden; max-width: 100vw; }
body {
padding-left: 14px; padding-right: 14px;
padding-top: max(14px, env(safe-area-inset-top));
padding-bottom: max(14px, env(safe-area-inset-bottom));
}
.grid { grid-template-columns: 1fr; gap: 14px; margin-top: 12px; }
.card[style*="grid-column: span 2"] { grid-column: span 1 !important; }
/* On mobile we render one card per row (grid-template-columns: 1fr),
so the desktop-era 320px floor only constrains us — and it's bigger
than iPhone SE's usable width. Let cards take whatever space the
row offers. */
.section-row .card { min-width: 0; flex-basis: auto; }
/* Phone: give every section divider real breathing room on both sides
— the desktop default uses negative bottom margin to tuck cards
under the divider, but on mobile that makes the divider feel glued
to whatever's below it. Bump top + bottom so the divider reads as
its own "chapter break" both when the section is open (separates
header from cards) and collapsed (separates from neighbor section). */
.section-header {
margin: 22px 0 14px 0;
font-size: 12px;
letter-spacing: 1.3px;
padding: 8px 6px;
}
/* Collapsed sections need slightly more outer space so 3-4 in a row
don't crowd, plus a bigger tap target on the bare summary bar. */
.dash-section:not([open]) > .section-header {
margin: 20px 0;
padding: 10px 6px;
}
.dash-section:first-of-type > .section-header { margin-top: 8px; }
.dash-section:last-of-type:not([open]) > .section-header { margin-bottom: 8px; }
.card { padding: 14px 16px; border-radius: 16px; }
.header { gap: 10px; }
.big-number { font-size: 33px; }
.app-icon { width: 50px; height: 50px; }
.title-main { gap: 10px; }
.title-block .brand { font-size: 60px; letter-spacing: -1.5px; }
.title-block .title-sub { font-size: 20px; letter-spacing: -0.25px; }
/* Phone: extend sticky bar to the trimmed mobile body padding (14px) and
inset its top edge under the iPhone status bar / notch via env(). */
.sticky-title {
margin: calc(-1 * max(14px, env(safe-area-inset-top))) -14px 12px -14px;
padding: max(10px, env(safe-area-inset-top)) 14px 10px 14px;
}
/* Kill horizontal scroll on mobile — instead, shrink fonts and let
text wrap so every table fits within the card. The vertical
.scrollable cap stays in place so long tables still scroll down. */
.table-scroll, .scrollable {
overflow-x: hidden;
margin: 0;
padding: 0;
}
.scrollable { overflow-y: auto; }
.card table { font-size: 10.5px; }
.card table th {
font-size: 9px;
padding: 3px 4px 3px 0;
letter-spacing: 0.2px;
}
.card table td {
padding: 3px 4px 3px 0;
word-break: break-word;
}
.card table td.mono, .card table th.mono { font-size: 9.5px; }
/* Open Positions has 11 columns — way too many for ~380px even at
small font. Hide the lowest-priority ones on mobile: Bucket
(encoded in the ticker), Placed (recent enough that a glance at
the dashboard tells you when), Settles (computable from the
ticker date), and Forecast verdict (analytical, not urgent). Visible
on mobile: Ticker, Side × Qty, Entry, Cost, Bot Win %, Kalshi
Win %, P&L — the bet itself plus the two probability views and
the unrealized P&L. */