File size: 5,701 Bytes
f530297
 
 
 
72b6f27
 
f530297
 
 
 
 
 
72b6f27
 
 
 
 
f530297
72b6f27
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f530297
 
 
 
 
72b6f27
 
f530297
 
 
 
72b6f27
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f530297
 
 
 
72b6f27
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f530297
 
 
 
72b6f27
 
f530297
 
72b6f27
 
f530297
 
 
 
 
72b6f27
f530297
72b6f27
 
 
 
 
 
 
 
 
f530297
 
 
72b6f27
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f530297
 
 
 
72b6f27
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
/* ⭐⭐ W50-T01 (R1) — a bounded column, so the window inside it can scroll.
   The bar is OUTSIDE the scroller on purpose: with it inside, `scrollTop` would carry the bar's
   height as an offset and every spacer measurement would start life wrong by that much. Out
   here, `scrollTop === 0` is exactly the top of the first card, and the maths needs no fudge. */
.cg-gallery,
.cg-timeline {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  height: 100%;
  min-height: 0;
  padding: var(--cg-mode-pad, 16px);
}

.cg-gallery-bar,
.cg-timeline-bar {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  margin-bottom: 12px;
  color: var(--lp-muted);
  font-size: var(--lp-fs-2xs);
}

.cg-gallery-label,
.cg-timeline-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--lp-ink);
  font-weight: 600;
}

.cg-gallery-count,
.cg-timeline-count {
  font-variant-numeric: tabular-nums;
}

.cg-timeline-missing {
  margin-left: auto;
  color: var(--lp-yellow-deep);
  background: var(--lp-yellow-tint);
  border-radius: var(--lp-r-pill);
  padding: 3px 8px;
  font-variant-numeric: tabular-nums;
}

/* ⛔ ROW GAP IS ZERO, AND THAT IS THE WINDOW'S CONTRACT. Every card carries its own trailing
   gap as a margin instead, so one card row occupies exactly `card height + gap` and a spacer
   occupies exactly what it says. A grid `row-gap` would add a band above and below each spacer
   too, and the drift it introduces grows with every scroll: the last card ends up unreachable.
   The column count and both measurements come from the component as custom properties. */
.cg-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--cg-gallery-card-min, 224px), 1fr));
  column-gap: var(--cg-gallery-gap, 10px);
  row-gap: 0;
  align-content: start;
}

.cg-gallery-card,
.cg-timeline-card {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.cg-gallery-card {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  box-sizing: border-box;
  height: var(--cg-gallery-card-h, 116px);
  margin-bottom: var(--cg-gallery-gap, 10px);
  overflow: hidden;
  padding: 12px;
  border: 1px solid var(--lp-line);
  background: var(--lp-surface);
  color: var(--lp-ink);
  border-radius: var(--lp-r-md);
  transition: transform 150ms ease-out, border-color 150ms ease-out, background 150ms ease-out;
}

.cg-gallery-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--lp-r-sm);
  color: var(--lp-blue-deep);
  background: var(--lp-blue-tint);
}

.cg-gallery-copy,
.cg-timeline-card {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.cg-gallery-copy > strong,
.cg-timeline-card > strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--lp-fs-sm);
  font-weight: 600;
}

.cg-gallery-detail,
.cg-timeline-detail {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--lp-muted);
  font-size: var(--lp-fs-3xs);
}

.cg-gallery-detail b,
.cg-timeline-detail b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--lp-ink);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* ⚠ FLAT, and no gap. The month headings used to nest their events inside a section of their
   own, which put two different gaps between an item and the one above it depending on where a
   month started. One flat list of two known heights makes an item's offset a prefix sum, which
   is what lets the spacers be exact at row 3,000 as well as at row 3. */
.cg-timeline-list {
  display: grid;
  gap: 0;
  align-content: start;
}

.cg-timeline-month-head {
  display: flex;
  box-sizing: border-box;
  align-items: flex-end;
  height: var(--cg-tl-month-h, 34px);
  margin: 0;
  padding-bottom: 8px;
  color: var(--lp-muted);
  font-size: var(--lp-fs-2xs);
  font-weight: 600;
}

.cg-timeline-event {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  box-sizing: border-box;
  align-items: start;
  height: var(--cg-tl-event-h, 142px);
}

.cg-timeline-date {
  position: relative;
  padding-top: 12px;
  color: var(--lp-muted);
  font-size: var(--lp-fs-3xs);
  text-align: right;
}

.cg-timeline-date::after {
  position: absolute;
  top: 14px;
  right: -18px;
  width: 8px;
  height: 8px;
  border-radius: var(--lp-r-pill);
  background: var(--lp-yellow-deep);
  content: "";
}

.cg-timeline-card {
  position: relative;
  box-sizing: border-box;
  align-content: start;
  height: var(--cg-tl-card-h, 132px);
  overflow: hidden;
  padding: 11px 12px;
  border: 1px solid var(--lp-line);
  background: var(--lp-surface);
  color: var(--lp-ink);
  border-radius: var(--lp-r-md);
  transition: transform 150ms ease-out, border-color 150ms ease-out, background 150ms ease-out;
}

.cg-timeline-card::before {
  position: absolute;
  top: -9px;
  bottom: -9px;
  left: -17px;
  width: 1px;
  background: var(--lp-line);
  content: "";
}

.cg-gallery-card:focus-visible,
.cg-timeline-card:focus-visible {
  outline: 2px solid var(--lp-blue-deep);
  outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
  .cg-gallery-card:hover,
  .cg-timeline-card:hover {
    border-color: var(--lp-blue-deep);
    background: var(--lp-surface-2);
    transform: translateY(-1px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cg-gallery-card,
  .cg-timeline-card {
    transition: none;
  }
}

@media (max-width: 620px) {
  .cg-timeline-event {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 10px;
  }
}