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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82cdb59
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
.cg-record-backdrop {
  position: fixed;
  inset: 0;
  /* ⭐⭐ OWNER ITEM 11 (2026-08-23) β€” A RECORD IS ALWAYS ON TOP. Owner: *"the Detail records
     when clicked should ALWAYS be at the top of every other navigation pop-up."* At
     `--cg-z-drawer` (70) it lost to the Map's route planner (95), so clicking a pin opened the
     record BEHIND the panel the click came from. `--cg-z-record` (100) is above every shell and
     surface layer; the portal'd anchored-overlay step sits above it on purpose, so a menu opened
     INSIDE this dialog still paints over it. */
  z-index: var(--cg-z-record);
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(25, 34, 46, 0.34);
  backdrop-filter: blur(1px);
}

/* ⭐⭐ W52-T22 (instruction 24, R6, C6) β€” THE MODAL IS A ROW NOW: RecordRail, then the shell
   that used to be the modal's whole content. R6's rail is a full-height structure beside the
   header, not a strip inside it, so the row split happens here rather than inside the header. */
/* ⭐⭐ W52-T23 (instruction 24, R6) β€” NEAR FULL WINDOW. R6, verbatim: "The record view widens to
   `calc(100vw - 96px)`, near full window." A flat value, not a `min()` clamp β€” the prior
   `min(1120px, calc(100vw - 48px))` capped the modal well short of the viewport on anything wider
   than ~1168px, which is what T22's rail needed room past. */
.cg-record-modal {
  width: calc(100vw - 96px);
  height: min(760px, calc(100vh - 48px));
  min-height: 420px;
  display: flex;
  flex-direction: row;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--lp-line) 82%, var(--lp-muted));
  border-radius: 12px;
  background: var(--lp-surface);
  box-shadow:
    0 30px 80px rgba(20, 30, 43, 0.24),
    0 4px 18px rgba(20, 30, 43, 0.12);
  color: var(--lp-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: var(--lp-fs-xs);
  animation: cg-record-open 150ms cubic-bezier(0.2, 0, 0, 1);
}

.cg-record-modal:focus {
  outline: none;
}

/* Universal linked-record viewer: the target is the real Grid surface, not a JSON-shaped
   approximation. It is deliberately wider than the record detail so filtering and multi-column
   sorting have the same working room they do on the database page. */
.cg-link-grid-modal {
  width: min(1320px, calc(100vw - 48px));
  height: min(840px, calc(100vh - 48px));
  min-height: 460px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--lp-line) 82%, var(--lp-muted));
  border-radius: 12px;
  background: var(--lp-surface);
  box-shadow:
    0 30px 80px rgba(20, 30, 43, 0.24),
    0 4px 18px rgba(20, 30, 43, 0.12);
  color: var(--lp-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: var(--lp-fs-xs);
  animation: cg-record-open 150ms cubic-bezier(0.2, 0, 0, 1);
}

.cg-link-grid-modal:focus { outline: none; }

.cg-link-grid-head {
  flex: 0 0 54px;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 14px 0 18px;
  border-bottom: 1px solid var(--lp-line);
  background: var(--lp-surface);
}

.cg-link-grid-title {
  font-size: var(--lp-fs-sm);
  font-weight: 650;
  line-height: 1.2;
}

.cg-link-grid-sub {
  margin-top: 2px;
  color: var(--lp-muted);
  font-size: var(--lp-fs-3xs);
}

.cg-link-grid-body {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  background: var(--lp-surface);
}

.cg-link-grid-foot {
  flex: 0 0 52px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px 14px;
  border-top: 1px solid var(--lp-line);
  background: var(--lp-surface);
}

@keyframes cg-record-open {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.992);
  }
}

/* ⭐⭐ W52-T22 β€” the column RecordRail now sits beside: header on top, the two-column layout
   (main + comments) below it, the same content the modal itself used to stack directly. */
.cg-record-shell {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.cg-record-shell > .cg-detail-header {
  height: 46px;
  padding: 0 12px;
  background: var(--lp-surface);
}

/* ⭐⭐ W53-T22 (instr 7, R4) β€” THE DRILL TRAIL'S OWN BAND, and it is the ONLY new rule this
   ticket adds. The crumbs themselves wear `cg-path-segments` / `cg-path-segment-wrap` /
   `cg-path-separator` / `cg-path-segment` / `cg-path-history-button`, which are unscoped in
   `index.css` and already shared by the Data rail and the Sheet rail; a second crumb treatment
   here is how two of the three would drift apart.
   ⚠ `flex: 0 0 auto` inside `.cg-record-shell`, so the band takes its own height and the layout
   below keeps the rest β€” a growing crumb list must never eat the record it describes.
   ⚠ AND IT IS RENDERED ONLY WHILE A FRAME IS PUSHED (`stack.length > 0` in the TSX), so no
   record in the product gains a permanent empty strip. */
.cg-record-path {
  flex: 0 0 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px 12px 5px;
  border-bottom: 1px solid var(--lp-line);
  background: var(--lp-surface);
}

.cg-record-layout {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.95fr) minmax(300px, 0.95fr);
}

/* ⭐⭐ W53-T21 (instr 5) β€” A LINKED-DATABASE TAB IS ONE COLUMN, THE WHOLE PANE.
   `RecordDetail.tsx` already WITHHOLDS `RecordComments` on a linked-database tab (W52-T24:
   `!frame && showComments && scope != null && activeTab === "fields"`), but the grid above is
   unconditional on the open tab, so the comments column kept RESERVING its 300px minimum with
   nothing in it while the embedded grid was squeezed into the rest. Reserved-but-empty is the
   owner's screenshot (reference/ERROR 21.png), and this is the rule that ends it: the layout
   carries `data-related-tab` (its value is the open EDGE KEY, so the DOM says WHICH linked
   database is open) exactly when a linked tab is active, and drops the attribute on Details, so
   the two-column anatomy comes straight back.
   ⚠ AN ATTRIBUTE, NOT A SECOND CLASS: `verify_record_layout.py`'s `drawer_anatomy_shape`
   greps the TSX for the literal, unconcatenated `className="cg-record-layout"`, so a templated
   class or a `clsx` call would read to that gate as the two-column drawer having been deleted.
   ⚠ AND AN ATTRIBUTE SELECTOR, NOT A BARE CLASS, FOR A SECOND REASON: this is specificity
   (0,2,0), which outranks the mobile `@media` block's own bare `.cg-record-layout` rule (0,1,0)
   near the end of this file no matter which of them comes last in source order.
   ⚠ THE ROW TRACK IS DECLARED TOO. A grid's implicit row is `auto`, which sizes to CONTENT:
   with the second column gone the mounted `.cg-shell` would stretch the drawer instead of
   scrolling inside it. `minmax(0, 1fr)` bounds the single cell to the layout's own height, which
   is what lets `.cg-record-related`'s `height: 100%` resolve. */
.cg-record-layout[data-related-tab] {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
}

/* ⭐⭐ W53-T21 (instr 5) β€” THE EMBEDDED GRID'S OWN VIEW RAIL, HIDDEN IN THIS ONE PLACE.
   `ViewSidebar`'s "All views / Create new / Find / <view name>" rail is the STANDALONE Data
   page's chrome for browsing other databases and folders from scratch; nested inside a record
   drawer it is a switcher with nowhere to go, and it eats the width this ticket is reclaiming.
   `.cg-record-related` is the wrapper `RecordDetail.tsx` already draws around the `RelatedGrid`
   mount, so this reaches that sidebar and ONLY that one: `RecordRail` is a direct child of
   `.cg-record-modal` and a SIBLING of `.cg-record-shell`, so it is not a descendant of
   `.cg-record-related` and this selector can never reach it.
   β›” NOT THE SAME LEVER AS `embedded`. `CustomerGrid.tsx::embedded` also switches the read to
   the WHOLE table filtered client-side, which is standing rule 1 pointed the wrong way on a
   connected source, and that file is outside this ticket's fence. This paints over the rail; the
   server-narrowed pinned read underneath is untouched. Precedent for hiding this exact sibling:
   `.cg-shell.is-view-fullscreen .cg-views` in index.css. */
.cg-record-related .cg-views {
  display: none;
}

.cg-record-modal--single {
  width: min(880px, calc(100vw - 48px));
}

.cg-record-modal--single .cg-record-layout {
  grid-template-columns: minmax(0, 1fr);
}

.cg-record-main {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.cg-record-main .cg-detail-titlewrap {
  padding: 22px 28px 18px;
}

.cg-record-main .cg-detail-title {
  font-size: var(--lp-fs-lg);
  line-height: 1.25;
}

.cg-record-main .cg-detail-body {
  min-height: 0;
  padding: 4px 12px 28px;
  scrollbar-gutter: stable;
}

.cg-record-main .cg-detail-section {
  padding: 16px;
}

/* ==========================================================================
   Wave 2026-08-02 item 2 β€” the record fields: no yellow, one subtle box.
   ==========================================================================
   Owner: "kill yellow, subtle outline for all field types."

   Before this, exactly one kind of field had a treatment β€” the editable
   overlay notes, in a gold frame on a gold wash (index.css:2027) β€” and every
   other field was bare text under a hairline. So the loudest thing in the
   panel was also the least important, and the panel had two layouts: label
   ABOVE a full-width textarea for notes, label BESIDE the value for the rest.

   Now every field is one row on one grid: label left, a value SLOT right.
   The slot carries a 1px --lp-line hairline and --lp-r-md corners, and the
   fill is what says whether it is yours:

     --lp-surface-2 (warm grey)  read-only β€” an Odoo attribute, a picked
                                 choice, a star rating you set from the table
     --lp-surface  (white)       editable β€” type here

   That replaces the signal the yellow wash used to carry (this stratum is
   your data, not the ERP's) with one that is also an affordance: the bright
   slots are the ones that respond. Interaction, not decoration, marks them.

   EVERY rule here is scoped `.cg-record-main …` so it (a) outranks the
   index.css base block, which is FROZEN for the other sessions this wave,
   and (b) stops at the record modal β€” the same `.cg-detail-*` classes dress
   surfaces this file does not own. Specificity, never source order: the
   :focus and ::placeholder overrides below exist because their index.css
   counterparts tie at (0,2,0) and (0,1,1), and a tie is decided by bundle
   order β€” which is not a thing to bet a gold glow on. */

.cg-record-main .cg-detail-field {
  min-height: 0;
  align-items: flex-start;
  gap: 12px;
  padding: 3px 0;
  /* The hairline separator is REPLACED by the box, not stacked under it β€”
     a ruled row around a bordered slot reads as a rendering fault. */
  border-bottom: none;
}

.cg-record-main .cg-detail-label {
  flex: 0 0 160px;
  /* Optical, not arithmetic: 7px lands the 12px label on the same line as the
     13px value inside its 1px border + 5px padding. */
  padding-top: 7px;
  color: var(--lp-muted);
  font-size: var(--lp-fs-2xs);
  line-height: 1.45;
}

.cg-record-main .cg-detail-field[data-cell-refused="true"] .cg-detail-label::after {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 4px;
  border-top: 6px solid var(--lp-red-deep);
  border-left: 6px solid transparent;
}

.cg-record-main .cg-detail-value {
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid var(--lp-line);
  border-radius: var(--lp-r-md);
  background: var(--lp-surface-2);
  line-height: 1.45;
}

/* ⭐ Wave-23 C8 (owner item 4 / ruling R9) β€” a MACHINE-OWNED field's value slot.

   `--lp-machine-tint` is EXACTLY what the canvas wash (`theme.MACHINE_CELL`,
   `washOf(LP_MACHINE_DEEP, 0.12)`) composites to over white, so the drawer slot
   and the grid cell are one grey rather than two that were each picked to look
   right on their own β€” the sibling-panel rule (DESIGN.md Β§2) applied across two
   rendering technologies instead of two panes.

   THE VALUE KEEPS ITS INK, deliberately, on both surfaces. The wash is the whole
   signal; dimming the number as well would say the figure matters less, and an
   automation-written follower count is the entire reason its column exists.

   Background only β€” no border change, no second marker. The column menu already
   says "Filled by automation" once, and DESIGN.md Β§4 is that the app does not
   narrate itself twice. */
.cg-record-main .cg-detail-field.is-machine .cg-detail-value {
  background: var(--lp-machine-tint);
}

/* A rating's marks are 18px inline SVG; on the text baseline they hang their
   descender space below the line box and grow the slot past every neighbour. */
.cg-record-main .cg-detail-value .cg-stars {
  vertical-align: middle;
}

/* An editable field is the same ROW as every other one now β€” index.css stacks
   it (flex-direction: column, and a label with `flex: none`), which is what
   made the notes the odd block out. */
.cg-record-main .cg-detail-field--edit {
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
}

.cg-record-main .cg-detail-field--edit .cg-detail-label {
  flex: 0 0 160px;
}

/* The value column of an editable row: the box, then its action link. */
.cg-detail-editwrap {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.cg-record-main .cg-detail-textarea {
  /* The owner's "big static box" was min-height: 76px. One row is the resting
     size; AutoTextarea grows it from there, so an empty note is as quiet as an
     empty value and a long one is readable without a scrollbar. */
  min-height: 30px;
  max-height: 260px;
  padding: 5px 9px;
  overflow-y: auto;
  /* The height is measured, so a drag handle would fight the measurement: the
     next keystroke re-fits and snaps back whatever was dragged. */
  resize: none;
  border: 1px solid var(--lp-line);
  background: var(--lp-surface);
  line-height: 1.45;
}

.cg-record-main .cg-detail-textarea:hover:not(:focus) {
  border-color: color-mix(in srgb, var(--lp-line) 45%, var(--lp-muted));
}

.cg-record-main .cg-detail-textarea:focus {
  /* Identical to the comment composer below β€” same modal, same gesture, so the
     same mark. `box-shadow: none` is load-bearing: without it index.css:2047's
     3px gold glow survives an override that only changes the border. */
  outline: 2px solid var(--lp-blue-deep);
  outline-offset: -1px;
  border-color: transparent;
  box-shadow: none;
}

.cg-record-main .cg-detail-textarea::placeholder {
  /* --lp-muted is the palette's body-safe grey (4.83:1). The stock #a2a2ac was
     picked against the gold wash and reads as 2.7:1 on white β€” and "Add
     notes…" is an instruction, not decoration. */
  color: var(--lp-muted);
  opacity: 1;
}

/* A checkbox IS its own control; boxing it would frame a 15px square in a
   30px slot and say nothing. It only needs to sit on the label's line. */
.cg-record-main .cg-detail-checkbox {
  margin-top: 7px;
}

/* ==========================================================================
   Wave 14 item 9 β€” an editor for EVERY user-created field type.
   ==========================================================================
   Until now one type was editable here (notes) and the other eight read. The
   affordance law item 2 established is what makes this scale without a legend:

     --lp-surface-2 (warm grey)  read-only
     --lp-surface  (white)       yours to change

   so `--live` is the ONLY thing that says "this responds", across nine row
   shapes. It is deliberately the same white the textarea already used, not a
   new colour: adding a third fill would turn a two-state signal into a puzzle.

   ONE BOX PER ROW. The controls are borderless and transparent INSIDE the
   slot rather than bordered themselves β€” a bordered input inside a bordered
   slot draws two rectangles 1px apart, which reads as a rendering fault, and
   it would also break the single label-left/value-right grid every other row
   sits on. The focus ring therefore lands on the SLOT (`:focus-within`) and
   the control's own outline is suppressed; the ring is the same 2px inset
   blue as the textarea and the comment composer, because it is the same
   gesture in the same modal.

   ⚠ `font: inherit` is NOT used on these controls. The `font` shorthand
   RESETS `font-variant-numeric`, which `.cg-detail-value` sets to tabular-nums
   (index.css:2013) β€” so the shorthand would silently un-align every number in
   the panel. The longhands are spelled out instead. */
.cg-record-main .cg-detail-value--live {
  background: var(--lp-surface);
}

.cg-record-main .cg-detail-value--live:hover:not(:focus-within) {
  border-color: color-mix(in srgb, var(--lp-line) 45%, var(--lp-muted));
}

.cg-record-main .cg-detail-value--live:focus-within {
  outline: 2px solid var(--lp-blue-deep);
  outline-offset: -1px;
  border-color: transparent;
}

/* The slot as a ROW: an avatar, a currency mark or a hint sits beside its
   control instead of above it. */
.cg-record-main .cg-detail-pickslot {
  display: flex;
  align-items: center;
  gap: 7px;
}

.cg-record-main .cg-detail-select,
.cg-record-main .cg-detail-input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--lp-ink);
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: 1.45;
}

/* The ring is on the slot; a second one inside it would draw a rectangle
   around a rectangle. */
.cg-record-main .cg-detail-select:focus,
.cg-record-main .cg-detail-input:focus {
  outline: none;
}

.cg-record-main .cg-detail-select {
  /* The native arrow is kept β€” it is the only thing that says "pick" once the
     border has been handed to the slot. */
  cursor: pointer;
  margin-left: -2px;
}

.cg-record-main .cg-detail-input--num,
.cg-record-main .cg-detail-value--num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Spinners removed, and not for looks: this panel SCROLLS, and a wheel event
   over a focused number input changes the value in Chrome. A currency figure
   silently edited by scrolling past it is data loss with no gesture behind it.
   The right-aligned tabular figure and the unit mark carry the type. */
.cg-record-main .cg-detail-input--num::-webkit-outer-spin-button,
.cg-record-main .cg-detail-input--num::-webkit-inner-spin-button {
  appearance: none;
  margin: 0;
}

.cg-record-main .cg-detail-input--num {
  -moz-appearance: textfield;
  appearance: textfield;
}

.cg-record-main .cg-detail-unit,
.cg-record-main .cg-detail-hint {
  flex: 0 0 auto;
  color: var(--lp-muted);
  font-size: var(--lp-fs-2xs);
}

.cg-record-main .cg-detail-hint {
  font-style: italic;
}

.cg-record-main .cg-detail-nochoice {
  color: var(--lp-muted);
  font-size: var(--lp-fs-2xs);
}

.cg-record-main .cg-detail-choice-create {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  gap: 7px;
}

.cg-record-main .cg-detail-choice-add {
  flex: 0 0 auto;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: var(--lp-blue-solid);
  font: inherit;
  font-size: var(--lp-fs-2xs);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.cg-record-main .cg-detail-choice-add:hover { text-decoration: underline; }

.cg-record-main .cg-detail-choice-add:focus-visible {
  outline: 2px solid var(--lp-blue-deep);
  outline-offset: 1px;
  border-radius: var(--lp-r-sm);
}

/* Multiselect: a chip row, not a `<select multiple>`. The native control needs
   ctrl-click for a second value and paints a four-row scrollbox for a
   three-choice field; a chip says its own state and takes one click. */
.cg-record-main .cg-detail-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.cg-record-main .cg-detail-chip {
  height: 22px;
  padding: 0 9px;
  border: 1px solid var(--lp-line);
  border-radius: var(--lp-r-pill);
  background: var(--lp-surface-2);
  color: var(--lp-muted);
  font-family: inherit;
  font-size: var(--lp-fs-2xs);
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.cg-record-main .cg-detail-chip:hover {
  border-color: var(--lp-blue-deep);
}

/* Tint fills, `-deep` on the text β€” the brand rule. The base pastel is not a
   readable ink at 12px. */
.cg-record-main .cg-detail-chip.is-on {
  border-color: var(--lp-blue-deep);
  background: var(--lp-blue-tint);
  color: var(--lp-blue-deep);
  font-weight: 600;
}

.cg-record-main .cg-detail-chip:focus-visible {
  outline: 2px solid var(--lp-blue-deep);
  outline-offset: 1px;
}

/* ⭐ Wave-19 R7 β€” the IMAGE slot: the picture, then its reference and controls.
   The thumbnail is `object-fit: contain` for the reason the grid cell is: a
   product photo cropped to a square loses the thing being sold. Letterboxing
   inside a bounded frame is the honest fit for a catalogue picture. */
.cg-record-main .cg-detail-imageslot {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.cg-record-main .cg-detail-image,
.cg-record-main .cg-detail-imageempty {
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  border: 1px solid var(--lp-line);
  border-radius: var(--lp-r-sm);
  background: var(--lp-surface-2);
  object-fit: contain;
}

.cg-record-main .cg-detail-imagemeta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  min-width: 0;
}

/* The reference itself, in the mono face: it is an identifier (a SKU code, a
   slug, a minted id), and identifiers are read character by character. The
   stack is spelled out rather than tokenised because there is no `--lp-mono`
   token β€” the three existing monospace sites in index.css all spell it too, and
   C6 says NO new tokens this wave. */
.cg-record-main .cg-detail-imageref {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--lp-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: var(--lp-fs-2xs);
}

.cg-record-main .cg-detail-imageacts {
  display: inline-flex;
  gap: 6px;
}

/* The `<label>` and the `<button>` are one control visually β€” the file input
   inside the label is hidden, which is the only way to style a file picker. */
.cg-record-main .cg-detail-imagebtn {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border: 1px solid var(--lp-line);
  border-radius: var(--lp-r-pill);
  background: var(--lp-surface-2);
  color: var(--lp-muted);
  font-family: inherit;
  font-size: var(--lp-fs-2xs);
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.cg-record-main .cg-detail-imagebtn:hover {
  border-color: var(--lp-blue-deep);
  color: var(--lp-blue-deep);
}

.cg-record-main .cg-detail-imagebtn input[type="file"] {
  display: none;
}

.cg-record-main .cg-detail-imageerr {
  color: var(--lp-red-deep);
  font-size: var(--lp-fs-2xs);
}

/* ⭐ Wave-23 C7 (owner item 5) β€” a `json` field's row: the same compact preview the grid cell
   paints, plus the door to the viewer. Reuses `.cg-detail-imagebtn` rather than minting a
   second quiet-button shape (DESIGN.md Β§4) β€” the two rows are doing the same job, showing a
   value too big for a slot and offering the surface that owns it. */
.cg-record-main .cg-detail-jsonslot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* ⚠ `min-width: 0` is what lets the ellipsis happen at all: a flex item's default
   `min-width: auto` refuses to shrink below its content, so the preview would push the Open
   button out of the panel instead of truncating. Monospace because the preview is a fragment
   of a document β€” `{handle: "royalimports"}` reads as code, and setting it in Inter beside the
   viewer's monospace tree would make one value look like two different things. */
.cg-record-main .cg-detail-jsonpreview {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: var(--lp-fs-2xs);
  color: var(--lp-ink);
}

/* Rating: the stars ARE the picker. Clicking the lit star clears the value β€”
   without it a rating could be changed here but never removed. */
.cg-record-main .cg-detail-stars {
  display: inline-flex;
  align-items: center;
  gap: 1px;
}

.cg-record-main .cg-detail-star {
  display: grid;
  place-items: center;
  padding: 0 1px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  line-height: 0;
}

.cg-record-main .cg-detail-star:focus-visible {
  outline: 2px solid var(--lp-blue-deep);
  outline-offset: 1px;
  border-radius: var(--lp-r-sm);
}

/* ==========================================================================
   Wave 14 item 11 (C-AVATAR) β€” the person, as a face.
   ==========================================================================
   R6: cells show the disc alone; here it sits BESIDE the name, because two
   initials at 20px identify nobody by themselves. The initials pastel is
   `pickTint`'s hash β€” the same one the option pills use β€” so one person is one
   colour on every surface, and it is the DESIGNED state rather than the error
   state: every deployment renders it until a photo is uploaded. */
.cg-record-main .cg-detail-avatar {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  object-fit: cover;
  font-size: var(--lp-fs-4xs);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
}

/* ==========================================================================
   Wave 2026-08-02 item 5 (C-LAYOUT) β€” the six-dot reorder handle.
   ==========================================================================
   Hover-revealed, Airtable's own behaviour and the reason it is right here:
   this panel carries ~26 fields, and 26 permanently-visible grips would put a
   dotted column down the left edge louder than any value in the record. The
   handle is an affordance for a gesture, not information.

   It keeps its 16px gutter at rest (`opacity`, never `display`), so revealing
   it cannot reflow the row under the pointer that is reaching for it β€” and it
   stays in the tab order at all times, which is what makes the ArrowUp/Down
   fallback reachable without a mouse.

   ⚠ Known gap, booked rather than papered over: HTML5 drag-and-drop does not
   fire for touch. On a touch device there is no hover, so the grip stays
   invisible and the gesture is simply absent β€” which is the honest
   degradation. A pointer-events reorder is the fix if it is ever asked for. */
.cg-detail-grip {
  flex: 0 0 16px;
  height: 22px;
  margin-top: 5px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: var(--lp-r-sm);
  background: transparent;
  color: var(--lp-muted);
  cursor: grab;
  opacity: 0;
  transition: opacity 90ms ease;
}

.cg-detail-field:hover .cg-detail-grip,
.cg-detail-grip:focus-visible {
  opacity: 1;
}

.cg-detail-grip:focus-visible {
  outline: 2px solid var(--lp-blue-deep);
  outline-offset: -1px;
}

.cg-detail-grip:active {
  cursor: grabbing;
}

/* S63-T03 / R3 β€” View order is edited in Fields, so a View-projected record has no second
   reorder door. Keep the grip's quiet gutter so labels do not jump sideways between a base
   record and a related record, where the per-record layout still applies. */
.cg-detail-grip-space {
  flex: 0 0 16px;
}

/* One semantic disclosure, at the bottom of the active View's visible field list. It has no
   card chrome because the record drawer is already the containing surface. Both closed and
   open display states are explicit: an author display rule must not defeat `<details>`' UA
   hiding rule and paint View-hidden values under a closed summary. */
.cg-detail-hidden-fields {
  margin-top: 12px;
  border-top: 1px solid var(--lp-line);
}

.cg-detail-hidden-summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 3px 0 28px;
  color: var(--lp-muted);
  font-size: var(--lp-fs-2xs);
  font-weight: 600;
  line-height: 1.45;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.cg-detail-hidden-summary::-webkit-details-marker {
  display: none;
}

.cg-detail-hidden-summary::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: -16px;
  border-left: 5px solid currentColor;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  transform-origin: 2px 4px;
  transition: transform 120ms ease;
}

.cg-detail-hidden-fields[open] > .cg-detail-hidden-summary::before {
  transform: rotate(90deg);
}

.cg-detail-hidden-count {
  min-width: 20px;
  padding: 1px 6px;
  border-radius: var(--lp-r-pill);
  background: var(--lp-surface-2);
  color: var(--lp-muted);
  font-size: var(--lp-fs-3xs);
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.cg-detail-hidden-fields:not([open]) > .cg-detail-hidden-list {
  display: none;
}

.cg-detail-hidden-fields[open] > .cg-detail-hidden-list {
  display: block;
  padding-bottom: 2px;
}

/* The row under the pointer. It is where the dragged field LANDS (it takes
   this slot), so the whole row is marked rather than an insertion line
   between two β€” an edge cannot say which side you are on. */
.cg-detail-field.is-dropzone {
  border-radius: var(--lp-r-md);
  background: var(--lp-blue-tint);
  box-shadow: inset 0 0 0 1px var(--lp-blue-deep);
}

.cg-detail-field.is-dragging {
  opacity: 0.4;
}

/* ==========================================================================
   W52-T22 (instruction 24, R6, C6) β€” the rail's OWN row markup.
   ==========================================================================
   The `.cg-views` / `.cg-views-top` / `.cg-views-scroll` shell rules are the unscoped
   `index.css` ones the View rail and the Sheet rail already wear β€” C6 forbids a second copy of
   those here. What is new is the ROW: a database name (and, only when two edges share one
   target, the field beneath it), styled to match the rest of the app's selected/hover language
   (`--lp-blue-tint` fill + `--lp-blue-deep` ink on selection, `--lp-surface-2` wash on hover β€”
   the same pair `.cg-record-tab.is-on` used before this ticket and `.cg-path-segment` still
   does) rather than a new shape for one rail. */
.cg-record-rail-list {
  padding-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.cg-record-rail-row {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  padding: 7px 8px;
  border: 0;
  border-radius: var(--lp-r-md);
  background: transparent;
  color: var(--lp-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.cg-record-rail-row:hover {
  background: var(--lp-surface-2);
}

.cg-record-rail-row.is-on {
  background: var(--lp-blue-tint);
}

.cg-record-rail-row.is-on .cg-record-rail-row-label {
  color: var(--lp-blue-deep);
}

.cg-record-rail-row:focus-visible {
  outline: 2px solid var(--lp-blue-deep);
  outline-offset: -1px;
}

.cg-record-rail-row-label {
  overflow: hidden;
  max-width: 100%;
  color: var(--lp-ink);
  font-size: var(--lp-fs-2xs);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cg-record-rail-row-sub {
  overflow: hidden;
  max-width: 100%;
  color: var(--lp-muted);
  font-size: var(--lp-fs-3xs);
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ⭐⭐ W54-T39 (instruction 22) β€” THE RAIL WHILE `/related` IS IN FLIGHT.
   The listing is roughly four times faster now, so most readers never see this; the ones on a
   cold compute or a slow link do, and what they saw before was `Details` alone with no sign that
   anything else was coming (`waves/wave54/shots/F-before-record.png`).

   β›” NO SHIMMER AND NO SPIN, and this is the app's existing decision rather than a new one:
   `shell/navExtras.css`'s `.shell-rail-skeleton-bar` states it in full β€” an animated sweep is a
   second thing moving in a rail whose whole complaint is movement, and `prefers-reduced-motion`
   would then need a third state. One flat tone at the same `--lp-surface-2` that rail uses. There
   is no animation here for a reduced-motion query to have to undo.
   ⚠ THE ROW GEOMETRY IS `.cg-record-rail-row`'S OWN, inherited rather than restated, so the
   placeholder occupies exactly the height a real row will and nothing shifts when the listing
   lands. Only `cursor` and the pointer wall are overridden; DESIGN section 4 asks a new nav
   element to join the existing rhythm rather than introduce a shape. */
.cg-record-rail-row.is-skeleton {
  cursor: default;
  pointer-events: none;
}

/* Sized to read as a name that has not arrived: the same 9 px bar height and 4 px radius the page
   rail's skeleton uses, at a width that sits under `.cg-record-rail-row-label`'s single line. */
.cg-record-rail-skeleton-bar {
  width: 78%;
  max-width: 108px;
  height: 9px;
  margin: 3px 0;
  border-radius: 4px;
  background: var(--lp-surface-2);
}

/* The SUBTITLE's stand-in: shorter and quieter, because that is what the second line of a real
   row is. Together the pair occupies the two-line height 24 of the 25 real edges settle at, so
   the rail does not step when the listing lands. */
.cg-record-rail-skeleton-bar.is-sub {
  width: 58%;
  max-width: 82px;
  height: 7px;
  opacity: 0.6;
}

/* W55-T15: one compact control row above every related projection. It reserves the same height
   before and after a mode change, and the hairline is the drawer's only internal separator. */
.cg-record-related-modebar {
  flex: 0 0 40px;
  min-width: 0;
  min-height: 40px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-bottom: 1px solid var(--lp-line);
  background: var(--lp-surface);
}

.cg-record-related-modebar .cg-modes,
.cg-record-related-modebar .cg-tb-btn,
.cg-record-related-modebar .cg-mode-field {
  min-height: 28px;
  align-items: center;
  line-height: 1;
}

/* The canonical projection owns its scrolling while this host owns the bounded drawer slot. */
.cg-record-related-modebody,
.cg-record-mode-skeleton {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
}

.cg-record-related-modebody {
  overflow: auto;
  background: var(--lp-surface);
  animation: cg-record-mode-arrive 160ms ease-out both;
}

/* Stable geometry replaces the requested projection immediately. No previous row content remains
   underneath it, and the five row bars keep the body height unchanged while the read settles. */
.cg-record-mode-skeleton {
  display: grid;
  grid-template-rows: 24px repeat(5, 36px) minmax(0, 1fr);
  gap: 8px;
  overflow: hidden;
  padding: 16px;
  background: var(--lp-surface);
  animation: cg-record-mode-arrive 160ms ease-out both;
}

.cg-record-mode-skeleton-head,
.cg-record-mode-skeleton-row {
  display: block;
  border-radius: 4px;
  background: var(--lp-surface-2);
}

.cg-record-mode-skeleton-head {
  width: min(220px, 36%);
}

.cg-record-mode-skeleton-row {
  width: 100%;
}

.cg-record-mode-skeleton-row.is-short {
  width: 72%;
}

@keyframes cg-record-mode-arrive {
  from {
    opacity: 0.58;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Folded, the real rows show no labels at all, so the placeholders drop their bars for the same
   reason `.shell-side.is-collapsed .shell-rail-skeleton-bar` does: otherwise the fold runs
   against a width the settled rail never has. */
.cg-views.is-collapsed .cg-record-rail-skeleton-bar {
  display: none;
}

.cg-record-insights {
  padding: 12px 16px 24px;
}

@media (max-width: 760px) {
  .cg-record-insights {
    padding-inline: 4px;
  }
}

.cg-record-comments {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--lp-line);
  background: var(--lp-wash);
}

.cg-record-comments-head {
  flex: 0 0 52px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
  border-bottom: 1px solid var(--lp-line);
  background: var(--lp-surface);
}

.cg-record-comments-head h2 {
  margin: 0;
  font-size: var(--lp-fs-sm);
  font-weight: 650;
}

.cg-record-comments-head span {
  min-width: 20px;
  padding: 1px 6px;
  border-radius: var(--lp-r-pill);
  background: var(--lp-surface-2);
  color: var(--lp-muted);
  font-size: var(--lp-fs-3xs);
  text-align: center;
}

.cg-record-comment-feed {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 16px;
}

.cg-record-comment-state {
  padding: 26px 10px;
  color: var(--lp-muted);
  font-size: var(--lp-fs-2xs);
  line-height: 1.5;
  text-align: center;
}

.cg-record-comment {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 9px;
  padding: 10px 0 13px;
}

.cg-record-comment + .cg-record-comment {
  border-top: 1px solid var(--lp-line);
}

.cg-record-comment-avatar {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--lp-blue-tint);
  color: var(--lp-blue-solid);
  font-size: var(--lp-fs-4xs);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.cg-record-comment-content {
  min-width: 0;
}

.cg-record-comment-meta {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.cg-record-comment-meta strong {
  min-width: 0;
  overflow: hidden;
  color: var(--lp-ink);
  font-size: var(--lp-fs-2xs);
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cg-record-comment-meta time {
  flex: 0 0 auto;
  color: var(--lp-muted);
  font-size: var(--lp-fs-4xs);
}

.cg-record-comment-delete {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-left: auto;
  border: 0;
  border-radius: var(--lp-r-sm);
  background: transparent;
  color: var(--lp-muted);
  cursor: pointer;
}

.cg-record-comment-delete:hover {
  background: var(--lp-red-tint);
  color: var(--lp-red-deep);
}

.cg-record-comment-content p {
  margin: 4px 0 0;
  color: var(--lp-ink);
  font-size: var(--lp-fs-2xs);
  line-height: 1.48;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.cg-record-comment-error {
  margin: 8px 0;
  padding: 8px 10px;
  border: 1px solid var(--lp-red);
  border-radius: var(--lp-r-md);
  background: var(--lp-red-tint);
  color: var(--lp-red-deep);
  font-size: var(--lp-fs-3xs);
  line-height: 1.4;
}

.cg-record-comment-compose {
  flex: 0 0 auto;
  padding: 12px 14px 14px;
  border-top: 1px solid var(--lp-line);
  background: var(--lp-surface);
}

.cg-record-comment-compose label {
  display: block;
  margin-bottom: 6px;
  color: var(--lp-ink);
  font-size: var(--lp-fs-2xs);
  font-weight: 600;
}

.cg-record-comment-compose textarea {
  width: 100%;
  min-height: 78px;
  max-height: 180px;
  resize: vertical;
  padding: 9px 10px;
  border: 1px solid var(--lp-line);
  border-radius: var(--lp-r-md);
  background: var(--lp-surface);
  color: var(--lp-ink);
  font: inherit;
  font-size: var(--lp-fs-2xs);
  line-height: 1.45;
}

.cg-record-comment-compose textarea:focus {
  outline: 2px solid var(--lp-blue-deep);
  outline-offset: -1px;
  border-color: transparent;
}

.cg-record-comment-compose-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 7px;
}

.cg-record-comment-compose-foot span {
  color: var(--lp-muted);
  font-size: var(--lp-fs-4xs);
}

.cg-record-comment-compose-foot button {
  min-width: 76px;
  height: 28px;
  border: 1px solid var(--lp-blue-solid);
  border-radius: var(--lp-r-md);
  background: var(--lp-blue-solid);
  color: white;
  font: inherit;
  font-size: var(--lp-fs-2xs);
  font-weight: 600;
  cursor: pointer;
}

.cg-record-comment-compose-foot button:disabled {
  opacity: 0.48;
  cursor: default;
}

@media (max-width: 760px) {
  .cg-record-backdrop {
    padding: 0;
  }

  .cg-record-modal,
  .cg-record-modal--single {
    width: 100vw;
    height: 100dvh;
    min-height: 0;
    border: 0;
    border-radius: 0;
  }

  .cg-record-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(220px, 1.2fr) minmax(250px, 0.8fr);
  }

  .cg-record-comments {
    border-top: 1px solid var(--lp-line);
    border-left: 0;
  }

  .cg-record-main .cg-detail-titlewrap {
    padding: 16px 18px 14px;
  }

  .cg-record-main .cg-detail-body {
    padding-inline: 2px;
  }

  /* Both selectors, because the editable row's label is set at (0,3,0) above:
     narrowing only the read-only one would step the two label columns apart at
     exactly the width where the misalignment is most visible. */
  .cg-record-main .cg-detail-label,
  .cg-record-main .cg-detail-field--edit .cg-detail-label {
    flex-basis: 120px;
  }
}

/* ==========================================================================
   Wave 14 R7 β€” one line, no wraps: the record modal's button rows.
   ==========================================================================
   Audited every row of controls this session renders. Two were real risks and
   the rest were already sound, which is worth recording so the next sweep does
   not re-derive it:

     Β· the header (β€Ή β€Ί Β· "Record 3 of 1,234" Β· Γ—) β€” the buttons are fixed
       28px squares, but the POSITION is variable text in a 44/46px fixed-height
       row. At a narrow width it wrapped to two lines and pushed itself out of
       the header it lives in.
     Β· the comment composer's foot β€” a character counter opposite a Post
       button under `space-between`; the counter wrapped before the button
       shrank, which moved the button off its baseline.
     Β· Documents rows were ALREADY correct (index.css: name ellipsises,
       meta and delete are `flex: 0 0 auto`) β€” left alone.
     Β· the tab row, the chip rows and the star row are new this wave and were
       built nowrap; the declarations below are what make that a rule rather
       than a coincidence of the current labels.

   `nowrap` is the assertion. A label that outgrows its space now overflows
   VISIBLY instead of quietly reflowing β€” the failure you can see beats the one
   you cannot. */
.cg-record-modal .cg-detail-pos,
.cg-record-main .cg-detail-chip,
.cg-record-comment-compose-foot button {
  white-space: nowrap;
}

/* W55-T16: the position keeps its footprint while a latest-intent navigation settles. */
.cg-record-modal .cg-detail-pos-skeleton {
  flex: 0 0 112px;
  width: 112px;
  height: 8px;
  border-radius: 4px;
  background: var(--lp-surface-2);
  animation-name: cg-record-mode-arrive;
  animation-duration: 160ms;
  animation-timing-function: ease-out;
  animation-fill-mode: both;
}

.cg-record-comment-compose-foot span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cg-record-comment-compose-foot button {
  flex: 0 0 auto;
}

@media (prefers-reduced-motion: reduce) {
  .cg-record-modal {
    animation: none;
  }

  .cg-detail-hidden-summary::before {
    transition: none;
  }
}

/* ⭐⭐ W47-T15 (owner instruction 17) β€” THE WORKSPACE NOTES PANEL, IN THE COMMENT LANGUAGE.
   Owner: "the UI/UX should be just like a comment, we already have that nice UI/UX for comment
   under the record detail view. Just copy it for godsake." So the note reuses the record-comment
   anatomy above (`cg-record-comment`, `-avatar`, `-content`, `-meta`, `-compose`, `-compose-foot`)
   and adds only what the drawer needs that a comment column does not.

   β›” IT DELIBERATELY DOES NOT WEAR `.cg-record-comments`. That wrapper carries its own
   `border-left` and `--lp-wash` background for a column inside the record modal;
   `.cg-workspace-drawer` (styles/wave45/data-applications.css) already supplies the surface,
   border and padding here, and stacking both would be the card-in-card DESIGN.md section 4 bans.

   β›” THE TABS EXISTED WITH NO RULE AT ALL. The old markup used `.cg-segmented`, and the ONLY
   selectors in the tree are `.cg-segmented-path` (index.css, styles/wave46/rail-select.css) β€”
   a different component. So those two buttons were rendering as raw user-agent chrome with a
   default border and grey fill: that is precisely the "buttons unbranded" the owner photographed
   in ERROR 17.png, and it is why a rule of their own is part of the fix rather than decoration.
   Base rule resets native chrome per DESIGN.md section 4. */
.cg-note-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
}

.cg-note-tab {
  flex: 1 1 0;
  padding: 6px 10px;
  border: 0;
  border-radius: var(--lp-r-md);
  background: transparent;
  color: var(--lp-muted);
  font: inherit;
  font-size: var(--lp-fs-2xs);
  font-weight: 600;
  cursor: pointer;
}

.cg-note-tab:hover {
  background: var(--lp-surface-2);
  color: var(--lp-ink);
}

.cg-note-tab[aria-pressed="true"] {
  background: var(--lp-blue-tint);
  color: var(--lp-blue-deep);
}

.cg-note-tab:focus-visible {
  outline: 2px solid var(--lp-blue-deep);
  outline-offset: -1px;
}

.cg-note-feed {
  margin-bottom: 4px;
}

/* The composer sits flush in the drawer, which already pads itself. */
.cg-note-compose {
  padding: 12px 0 0;
}

/* β›”β›” SPECIFICITY, NOT TIDINESS, AND IT IS LOAD-BEARING.
   `styles/wave45/data-applications.css` carries `.cg-workspace-drawer textarea { min-height:220px;
   margin-bottom:10px; ... }`. That selector is (0,1,1) and so is `.cg-record-comment-compose
   textarea`, so the two TIE β€” and ties break on source order. `CustomerGrid.tsx` imports
   `RecordDetail` (line 85) before `data-applications.css` (line 114), so THIS file is emitted
   FIRST and LOSES. Naming the element's own class as well makes this (0,2,1), which wins on
   specificity and therefore does not depend on import order at all. Do not "simplify" it back to
   a single class: the composer silently grows a 220px box again and the panel stops matching the
   comment it was asked to copy. */
.cg-note-compose textarea.cg-note-input {
  width: 100%;
  min-height: 96px;
  max-height: 220px;
  margin-bottom: 0;
  resize: vertical;
  padding: 9px 10px;
  border: 1px solid var(--lp-line);
  border-radius: var(--lp-r-md);
  background: var(--lp-surface);
  color: var(--lp-ink);
  font: inherit;
  font-size: var(--lp-fs-2xs);
  line-height: 1.45;
}

.cg-note-compose textarea.cg-note-input:focus {
  outline: 2px solid var(--lp-blue-deep);
  outline-offset: -1px;
  border-color: transparent;
}

/* ⭐⭐ W47-T16 (owner instruction 19) β€” THE UNREAD MARK, AND THE NOTE'S EDIT DOOR.
   ⚠ WHY THE BADGE'S RULE LIVES IN THIS FILE and not beside the toolbar's other controls: lane C's
   fence this wave contains exactly one stylesheet, this one. `index.css` and
   `styles/wave46/chrome.css` belong to nobody's fence and `styles/wave45/data-applications.css` is
   lane A's. CSS is global, so the rule works from here; it is filed under the notes block it
   belongs to rather than smuggled into a sheet this lane may not write. A later wave that owns the
   toolbar sheet should move it, and this comment is the note to do so.
   β›” NO absolute positioning and no overlap: the badge is a FLEX SIBLING after the glyph, inside
   the button. `.cg-tb-btn` sets no containing block, and a badge pinned to a corner would need one,
   so it would have drifted the moment the toolbar re-flowed. */
.cg-notes-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  margin-left: 5px;
  border-radius: var(--lp-r-pill);
  background: var(--lp-blue-solid);
  color: #fff;
  font-size: var(--lp-fs-4xs);
  font-weight: 700;
  line-height: 1;
}

/* The edit door rides the comment meta row, exactly where `RecordComments` puts its delete
   control, so the note keeps the anatomy instruction 17 asked it to copy. It is a QUIET button
   (DESIGN.md section 4): muted ink, wash on hover, no chrome at rest. It is not destructive and
   must never take the red the delete control uses. */
.cg-note-edit,
.cg-note-cancel {
  margin-left: auto;
  padding: 2px 6px;
  border: 0;
  border-radius: var(--lp-r-md);
  background: transparent;
  color: var(--lp-muted);
  font: inherit;
  font-size: var(--lp-fs-3xs);
  font-weight: 600;
  cursor: pointer;
}

.cg-note-edit:hover,
.cg-note-cancel:hover {
  background: var(--lp-surface-2);
  color: var(--lp-ink);
}

.cg-note-edit:focus-visible,
.cg-note-cancel:focus-visible {
  outline: 2px solid var(--lp-blue-deep);
  outline-offset: -1px;
}

/* In the composer foot the Cancel sits beside the submit, not pushed away from it. */
.cg-record-comment-compose-foot .cg-note-cancel {
  margin-left: auto;
  margin-right: 6px;
}

/* ⭐⭐ W54-T38 (instruction 22, contract C5, DESIGN.md section 4) β€” A REFUSAL IS ONE SENTENCE,
   AND ITS DIAGNOSIS IS ONE CLICK DOWN.

   The owner was shown a sixty-word paragraph four times over on one record. W54-T37 fixed the
   CAUSE and left the presentation, which is the other half of what he reported: section 4 says
   "never over-explain", and the block sat ABOVE the grid, so a tab's own rows started below the
   fold. The markup fix is in `RecordDetail.tsx` (the strip moved under the grid and each refusal
   became a `<details>`); these rules are what make it read as one quiet line.

   β›” WHY THIS FILE AND NOT `index.css`. This ticket owns `RecordDetail.css` and does not own
   `index.css`, where the one existing disclosure-over-a-refusal (`.cg-ts-refused`) lives. These
   rules FOLLOW that precedent deliberately, down to both of its scars, rather than reaching for
   its classes: a shared class would put this surface's layout inside a stylesheet that another
   lane owns.

   β›”β›” SCAR 1, INHERITED FROM `.cg-ts-refsum`: THE CARET IS DRAWN WITH BORDERS. A triangle glyph
   renders at a different size in every font on the three platforms this runs on, and this one has
   to sit on a line of 12px text. It is also not an icon, which matters twice over: this ticket may
   not extend `iconShapes.ts`.
   β›”β›” SCAR 2, AND IT SHIPPED ONCE AND WAS CAUGHT ONLY BY A SCREENSHOT: THE CLOSED STATE IS
   DECLARED. `<details>` hides its non-summary children through a UA rule, and ANY author `display`
   beats a UA declaration regardless of specificity, so `.cg-refusal-why { display: block }` alone
   would re-show the whole wall behind a summary claiming to hide it. Both states are stated. */
.cg-refusal-strip {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 16px 12px;
  border-top: 1px solid var(--lp-line);
}

.cg-refusal-sum {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 2px 0;
  color: var(--lp-muted);
  font-size: var(--lp-fs-2xs);
  line-height: 1.45;
  cursor: pointer;
  list-style: none;          /* Safari and Chrome draw their own triangle; replaced below */
  user-select: none;
}

.cg-refusal-sum::-webkit-details-marker {
  display: none;
}

.cg-refusal-sum::before {
  content: "";
  flex: 0 0 auto;
  align-self: center;
  width: 0;
  height: 0;
  border-left: 4px solid currentColor;
  border-top: 3.5px solid transparent;
  border-bottom: 3.5px solid transparent;
  transition: transform 120ms ease-out;
}

.cg-refusal[open] > .cg-refusal-sum::before {
  transform: rotate(90deg);
}

.cg-refusal-sum:hover {
  color: var(--lp-ink);
}

.cg-refusal-sum:focus-visible {
  outline: 2px solid var(--lp-blue-deep);
  outline-offset: 1px;
  border-radius: var(--lp-r-md);
}

/* The subject the server named, on the same line as its sentence rather than above it: a second
   line per refusal is the stacking this ticket is removing. */
.cg-refusal-who {
  flex: 0 0 auto;
  color: var(--lp-ink);
  font-weight: 600;
}

.cg-refusal-say {
  min-width: 0;
}

.cg-refusal-why {
  display: none;
  margin: 2px 0 6px;
  padding: 0 0 0 10px;
  color: var(--lp-muted);
  font-size: var(--lp-fs-2xs);
  line-height: 1.5;
}

.cg-refusal[open] > .cg-refusal-why {
  display: block;
}

/* A refusal the server sent with no diagnosis (a pinned read: `_refusal_error` carries the
   sentence and no second string) keeps the panel's ordinary note voice and grows no caret. */
.cg-refusal-flat {
  padding: 16px;
}

@media (prefers-reduced-motion: reduce) {
  .cg-record-related-modebody,
  .cg-record-mode-skeleton,
  .cg-detail-pos-skeleton {
    animation: none;
  }

  .cg-refusal-sum::before {
    transition: none;
  }
}