Repository navigation
Expand file tree
/
Copy pathstyle.css
More file actions
500 lines (462 loc) · 34.5 KB
/
Copy pathstyle.css
File metadata and controls
500 lines (462 loc) · 34.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
/* ═══════════════════════════════════════════════════════════════════
* COMMODITY PRICE TRACKER — by @MrChartist
* Apple-HIG-inspired design language (iOS / macOS) on the
* mrchartist.com identity. Light = #F2F2F7 grouped, Dark = true black.
* ═══════════════════════════════════════════════════════════════════ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
:root {
--font-display: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
--font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', system-ui, sans-serif;
--font-serif: 'DM Serif Display', Georgia, 'Times New Roman', serif;
color-scheme: light;
/* Surfaces */
--bg: #F2F2F7; /* system grouped background (matches theme-color) */
--bg-grouped: #F2F2F7;
--surface: #FFFFFF;
--surface-2: #F2F2F7; /* inset rows inside a card */
--fill: rgba(118,118,128,0.12);
--fill-2: rgba(118,118,128,0.2);
--sep: rgba(60,60,67,0.18);
--sep-strong: rgba(60,60,67,0.32);
--vibrancy: rgba(242,242,247,0.78);
--tab-bg: rgba(255,255,255,0.78);
--overlay: rgba(0,0,0,0.38);
/* Labels (all pass 4.5:1 on --surface and --bg) */
--t1: #000000;
--t2: #1C1C1E;
--t3: #48484A;
--t4: #636366;
/* Brand accent (blue-indigo) */
--accent: #4F46E5;
--accent-tint: rgba(79,70,229,0.1);
--on-accent: #FFFFFF;
/* System colours: fills use the pure system hue, text uses an accessible shade */
--green: #34C759;
--red: #FF3B30;
--green-t: #1A6B2E;
--red-t: #D70015;
--orange-t: #A24A00;
--green-bg: rgba(52,199,89,0.15);
--red-bg: rgba(255,59,48,0.12);
--orange-bg: rgba(255,149,0,0.16);
--shadow: 0 0 0 0.5px rgba(0,0,0,0.05), 0 1px 3px rgba(0,0,0,0.05);
--shadow-float: 0 8px 30px rgba(0,0,0,0.14), 0 0 0 0.5px rgba(0,0,0,0.06);
--thumb: #FFFFFF;
--thumb-shadow: 0 3px 8px rgba(0,0,0,0.12), 0 1px 1px rgba(0,0,0,0.06), 0 0 0 0.5px rgba(0,0,0,0.04);
--ease: cubic-bezier(0.32, 0.72, 0, 1);
--spring: cubic-bezier(0.34, 1.4, 0.64, 1);
--r-lg: 20px; --r-md: 14px; --r-sm: 10px;
--safe-t: env(safe-area-inset-top, 0px);
--safe-b: env(safe-area-inset-bottom, 0px);
--safe-l: env(safe-area-inset-left, 0px);
--safe-r: env(safe-area-inset-right, 0px);
font-family: var(--font-body);
font-size: 15px;
line-height: 1.45;
letter-spacing: -0.011em;
-webkit-text-size-adjust: 100%;
}
[data-theme="dark"] {
color-scheme: dark;
--bg: #000000;
--bg-grouped: #000000;
--surface: #1C1C1E;
--surface-2: #2C2C2E;
--fill: rgba(118,118,128,0.24);
--fill-2: rgba(118,118,128,0.36);
--sep: rgba(84,84,88,0.65);
--sep-strong: rgba(84,84,88,0.9);
--vibrancy: rgba(0,0,0,0.72);
--tab-bg: rgba(28,28,30,0.78);
--overlay: rgba(0,0,0,0.6);
--t1: #FFFFFF;
--t2: #F2F2F7;
--t3: #C7C7CC;
--t4: #98989D;
--accent: #8E8CFF;
--accent-tint: rgba(142,140,255,0.16);
--accent-on-tint: #B9B8FF;
--on-accent: #0A0A1F;
--green: #30D158;
--red: #FF453A;
--green-t: #30D158;
--red-t: #FF6961;
--orange-t: #FF9F0A;
--green-bg: rgba(48,209,88,0.18);
--red-bg: rgba(255,69,58,0.18);
--orange-bg: rgba(255,159,10,0.18);
--shadow: 0 0 0 0.5px rgba(255,255,255,0.04);
--shadow-float: 0 10px 40px rgba(0,0,0,0.7), 0 0 0 0.5px rgba(255,255,255,0.1);
--thumb: #636366;
--thumb-shadow: 0 3px 8px rgba(0,0,0,0.4), 0 0 0 0.5px rgba(255,255,255,0.08);
}
/* ── BASE ── */
html { background: var(--bg); scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
background: var(--bg); color: var(--t1); min-height: 100vh; min-height: 100dvh;
-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
overflow-x: hidden;
}
body.modal-open { overflow: hidden; }
button, input { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: var(--accent); }
[hidden] { display: none !important; }
svg { display: block; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 300; background: var(--accent); color: var(--on-accent); padding: 10px 16px; border-radius: 12px; font-weight: 600; text-decoration: none; }
.skip-link:focus { top: calc(var(--safe-t) + 8px); }
::selection { background: var(--accent-tint); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
* { scrollbar-width: thin; scrollbar-color: var(--fill-2) transparent; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: var(--fill-2); border-radius: 999px; }
.icon { display: inline-flex; width: 18px; height: 18px; }
.icon svg { width: 100%; height: 100%; }
/* ── LAYOUT ── */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 max(20px, var(--safe-l)) calc(110px + var(--safe-b)) max(20px, var(--safe-r)); }
/* ── NAVIGATION BAR (vibrancy) ── */
.navbar { position: sticky; top: 0; z-index: 50; padding-top: var(--safe-t); transition: background-color 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.navbar::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 0.5px; background: var(--sep); opacity: 0; transition: opacity 0.25s; }
body.scrolled .navbar { background: var(--vibrancy); -webkit-backdrop-filter: saturate(180%) blur(22px); backdrop-filter: saturate(180%) blur(22px); }
body.scrolled .navbar::after { opacity: 1; }
.navbar-inner { max-width: 1200px; margin: 0 auto; height: 52px; padding: 0 max(20px, var(--safe-l)) 0 max(20px, var(--safe-r)); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.nav-title { display: flex; align-items: center; gap: 8px; min-width: 0; opacity: 0; transform: translateY(6px); transition: opacity 0.25s var(--ease), transform 0.3s var(--ease); }
body.scrolled .nav-title { opacity: 1; transform: none; }
.nav-title-text { font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
/* App icon tile (iOS style) carrying the official symbol */
.app-tile { flex: none; width: 60px; height: 60px; border-radius: 14px; display: grid; place-items: center; background: var(--surface); color: var(--t1); box-shadow: var(--shadow), 0 4px 14px rgba(0,0,0,0.06); }
.app-tile svg { width: 78%; height: 78%; }
.app-tile-sm { width: 28px; height: 28px; border-radius: 7px; box-shadow: var(--shadow); }
[data-theme="dark"] .app-tile { background: #1C1C1E; box-shadow: 0 0 0 0.5px rgba(255,255,255,0.14); }
/* Large title */
.large-title { display: flex; align-items: center; gap: 14px; padding: 6px 0 18px; }
.h-title { font-family: var(--font-display); font-size: 34px; font-weight: 800; letter-spacing: -0.035em; line-height: 1.08; color: var(--t1); }
.h-sub { font-size: 14px; color: var(--t3); margin-top: 3px; letter-spacing: -0.01em; }
.h-sub a { color: var(--accent); font-weight: 600; text-decoration: none; }
.h-sub a:hover { text-decoration: underline; }
/* ── BUTTONS ── */
.icon-btn { height: 36px; min-width: 36px; padding: 0 9px; border-radius: 18px; background: var(--fill); color: var(--t1); display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: transform 0.2s var(--ease), background-color 0.2s; }
.icon-btn:hover { background: var(--fill-2); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn[disabled] { opacity: 0.6; cursor: default; }
.icon-btn[aria-busy="true"] .icon { animation: spin 0.9s linear infinite; }
.pressable { transition: transform 0.2s var(--ease), background-color 0.2s, opacity 0.2s; }
.pressable:active { transform: scale(0.97); }
/* ── STATUS PILL ── */
.status-pill { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 18px; background: var(--green-bg); color: var(--green-t); font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: pulse 2.4s infinite; flex: none; }
.status-pill.warn { background: var(--orange-bg); color: var(--orange-t); }
.status-pill.warn .status-dot { background: var(--orange-t); animation: none; }
.status-pill.bad { background: var(--red-bg); color: var(--red-t); }
.status-pill.bad .status-dot { background: var(--red); animation: none; }
/* ── SUMMARY (inset grouped) ── */
.summary { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.summary-cell { padding: 14px 16px; text-align: left; display: flex; flex-direction: column; gap: 2px; min-width: 0; color: inherit; }
.summary-cell + .summary-cell { box-shadow: inset 0.5px 0 0 var(--sep); }
button.summary-cell:hover { background: var(--fill); }
.s-label { font-size: 11px; font-weight: 600; color: var(--t4); text-transform: uppercase; letter-spacing: 0.04em; }
.s-val { font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.s-name { font-size: 12px; font-weight: 600; color: var(--t2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-val.up, .s-name.up { color: var(--green-t); }
.s-val.down, .s-name.down { color: var(--red-t); }
.s-sub { font-size: 11px; color: var(--t4); }
.status-line { font-size: 12px; color: var(--t4); margin: 8px 6px 18px; min-height: 18px; font-variant-numeric: tabular-nums; }
.status-line.warn { color: var(--orange-t); font-weight: 500; }
.status-line.bad { color: var(--red-t); font-weight: 500; }
/* ── SEGMENTED CONTROL (UISegmentedControl) ── */
.segmented { position: relative; display: flex; padding: 2px; border-radius: 9px; background: var(--fill); min-width: 0; }
.seg-scroll { overflow-x: auto; scrollbar-width: none; }
.seg-scroll::-webkit-scrollbar { display: none; }
.seg-thumb { position: absolute; top: 2px; bottom: 2px; left: 0; width: 0; border-radius: 7px; background: var(--thumb); box-shadow: var(--thumb-shadow); pointer-events: none; opacity: 0; }
.segmented.has-thumb .seg-thumb { opacity: 1; }
.segmented.seg-ready .seg-thumb { transition: transform 0.4s var(--ease), width 0.4s var(--ease); }
.seg-btn { position: relative; z-index: 1; flex: 1 0 auto; min-height: 32px; padding: 0 14px; border-radius: 7px; font-size: 13px; font-weight: 500; color: var(--t1); white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 5px; transition: color 0.2s, transform 0.2s var(--ease); }
.seg-btn:active { transform: scale(0.97); }
.seg-btn.active { font-weight: 600; }
.segmented:not(.has-thumb) .seg-btn.active { background: var(--thumb); box-shadow: var(--thumb-shadow); }
.seg-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.seg-count.zero { background: var(--fill-2); color: var(--t3); }
#category-tabs { margin-bottom: 14px; }
/* ── FX STRIP ── */
.fx-strip { display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow); padding: 10px 14px; margin-bottom: 14px; }
.fx-label { flex: none; font-size: 11px; font-weight: 700; color: var(--t4); text-transform: uppercase; letter-spacing: 0.05em; padding-right: 12px; border-right: 0.5px solid var(--sep); }
.fx-rates { display: flex; gap: 8px; overflow-x: auto; flex: 1; scrollbar-width: none; }
.fx-rates::-webkit-scrollbar { display: none; }
.fx-item { display: flex; align-items: baseline; gap: 6px; padding: 5px 11px; background: var(--surface-2); border-radius: 9px; flex: none; }
.fx-item.primary { background: var(--accent-tint); }
.fx-pair { font-size: 11px; font-weight: 600; color: var(--t3); }
.fx-rate { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--t1); }
.fx-change { font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.fx-change.up { color: var(--green-t); }
.fx-change.down { color: var(--red-t); }
.fx-item.stale .fx-rate::after { content: ' · cached'; font-weight: 500; font-size: 10px; color: var(--orange-t); }
/* ── TOOLBAR: SEARCH + SORT ── */
.toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.search-field { position: relative; flex: 1 1 260px; display: flex; align-items: center; min-width: 0; }
.search-icon { position: absolute; left: 11px; width: 16px; height: 16px; color: var(--t4); pointer-events: none; }
.search-field input { width: 100%; height: 36px; background: var(--fill); border: 0; border-radius: 10px; padding: 0 64px 0 34px; font-size: 15px; color: var(--t1); transition: box-shadow 0.2s, background-color 0.2s; -webkit-appearance: none; appearance: none; }
.search-field input::placeholder { color: var(--t4); }
.search-field input:focus { outline: none; background: var(--surface); box-shadow: 0 0 0 3.5px var(--accent-tint), 0 0 0 1.5px var(--accent); }
.search-field input::-webkit-search-cancel-button, .search-field input::-webkit-search-decoration { -webkit-appearance: none; display: none; }
.search-clear { position: absolute; right: 4px; width: 32px; height: 32px; display: grid; place-items: center; color: var(--t4); border-radius: 50%; }
.search-clear svg { width: 17px; height: 17px; }
.search-clear:hover { color: var(--t2); }
.kbd-hint, .kbd-legend kbd { font-family: var(--font-body); font-size: 11px; font-weight: 600; color: var(--t3); background: var(--surface); border-radius: 5px; padding: 1px 6px; box-shadow: 0 0 0 0.5px var(--sep-strong), 0 1px 0 var(--sep-strong); }
.kbd-hint { position: absolute; right: 9px; pointer-events: none; }
.search-field.has-value .kbd-hint { display: none; }
#sort-seg .seg-btn { padding: 0 12px; }
/* ── COMMODITY GRID & CARDS ── */
.commodity-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.commodity-card { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease); }
@media (hover: hover) { .commodity-card:hover { box-shadow: var(--shadow), 0 10px 28px rgba(0,0,0,0.08); transform: translateY(-1px); } }
.commodity-card-inner { padding: 16px 16px 12px; }
.commodity-header { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.commodity-icon { flex: none; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--commodity-accent, var(--accent)); box-shadow: inset 0 0 0 0.5px rgba(0,0,0,0.12), inset 0 -10px 16px rgba(0,0,0,0.16); }
.commodity-icon svg { width: 21px; height: 21px; color: #fff; filter: drop-shadow(0 1px 1px rgba(0,0,0,0.4)); }
.commodity-info { flex: 1; min-width: 0; }
.commodity-name { font-family: var(--font-display); font-size: 17px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.2; color: var(--t1); }
.commodity-meta { display: flex; align-items: center; gap: 6px; margin-top: 3px; flex-wrap: wrap; }
.commodity-symbol { font-size: 11px; font-weight: 600; color: var(--t4); letter-spacing: 0.03em; text-transform: uppercase; }
.badge { display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 9px; font-size: 11px; font-weight: 700; letter-spacing: 0.02em; white-space: nowrap; }
.badge-precious { background: rgba(255,204,0,0.2); color: #7A5600; }
.badge-industrial { background: rgba(0,122,255,0.12); color: #0A58B5; }
.badge-energy { background: rgba(255,59,48,0.12); color: #B4231A; }
.badge-agri { background: rgba(52,199,89,0.16); color: #1F7A35; }
[data-theme="dark"] .badge-precious { background: rgba(255,214,10,0.18); color: #FFD60A; }
[data-theme="dark"] .badge-industrial { background: rgba(10,132,255,0.2); color: #64B5FF; }
[data-theme="dark"] .badge-energy { background: rgba(255,69,58,0.2); color: #FF8A82; }
[data-theme="dark"] .badge-agri { background: rgba(48,209,88,0.18); color: #30D158; }
/* iOS switch carrying the watchlist star */
.switch { flex: none; position: relative; width: 51px; height: 31px; border-radius: 16px; background: var(--fill-2); transition: background-color 0.3s var(--ease); margin: -6px -3px -6px 0; }
.switch::before { content: ''; position: absolute; inset: -7px -3px; } /* 44px touch target */
.switch-knob { position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0,0,0,0.15), 0 1px 1px rgba(0,0,0,0.16), 0 3px 1px rgba(0,0,0,0.06); display: grid; place-items: center; color: #8E8E93; transition: transform 0.35s var(--spring), width 0.2s var(--ease); }
.switch-knob svg { width: 15px; height: 15px; }
.switch:active .switch-knob { width: 33px; }
.switch[aria-checked="true"] { background: var(--green); }
.switch[aria-checked="true"] .switch-knob { transform: translateX(20px); color: #E8A400; }
.switch[aria-checked="true"]:active .switch-knob { transform: translateX(14px); }
.switch[aria-checked="true"] .switch-knob svg { fill: currentColor; animation: pop 0.4s var(--spring); }
.intl-price-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; margin-bottom: 14px; }
.intl-price { font-family: var(--font-display); font-size: 30px; font-weight: 700; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; line-height: 1.05; color: var(--t1); border-radius: 6px; }
.intl-badge { font-size: 11px; font-weight: 700; letter-spacing: 0.02em; margin-left: 6px; vertical-align: super; font-family: var(--font-body); }
.intl-badge.indicative { color: var(--orange-t); }
.intl-badge.spot { color: var(--accent); }
.intl-unit { font-size: 12px; color: var(--t4); margin-top: 3px; }
.intl-change { text-align: right; flex: none; }
.change-pill { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; white-space: nowrap; }
.change-pill.up { background: var(--green-bg); color: var(--green-t); }
.change-pill.down { background: var(--red-bg); color: var(--red-t); }
.change-pill.neutral { background: var(--fill); color: var(--t3); }
.price-flash { animation: priceFlash 1s ease-out; }
/* India landed (inset grouped rows) */
.india-landed { background: var(--surface-2); border-radius: var(--r-md); padding: 4px 14px 6px; }
.india-landed-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px 10px; padding: 10px 0 8px; border-bottom: 0.5px solid var(--sep); }
.india-landed-title { font-size: 11px; font-weight: 700; color: var(--t4); letter-spacing: 0.04em; text-transform: uppercase; }
.india-landed-title .unit { text-transform: none; }
.india-duty-badge { font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--accent-tint); color: var(--accent-on-tint, var(--accent)); }
.price-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 36px; padding: 6px 0; }
.price-row + .price-row { border-top: 0.5px solid var(--sep); }
.price-row.sub { padding-left: 12px; }
.price-label { font-size: 13px; color: var(--t3); }
.price-value { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; color: var(--t1); text-align: right; }
.price-value.highlight { font-size: 18px; font-weight: 700; color: var(--accent); }
.price-row.strong .price-label { color: var(--t1); font-weight: 600; }
.price-row.strong .price-value { font-weight: 700; }
.price-group { margin-top: 4px; border-top: 0.5px solid var(--sep); }
.price-group-title { font-size: 11px; font-weight: 700; color: var(--t4); letter-spacing: 0.04em; text-transform: uppercase; padding: 10px 0 2px; }
.price-row.contract { min-height: 30px; padding: 3px 0; }
.price-row.contract .price-label { font-size: 12px; }
.price-row.contract small { color: var(--t4); font-size: 11px; }
.price-row.contract .price-value { font-size: 13px; color: var(--accent); }
.price-row.prohibited .price-label, .price-row.prohibited .price-value { color: var(--red-t); font-weight: 700; }
.price-row.unavailable .price-label { color: var(--orange-t); font-weight: 600; }
.card-note { font-size: 11px; color: var(--t4); line-height: 1.45; margin-top: 8px; padding: 8px 0 6px; border-top: 0.5px solid var(--sep); }
.skeleton { background: linear-gradient(90deg, var(--fill) 25%, var(--fill-2) 50%, var(--fill) 75%); background-size: 200% 100%; animation: shimmer 1.8s linear infinite; border-radius: 6px; height: 16px; width: 110px; }
/* Card footer */
.data-source { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; padding: 10px 16px 12px; border-top: 0.5px solid var(--sep); font-size: 11px; color: var(--t4); }
.source-text { flex: 1 1 100%; }
.card-actions { display: flex; gap: 8px; }
.chip-btn { display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 12px; border-radius: 16px; background: var(--accent-tint); color: var(--accent); font-size: 12px; font-weight: 600; transition: transform 0.2s var(--ease), background-color 0.2s; }
.chip-btn svg { width: 14px; height: 14px; }
.chip-btn:hover { background: var(--fill-2); }
.chip-btn:active { transform: scale(0.95); }
.tick { font-variant-numeric: tabular-nums; }
.tick.flag { color: var(--orange-t); font-weight: 600; }
/* Empty state */
.empty-state { grid-column: 1 / -1; text-align: center; padding: 64px 20px; color: var(--t3); }
.empty-state h2 { font-family: var(--font-serif); font-weight: 400; font-size: 26px; color: var(--t1); margin-bottom: 6px; }
.empty-state p { max-width: 420px; margin: 0 auto 14px; }
.empty-state strong { color: var(--t1); }
.pill-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 18px; border-radius: 18px; background: var(--accent); color: var(--on-accent); font-weight: 600; font-size: 14px; transition: transform 0.2s var(--ease); }
.pill-btn:active { transform: scale(0.96); }
/* ── METHODOLOGY (grouped) ── */
.group { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 4px 16px; }
.chev { width: 16px; height: 16px; color: var(--t4); transition: transform 0.3s var(--ease); }
details[open] .chev { transform: rotate(90deg); }
/* ── FOOTER ── */
.app-footer { text-align: center; padding: 36px 0 8px; color: var(--t4); font-size: 12px; }
.footer-built { font-size: 15px; color: var(--t2); }
.footer-built a { font-family: var(--font-serif); font-size: 18px; color: var(--t1); text-decoration: none; }
.footer-built a:hover { text-decoration: underline; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 6px; margin: 10px 0; }
.footer-links a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: 18px; background: var(--fill); color: var(--accent); font-size: 13px; font-weight: 600; text-decoration: none; }
.footer-links a:hover { background: var(--fill-2); }
.footer-note { max-width: 520px; margin: 0 auto; line-height: 1.5; }
/* ── TAB BAR (floating capsule on desktop, iOS tab bar on phones) ── */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
body.scrolled .navbar { background: var(--bg); }
}
/* ── CHART SHEET ── */
.sheet-overlay { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--overlay); opacity: 0; transition: opacity 0.28s var(--ease); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.sheet-overlay.open { opacity: 1; }
.sheet { width: 100%; max-width: 980px; max-height: 100%; display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-float); overflow: hidden; transform: scale(0.96) translateY(8px); opacity: 0; transition: transform 0.45s var(--ease), opacity 0.3s var(--ease); outline: none; }
.sheet-overlay.open .sheet { transform: none; opacity: 1; }
.sheet.dragging { transition: none; }
.sheet-grabber { display: none; touch-action: none; padding: 8px 0 2px; cursor: grab; }
.sheet-handle { display: block; width: 36px; height: 5px; border-radius: 3px; background: var(--fill-2); margin: 0 auto; }
.sheet-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 6px; }
.sheet-title { font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.2; }
.sheet-sub { font-size: 12px; color: var(--t4); margin-top: 2px; }
.sheet-tools { padding: 8px 20px 12px; }
.sheet-tools .segmented { max-width: 420px; }
.sheet-tools .seg-btn { padding: 0 10px; }
.chart-container { position: relative; width: 100%; height: 420px; }
.chart-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 20px; font-size: 14px; color: var(--t3); background: var(--surface); }
.sheet-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; padding: 10px 20px calc(10px + var(--safe-b)); border-top: 0.5px solid var(--sep); font-size: 11px; color: var(--t4); }
/* ── TOAST ── */
.toast { position: fixed; z-index: 400; left: 50%; bottom: calc(24px + var(--safe-b)); transform: translate(-50%, 16px); max-width: calc(100vw - 32px); padding: 10px 18px; border-radius: 999px; background: rgba(44,44,46,0.94); color: #fff; font-size: 14px; font-weight: 500; text-align: center; opacity: 0; pointer-events: none; transition: opacity 0.25s var(--ease), transform 0.35s var(--spring); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
[data-theme="dark"] .toast { background: rgba(58,58,60,0.95); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
/* ── ANIMATION ── */
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(52,199,89,0.5); } 70% { box-shadow: 0 0 0 6px rgba(52,199,89,0); } 100% { box-shadow: 0 0 0 0 rgba(52,199,89,0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes cardIn { from { opacity: 0; transform: translateY(14px) scale(0.985); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(0.6); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }
@keyframes priceFlash { 0% { background: var(--accent-tint); } 100% { background: transparent; } }
.commodity-grid.animate .commodity-card { animation: cardIn 0.5s var(--ease) both; animation-delay: calc(min(var(--i, 0), 12) * 35ms); }
/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
.commodity-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
}
@media (max-width: 768px) {
.wrap { padding-left: max(16px, var(--safe-l)); padding-right: max(16px, var(--safe-r)); }
.navbar-inner { padding-left: max(16px, var(--safe-l)); padding-right: max(16px, var(--safe-r)); }
.commodity-grid { grid-template-columns: 1fr; gap: 14px; }
.h-title { font-size: 28px; }
.kbd-hint { display: none; }
.summary-cell { padding: 12px 12px; }
.s-val { font-size: 20px; }
/* iOS tab bar */
.icon-btn, .chip-btn, .seg-btn { min-height: 44px; }
.icon-btn { min-width: 44px; border-radius: 22px; }
.status-pill { height: 36px; }
.search-field input { height: 44px; border-radius: 12px; font-size: 16px; padding-left: 38px; }
.search-icon { left: 13px; }
.search-clear { width: 44px; height: 44px; right: 0; }
.segmented { border-radius: 11px; }
.seg-btn { font-size: 14px; }
.chip-btn { padding: 0 14px; border-radius: 22px; }
.footer-links a { min-height: 44px; }
/* Sheet becomes a bottom sheet */
.sheet-overlay { align-items: flex-end; padding: 0; }
.sheet { max-width: none; max-height: 92vh; max-height: 92dvh; border-radius: 20px 20px 0 0; transform: translateY(100%); opacity: 1; }
.sheet-grabber { display: block; }
.sheet-header { padding-top: 6px; }
.chart-container { height: min(52vh, 420px); }
}
@media (max-width: 480px) {
.large-title { gap: 12px; }
.app-tile { width: 52px; height: 52px; border-radius: 12px; }
.h-title { font-size: 25px; }
.h-sub { font-size: 13px; }
.summary { grid-template-columns: repeat(2, 1fr); }
.summary-cell:nth-child(3) { box-shadow: inset 0 0.5px 0 var(--sep); }
.summary-cell:nth-child(4) { box-shadow: inset 0.5px 0.5px 0 var(--sep); }
.toolbar { gap: 10px; }
#sort-seg { width: 100%; }
#sort-seg .seg-btn { padding: 0 6px; }
.fx-strip { padding: 8px 10px; gap: 8px; }
.commodity-card-inner { padding: 14px 14px 10px; }
.data-source { padding: 10px 14px 12px; }
.intl-price { font-size: 26px; }
.status-pill #status-text { max-width: 96px; overflow: hidden; text-overflow: ellipsis; }
.nav-title-text { font-size: 14px; }
}
/* ── ACCESSIBILITY PREFERENCES ── */
@media (prefers-reduced-motion: reduce) {
html { scroll-behavior: auto; }
*, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; animation-delay: 0ms !important; transition-duration: 0.001ms !important; transition-delay: 0ms !important; scroll-behavior: auto !important; }
.commodity-grid.animate .commodity-card { animation: none; }
.status-dot { animation: none; }
}
@media (prefers-contrast: more) {
:root { --sep: rgba(0,0,0,0.55); --sep-strong: #000; --t3: #1C1C1E; --t4: #333; --accent: #2A22B8; --green-t: #14591F; --red-t: #A8000F; --orange-t: #7A3500; --fill: rgba(118,118,128,0.2); }
[data-theme="dark"] { --sep: rgba(255,255,255,0.6); --sep-strong: #fff; --t3: #F2F2F7; --t4: #E5E5EA; --accent: #B7B6FF; --green-t: #5BE37D; --red-t: #FF9A93; --orange-t: #FFB84D; --fill: rgba(118,118,128,0.4); }
.commodity-card, .group, .summary, .fx-strip, .sheet { box-shadow: 0 0 0 1px var(--sep-strong); }
body.scrolled .navbar { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--bg); }
.switch { box-shadow: inset 0 0 0 1px var(--sep-strong); }
:focus-visible { outline-width: 3px; }
}
@media (forced-colors: active) {
.seg-btn.active { outline: 2px solid Highlight; }
.switch[aria-checked="true"] { outline: 2px solid Highlight; }
}
/* ── Minimal card: one headline figure, details on demand ── */
.headline { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; padding: 12px 0 8px; }
.hl-label { font-size: 12px; font-weight: 600; color: var(--t4); }
.hl-main { display: inline-flex; align-items: baseline; gap: 6px; margin-right: auto; }
.hl-value { font-family: var(--font-display); font-size: 24px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--t1); }
.hl-value small { font-size: 13px; font-weight: 600; color: var(--t3); margin-left: 2px; }
.hl-value.muted { font-size: 15px; color: var(--t4); }
.hl-sub { font-size: 12px; font-weight: 600; color: var(--t4); }
.more { border-top: 0.5px solid var(--sep); }
.more > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; min-height: 44px; font-size: 13px; font-weight: 600; color: var(--accent); }
.more > summary::-webkit-details-marker { display: none; }
.more > summary::after { content: ''; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .2s; }
.more[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.more .source-text { font-size: 11px; color: var(--t4); padding: 8px 0 4px; }
@media (prefers-reduced-motion: reduce) { .more > summary::after { transition: none; } }
/* ── Volume and open interest ── */
.stats { margin-top: 4px; padding-top: 6px; border-top: 0.5px solid var(--sep); }
.stat-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 7px 0; font-size: 13px; }
.stat-label { color: var(--t3); }
.stat-value { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; color: var(--t1); }
.stat-value small { font-size: 11px; font-weight: 500; color: var(--t4); margin-left: 4px; }
.stat-value small.up { color: var(--green-t); }
.stat-value small.down { color: var(--red-t); }
.stat-note { font-size: 11px; color: var(--t4); padding: 2px 0 6px; }
/* ── iOS-grade mobile finish ── */
/* Native SF Pro on Apple devices, Inter elsewhere */
@supports (font: -apple-system-body) {
:root {
--font-body: -apple-system, 'SF Pro Text', BlinkMacSystemFont, system-ui, sans-serif;
--font-display: -apple-system, 'SF Pro Display', BlinkMacSystemFont, system-ui, sans-serif;
}
}
body { overscroll-behavior-y: contain; -webkit-touch-callout: none; }
a, button, summary, [role="switch"], select { touch-action: manipulation; }
button, summary, .seg-btn, .chip-btn, .icon-btn, .switch { -webkit-user-select: none; user-select: none; }
.h-sub a { position: relative; }
.h-sub a::after { content: ''; position: absolute; inset: -14px -6px; }
/* Sizes follow the input type, not the screen width (landscape phones and iPads count too) */
@media (pointer: coarse) {
.icon-btn, .chip-btn, .seg-btn, .more > summary { min-height: 44px; }
.icon-btn { min-width: 44px; border-radius: 22px; }
.chip-btn { border-radius: 22px; padding: 0 14px; }
.search-field input { height: 44px; border-radius: 12px; font-size: 16px; }
.seg-btn { font-size: 14px; }
}
/* Pull to refresh */
.ptr { position: fixed; z-index: 70; left: 50%; top: calc(var(--safe-t) + 12px); width: 36px; height: 36px; margin-left: 0; border-radius: 50%; background: var(--surface); color: var(--t3); box-shadow: var(--shadow-float); display: flex; align-items: center; justify-content: center; opacity: 0; transform: translate(-50%, -44px); pointer-events: none; transition: opacity 0.2s var(--ease); }
.ptr svg { width: 18px; height: 18px; }
.ptr.pulling { opacity: 1; transition: none; }
.ptr.ready { color: var(--accent); }
/* Installed app, light theme: black-translucent status bar text is white, so give it a dark strip to sit on */
@media (display-mode: standalone) {
:root[data-theme="light"] body::before { content: ''; position: fixed; top: 0; left: 0; right: 0; height: var(--safe-t); background: #000; z-index: 500; }
}
@media (prefers-reduced-motion: reduce) { .ptr { transition: none; } }