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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
/* ---------------------------------------------------------------------------
   wave46 / field-panels.css β€” contract C6, W46-T31.

   The lane's own sheet for the two FIELD surfaces: the Hide-fields row's trailing
   actions menu (owner instruction 21) and the add-field type list's info mark
   (owner instruction 27).

   β›” IMPORTED FROM THE COMPONENTS, NEVER FROM index.css. `FieldsHidePanel.tsx` and
   `ColumnMenu.tsx` each `import "../styles/wave46/field-panels.css"`, so the bundler
   emits it AFTER index.css and these rules win their equal-specificity fights. An
   `@import` at the top of index.css would have been inlined at the top of the cascade
   and lost every one of them, silently.
   [[a-lane-stylesheet-cannot-override-index-css]]

   β›” TOKENS ONLY. No literal `font-size` (verify_ui.py's R5 sweeps every *.css under
   src/ and reds on one), no inline hex, no shadow that is not on an overlay.
   --------------------------------------------------------------------------- */

/* ---- the row's trailing actions slot ------------------------------------------------
   ⭐ `margin-left: auto` IS THE TRAILING SLOT, and it moved here with the control. It
   used to live on `.cg-check-del`, the button this menu replaced; without it the trigger
   would sit tight against the last badge instead of at the row's end. On a row that also
   offers Remove from my fields, that button keeps its own auto margin and takes the gap,
   and this control follows it β€” which is the order the two belong in. */
.w46-field-actions {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  margin-left: auto;
}

/* The trigger is `.cg-field-edit-trigger` still, so it keeps the 18px box, the radius and
   the hover-reveal the manager list already gives it. What this adds is the OPEN state:
   a menu hanging off an invisible button reads as a bug, so an open row keeps its trigger
   painted whether or not the pointer is still on the row.
   β›” The four native-chrome resets are stated here in full rather than inherited, because
   this class is also mounted OUTSIDE `.cg-fields-manager` (the grid's own Fields panel),
   where none of wave 41's manager-scoped rules apply at all. */
.w46-field-actions-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: var(--lp-r-sm);
  background: transparent;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.cg-fields-manager .w46-field-actions.is-open .w46-field-actions-trigger,
.w46-field-actions.is-open .w46-field-actions-trigger {
  opacity: 1;
  color: var(--lp-blue-deep);
}
.w46-field-actions-trigger:focus-visible {
  outline: 2px solid var(--lp-primary);
  outline-offset: 2px;
}

/* ---- the menu itself ----------------------------------------------------------------
   ⭐ VIEWPORT-POSITIONED, ON PURPOSE. `.cg-pop-list` is a 320px `overflow-y: auto` box, so
   an absolutely positioned menu on one of the last rows would be clipped by its own
   parent. `position: fixed` escapes that clip (no ancestor here establishes a containing
   block: `.cg-pop` carries no transform, filter or containment), and the component closes
   the menu on any scroll so a detached menu can never point at the wrong row.
   ⚠ The `top`/`left` arrive as inline geometry from the trigger's measured rect. They are
   the only inline style on this control; every colour, size and radius is below. */
.w46-field-menu {
  position: fixed;
  z-index: var(--cg-z-menu);
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 168px;
  padding: 4px;
  border: 1px solid var(--lp-line);
  border-radius: var(--lp-r-md);
  background: var(--lp-surface);
  /* A tinted shadow, and only because this IS an overlay (DESIGN: hairlines elsewhere). */
  box-shadow: 0 6px 18px color-mix(in srgb, var(--lp-blue-deep) 16%, transparent);
  animation: w46-field-menu-in 140ms ease-out;
}

/* Opacity and transform only: nothing here reflows the row underneath it. */
@keyframes w46-field-menu-in {
  from { opacity: 0; transform: translateY(-2px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .w46-field-menu { animation: none; }
}

/* A menu item is a short label, not a sentence: the impact wording stays in `title`,
   where W41-T29 put it, and the row's width budget is unaffected either way. */
.w46-field-menu-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 6px 8px;
  border: 0;
  border-radius: var(--lp-r-sm);
  background: transparent;
  font: inherit;
  color: inherit;
  font-size: var(--lp-fs-xs);
  text-align: left;
  cursor: pointer;
}
.w46-field-menu-item:hover {
  background: var(--lp-blue-tint);
  color: var(--lp-blue-deep);
}
.w46-field-menu-item:focus-visible {
  outline: 2px solid var(--lp-primary);
  outline-offset: 2px;
}
/* ⭐ THE DESTRUCTIVE ITEM READS AS ONE, and it is the whole reason the two acts stopped
   being neighbours: a delete that looks like an edit is a delete you reach by accident. */
.w46-field-menu-item--danger {
  color: var(--lp-red-deep);
}
.w46-field-menu-item--danger:hover {
  background: var(--lp-red-tint);
  color: var(--lp-red-deep);
}

/* ---- the add-field type list's info mark (owner instruction 27) ----------------------
   The glyph was the literal characters `(i)`, which a text baseline positioned; an SVG
   needs the box centred instead. Everything else about the button (its 32px hit area, its
   colours, its focus ring) stays exactly where wave 41 put it.

   β›” COLOUR IS DELIBERATELY ABSENT HERE. field-ui.css already states the resting tone and
   the hover / focus / expanded tones; restating the base one in a sheet that loads later
   would win the resting fight and leave the three state rules to fight back at higher
   specificity, which is how a mark ends up muted when it is meant to be lit. */
.cg-type-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ---- the date cell: a plain date first, a repeat editor second (owner instruction 13) ----
   W46-T32. The picker used to render the anchor block, the "Only when" conditions and every
   rule row at all times, with the plain-vs-repeating distinction implied only by
   `rules.length` and the way in marked by a quiet text link. Now the default state is a
   calendar plus ONE footer affordance, and the editor is a second step in the SAME overlay
   laid out one setting per labelled row, after reference/Google Calendar 1.png.

   The editor is wider than the bare calendar, so the width pinned at index.css's
   `.cg-date-picker` is restated here at higher specificity. This sheet is imported from the
   component, so it is emitted AFTER index.css and wins.
   [[a-lane-stylesheet-cannot-override-index-css]] */
.cg-pop.cg-date-picker {
  width: min(360px, calc(100vw - 24px));
}

/* ---- step 1: the footer that carries the whole way in --------------------------------
   The owner's complaint was that the way in was hard to see. It is a filled control on its
   own strip now, not a text link sharing a row with rule editors. */
.w46-date-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--lp-line);
}
.w46-date-summary {
  flex: 1;
  min-width: 0;
  color: var(--lp-muted);
  font-size: var(--lp-fs-3xs);
  line-height: var(--lp-lh-tight);
}
.w46-date-repeat {
  border: 0;
  background: var(--lp-primary);
  font: inherit;
  color: var(--lp-surface);
  padding: 6px 14px;
  border-radius: var(--lp-r-pill);
  font-size: var(--lp-fs-2xs);
  cursor: pointer;
  transition: background 140ms ease-out;
}
.w46-date-repeat:hover {
  background: var(--lp-primary-hover);
}
.w46-date-repeat.is-set {
  background: var(--lp-primary-tint);
  color: var(--lp-blue-deep);
  flex: 0 0 auto;
}
.w46-date-repeat.is-set:hover {
  background: var(--lp-blue-tint);
}
.w46-date-repeat:focus-visible {
  outline: 2px solid var(--lp-primary);
  outline-offset: 2px;
}

/* ---- step 2: one setting per labelled row ------------------------------------------- */
.w46-recur {
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: w46-recur-in 140ms ease-out;
}
@keyframes w46-recur-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .w46-recur { animation: none; }
  .w46-date-repeat { transition: none; }
}
.w46-recur-head {
  display: flex;
  align-items: center;
  gap: 6px;
}
.w46-recur-back {
  border: 0;
  background: transparent;
  font: inherit;
  color: inherit;
  width: 24px;
  height: 24px;
  border-radius: var(--lp-r-sm);
  font-size: var(--lp-fs-lg);
  line-height: 1;
  cursor: pointer;
}
.w46-recur-back:hover {
  background: var(--lp-surface-2);
}
.w46-recur-back:focus-visible {
  outline: 2px solid var(--lp-primary);
  outline-offset: 2px;
}
.w46-recur-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--lp-line);
  border-radius: var(--lp-r-md);
  background: var(--lp-surface-2);
}
.w46-recur-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.w46-recur-label {
  color: var(--lp-muted);
  font-size: var(--lp-fs-3xs);
  line-height: var(--lp-lh-tight);
}
.w46-recur-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.w46-recur-word {
  color: var(--lp-muted);
  font-size: var(--lp-fs-2xs);
}
.w46-recur-count {
  width: 64px;
}

/* ---- the seven day pills, filled when selected --------------------------------------- */
.w46-recur-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.w46-recur-pill {
  border: 0;
  background: var(--lp-wash);
  font: inherit;
  color: var(--lp-ink);
  width: 28px;
  height: 28px;
  border-radius: var(--lp-r-pill);
  font-size: var(--lp-fs-3xs);
  cursor: pointer;
  transition: background 140ms ease-out;
}
.w46-recur-pill:hover {
  background: var(--lp-blue-tint);
}
.w46-recur-pill.is-on {
  background: var(--lp-primary);
  color: var(--lp-surface);
}
.w46-recur-pill:focus-visible {
  outline: 2px solid var(--lp-primary);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .w46-recur-pill { transition: none; }
}

/* ---- ends: a radio per line, its field beside it ------------------------------------- */
.w46-recur-ends {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.w46-recur-radio {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--lp-fs-2xs);
  cursor: pointer;
}
.w46-recur-radio input[type="radio"] {
  accent-color: var(--lp-primary);
}
.w46-recur-radio input[type="radio"]:focus-visible {
  outline: 2px solid var(--lp-primary);
  outline-offset: 2px;
}
.w46-recur-radio span {
  min-width: 44px;
}
.w46-recur-date {
  flex: 1;
  min-width: 0;
}

/* ---- more options: the power controls leave the default path, they do not leave ------- */
.w46-recur-more > summary {
  list-style: none;
  cursor: pointer;
  color: var(--lp-blue-deep);
  font-size: var(--lp-fs-2xs);
  padding: 4px 0;
}
.w46-recur-more > summary::-webkit-details-marker {
  display: none;
}
.w46-recur-more > summary:focus-visible {
  outline: 2px solid var(--lp-primary);
  outline-offset: 2px;
}
.w46-recur-more[open] > summary {
  margin-bottom: 8px;
}
.w46-recur-preview-count {
  display: block;
  margin-top: 8px;
  color: var(--lp-muted);
  font-size: var(--lp-fs-3xs);
}

/* ---- the two secondary controls and the footer pair ---------------------------------- */
.w46-recur-add {
  border: 0;
  background: transparent;
  font: inherit;
  color: var(--lp-blue-deep);
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: var(--lp-r-pill);
  border: 1px solid var(--lp-line);
  font-size: var(--lp-fs-2xs);
  cursor: pointer;
}
.w46-recur-add:hover {
  background: var(--lp-blue-tint);
}
.w46-recur-add:focus-visible {
  outline: 2px solid var(--lp-primary);
  outline-offset: 2px;
}
.w46-recur-card-foot {
  display: flex;
  justify-content: flex-end;
}
.w46-recur-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--lp-line);
}
.w46-recur-quiet {
  border: 0;
  background: transparent;
  font: inherit;
  color: var(--lp-muted);
  padding: 6px 8px;
  border-radius: var(--lp-r-sm);
  font-size: var(--lp-fs-2xs);
  cursor: pointer;
}
.w46-recur-quiet:hover {
  color: var(--lp-ink);
  background: var(--lp-surface-2);
}
.w46-recur-quiet.is-danger {
  color: var(--lp-red-deep);
  margin-right: auto;
}
.w46-recur-quiet.is-danger:hover {
  background: var(--lp-red-tint);
  color: var(--lp-red-deep);
}
.w46-recur-quiet:focus-visible {
  outline: 2px solid var(--lp-primary);
  outline-offset: 2px;
}
.w46-recur-save {
  border: 0;
  background: var(--lp-primary);
  font: inherit;
  color: var(--lp-surface);
  padding: 6px 16px;
  border-radius: var(--lp-r-pill);
  font-size: var(--lp-fs-2xs);
  cursor: pointer;
}
.w46-recur-save:hover {
  background: var(--lp-primary-hover);
}
.w46-recur-save:focus-visible {
  outline: 2px solid var(--lp-primary);
  outline-offset: 2px;
}