|
133 | 133 | padding: 0; |
134 | 134 | } |
135 | 135 |
|
| 136 | +.icon { |
| 137 | + width: 1em; |
| 138 | + height: 1em; |
| 139 | + display: inline-block; |
| 140 | + vertical-align: middle; |
| 141 | + flex-shrink: 0; |
| 142 | +} |
| 143 | +
|
136 | 144 | html { |
137 | 145 | scroll-behavior: smooth; |
138 | 146 | } |
|
327 | 335 | .meta-grid { |
328 | 336 | margin: 0; |
329 | 337 | display: grid; |
330 | | - grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); |
| 338 | + grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); |
331 | 339 | gap: 8px 16px; |
332 | 340 | } |
333 | 341 |
|
|
352 | 360 | color: var(--text-secondary); |
353 | 361 | font-family: var(--font-mono); |
354 | 362 | font-size: var(--text-xs); |
355 | | - word-break: break-all; |
| 363 | + word-break: normal; |
| 364 | + overflow-wrap: anywhere; |
| 365 | +} |
| 366 | +
|
| 367 | +.meta-row-wide { |
| 368 | + grid-column: 1 / -1; |
356 | 369 | } |
357 | 370 |
|
358 | 371 | .section-head { |
|
1014 | 1027 | } |
1015 | 1028 |
|
1016 | 1029 | .stat-card { |
1017 | | - padding: 20px; |
| 1030 | + padding: 16px 18px; |
1018 | 1031 | background: var(--surface-1); |
1019 | 1032 | border: 1px solid var(--border-subtle); |
1020 | 1033 | border-radius: var(--radius-lg); |
1021 | | - text-align: center; |
| 1034 | + text-align: left; |
| 1035 | + display: grid; |
| 1036 | + grid-template-columns: auto 1fr; |
| 1037 | + grid-template-rows: auto auto; |
| 1038 | + gap: 2px 12px; |
| 1039 | + align-items: center; |
1022 | 1040 | } |
1023 | 1041 |
|
1024 | 1042 | .stat-icon { |
1025 | | - font-size: 32px; |
1026 | | - margin-bottom: 8px; |
1027 | | - opacity: 0.8; |
| 1043 | + grid-column: 1; |
| 1044 | + grid-row: 1 / span 2; |
| 1045 | + width: 38px; |
| 1046 | + height: 38px; |
| 1047 | + color: var(--text-tertiary); |
| 1048 | + opacity: 0.92; |
| 1049 | +} |
| 1050 | +
|
| 1051 | +.stat-icon .icon { |
| 1052 | + width: 100%; |
| 1053 | + height: 100%; |
1028 | 1054 | } |
1029 | 1055 |
|
1030 | 1056 | .stat-value { |
| 1057 | + grid-column: 2; |
| 1058 | + grid-row: 1; |
1031 | 1059 | font-size: var(--text-2xl); |
1032 | 1060 | font-weight: 700; |
1033 | 1061 | color: var(--text-primary); |
1034 | | - margin-bottom: 4px; |
| 1062 | + line-height: 1.1; |
1035 | 1063 | } |
1036 | 1064 |
|
1037 | 1065 | .stat-label { |
| 1066 | + grid-column: 2; |
| 1067 | + grid-row: 2; |
1038 | 1068 | font-size: var(--text-sm); |
1039 | | - color: var(--text-tertiary); |
1040 | | - margin-bottom: 8px; |
| 1069 | + color: var(--text-muted); |
| 1070 | + margin: 0; |
1041 | 1071 | } |
1042 | 1072 |
|
1043 | 1073 | .stat-trend { |
|
1832 | 1862 |
|
1833 | 1863 | const metrics = collectSectionMetrics(); |
1834 | 1864 | const maxValue = Math.max(1, ...metrics.map((m) => m.value)); |
| 1865 | + const yMax = Math.max(4, Math.ceil(maxValue / 4) * 4); |
1835 | 1866 | const left = 52; |
1836 | 1867 | const right = 18; |
1837 | 1868 | const top = 16; |
|
1848 | 1879 | ctx.lineTo(left + chartWidth, y); |
1849 | 1880 | ctx.stroke(); |
1850 | 1881 |
|
1851 | | - const value = Math.round(maxValue - (maxValue * step) / 4); |
| 1882 | + const value = Math.round(yMax - (yMax * step) / 4); |
1852 | 1883 | ctx.fillStyle = textMuted; |
1853 | 1884 | ctx.font = '12px ' + sansFont; |
1854 | 1885 | ctx.textAlign = 'right'; |
|
1859 | 1890 | const barWidth = Math.max(40, Math.min(90, slot * 0.56)); |
1860 | 1891 | metrics.forEach((metric, idx) => { |
1861 | 1892 | const x = left + slot * idx + (slot - barWidth) / 2; |
1862 | | - const barHeight = (metric.value / maxValue) * chartHeight; |
| 1893 | + const barHeight = (metric.value / yMax) * chartHeight; |
1863 | 1894 | const y = top + chartHeight - barHeight; |
1864 | 1895 | const color = styles.getPropertyValue(metric.colorVar).trim() || '#4f46e5'; |
1865 | 1896 |
|
|
0 commit comments