File size: 28,185 Bytes
7c1820c
852b0d3
7c1820c
852b0d3
aa1490a
 
7c1820c
852b0d3
7c1820c
 
 
 
852b0d3
 
7c1820c
 
852b0d3
8145bee
852b0d3
 
7c1820c
852b0d3
 
8145bee
 
 
 
 
 
 
 
 
 
 
852b0d3
8145bee
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1ad1eea
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8145bee
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7c1820c
 
 
852b0d3
 
 
 
 
 
 
 
 
7c1820c
 
852b0d3
 
 
 
 
 
 
 
7c1820c
 
852b0d3
 
 
 
 
aa1490a
 
852b0d3
7c1820c
852b0d3
 
81a8217
8145bee
7c1820c
 
852b0d3
 
 
 
 
aa1490a
852b0d3
 
7c1820c
 
852b0d3
 
 
 
7c1820c
 
 
 
8145bee
 
 
 
 
 
 
 
 
 
 
 
 
1ad1eea
8145bee
 
 
 
 
 
 
 
 
 
 
 
1ad1eea
8145bee
 
852b0d3
 
 
 
aa1490a
8145bee
 
 
 
 
 
 
aa1490a
 
 
8145bee
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1ad1eea
 
 
 
 
 
 
 
 
 
 
8145bee
aa1490a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8145bee
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
aa1490a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
852b0d3
7c1820c
852b0d3
7c1820c
 
1ad1eea
852b0d3
 
 
 
1ad1eea
 
 
 
852b0d3
 
 
 
 
7c1820c
852b0d3
 
 
 
 
 
7c1820c
 
852b0d3
 
7c1820c
 
852b0d3
 
 
 
 
 
 
7c1820c
 
852b0d3
 
 
 
7c1820c
 
852b0d3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1ad1eea
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9b857f7
 
 
 
 
 
 
 
 
1ad1eea
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9b857f7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
852b0d3
7c1820c
852b0d3
 
 
 
 
 
 
7c1820c
 
852b0d3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7c1820c
1ad1eea
8145bee
81a8217
1ad1eea
852b0d3
 
8145bee
 
 
 
852b0d3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7c1820c
 
852b0d3
 
 
7c1820c
852b0d3
 
 
7c1820c
 
852b0d3
 
 
8145bee
 
852b0d3
 
 
 
1ad1eea
8145bee
1ad1eea
852b0d3
7c1820c
1ad1eea
7c1820c
 
852b0d3
1ad1eea
8145bee
1ad1eea
 
 
 
 
 
 
 
 
 
 
8145bee
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
852b0d3
 
 
 
 
 
 
 
 
7c1820c
 
852b0d3
 
 
 
 
 
 
 
 
 
 
7c1820c
852b0d3
 
 
 
 
 
 
 
 
 
 
 
 
 
7c1820c
 
 
852b0d3
 
 
 
 
 
 
 
7c1820c
 
852b0d3
 
 
 
 
 
 
 
 
 
 
 
7c1820c
852b0d3
 
 
 
7c1820c
 
852b0d3
 
 
 
 
 
 
 
 
 
 
 
 
 
7c1820c
bdac669
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
aa1490a
bdac669
 
 
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
/* ---------------------------------------------------------------------------
   assistant/assistant.css β€” the AI assistant's chat surface (owner item 2).

   The shape is borrowed, reference by reference: ChatGPT's centred column and
   in-field composer. One persistent conversation fills the page.
   The palette follows Loopable's existing tokens.

   EVERY FONT SIZE IS A `--lp-fs-*` TOKEN AND EVERY COLOUR A `--lp-*` TOKEN.
   Wave-21 R5 is gated app-wide over every CSS file under src, and a literal
   here reds `web_ui` for the whole tree. No emojis, no ALL-CAPS chrome
   (DESIGN.md R6).

   AND DO NOT WRITE A GLOB IN THIS COMMENT: a star-star followed by a slash is
   the CSS comment terminator, and `lightningcss` then dies far from the cause.
--------------------------------------------------------------------------- */

.as-chat {
  position: relative;
  display: flex;
  width: 100%;
  height: 100%;
  min-width: 0;
  overflow: hidden;
}

.as-memory {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  width: min(40%, calc(var(--lp-content-inset) * 18));
  min-width: 0;
  box-sizing: border-box;
  border-left: var(--lp-hairline-width) solid var(--lp-line);
  background: var(--lp-surface);
  color: var(--lp-ink);
  font-size: var(--lp-fs-xs);
  line-height: var(--lp-lh);
}
.as-memory:focus { outline: none; }
.as-memory-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--lp-home-tile-inset);
  padding: var(--lp-home-tile-inset) var(--lp-content-inset);
  background: var(--lp-surface-2);
  color: var(--lp-ink);
}
.as-memory-head h2 {
  margin: 0;
  font-size: var(--lp-fs-sm);
  font-weight: var(--lp-fw-semibold);
}
.as-memory-button {
  border: 0;
  background: transparent;
  font: inherit;
  color: inherit;
  padding: var(--lp-home-pagination-gap) calc(var(--lp-home-pagination-gap) * 2);
  border-radius: var(--lp-r-sm);
  color: var(--lp-muted);
  cursor: pointer;
}
/* R112: Memory is one small icon. The word stays in the DOM as the accessible text and is hidden
   by an off-box text indent; the glyph is an alpha mask over currentColor, so it follows the theme. */
.as-memory-open {
  position: relative;
  flex: 0 0 auto;
  width: var(--lp-home-pagination-control-size);
  height: var(--lp-home-pagination-control-size);
  padding: 0;
  overflow: hidden;
  white-space: nowrap;
  text-indent: 200%;
}
.as-memory-open::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 16px;
  height: 16px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 2.5h7l2 2v9h-9z'/%3E%3Cpath d='M5.8 6.5h4.4M5.8 9h4.4M5.8 11.5h2.6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 2.5h7l2 2v9h-9z'/%3E%3Cpath d='M5.8 6.5h4.4M5.8 9h4.4M5.8 11.5h2.6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.as-memory-open[aria-expanded="true"] { color: var(--lp-ink); }
.as-memory-erase { color: var(--lp-red-deep); }
.as-memory-button:disabled { opacity: var(--lp-home-disabled-opacity); cursor: not-allowed; }
.as-memory-button:focus-visible {
  outline: calc(var(--lp-hairline-width) * 2) solid var(--lp-blue-deep);
  outline-offset: var(--lp-hairline-width);
}
@media (hover: hover) and (pointer: fine) {
  .as-memory-button:hover:enabled { background: var(--lp-wash); }
}
.as-memory-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-anchor: none;
  scrollbar-gutter: stable;
  padding: var(--lp-content-inset);
}
.as-memory-group + .as-memory-group { margin-top: var(--lp-section-gap); }
.as-memory-group h3 {
  margin: 0 0 var(--lp-home-pagination-gap);
  color: var(--lp-muted);
  font-size: var(--lp-fs-xs);
  font-weight: var(--lp-fw-semibold);
}
.as-memory-group ul { list-style: none; margin: 0; padding: 0; }
.as-memory-row { padding: var(--lp-home-pagination-inset) 0; }
.as-memory-row + .as-memory-row { border-top: var(--lp-hairline-width) solid var(--lp-line); }
.as-memory-text { margin: 0; overflow-wrap: anywhere; }
.as-memory-source {
  margin: var(--lp-home-pagination-gap) 0;
  color: var(--lp-muted);
  font-size: var(--lp-fs-2xs);
}
.as-memory-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--lp-home-pagination-gap);
  min-height: var(--lp-home-pagination-control-size);
  font-size: var(--lp-fs-2xs);
}
.as-memory-empty { margin: 0; color: var(--lp-muted); }
.as-memory-problem { color: var(--lp-red-deep); font-size: var(--lp-fs-2xs); }
.as-memory-status {
  min-height: 1lh;
  margin: 0;
  padding: var(--lp-home-pagination-gap) var(--lp-content-inset);
  color: var(--lp-muted);
  font-size: var(--lp-fs-2xs);
}
.as-memory-skeleton {
  height: calc(var(--lp-content-inset) * 3);
  border-radius: var(--lp-r-sm);
  background: var(--lp-wash);
}

@media (max-width: 767px) {
  .as-chat:has(> .as-memory) { flex-direction: column; }
  .as-chat:has(> .as-memory) .as-conversation {
    flex: 1 1 55%;
    height: auto;
    min-height: 0;
  }
  .as-memory {
    flex: 1 1 45%;
    width: 100%;
    min-height: 0;
    border-left: 0;
    border-top: var(--lp-hairline-width) solid var(--lp-line);
  }
}


/* ── ChatGPT's column ─────────────────────────────────────────────────────── */

.as-conversation {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* One measure, used by the stream, the dock and the opening state, so the
   composer does not shift sideways when the first answer arrives. */
.as-column {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}

.as-stream {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 26px 0 8px;
  overflow-anchor: none;
  scrollbar-gutter: stable;
}

.as-dock {
  flex: 0 0 auto;
  padding: var(--lp-panel-inset) 0 calc(var(--lp-panel-inset) * 2);
  background: transparent;
}

.as-opening {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 0 24px;
  box-sizing: border-box;
  text-align: center;
}

.as-opening-p {
  max-width: 52ch;
  margin: 0 0 20px;
  color: var(--lp-muted);
  font-size: var(--lp-fs-sm);
  line-height: var(--lp-lh);
}

.as-suggestions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: calc(var(--lp-home-pagination-gap) * 2);
}
.as-suggestion {
  border: 0;
  background: transparent;
  font: inherit;
  color: inherit;
  padding: calc(var(--lp-home-pagination-gap) * 2) var(--lp-home-tile-inset);
  border-radius: var(--lp-r-md);
  background: var(--lp-surface-2);
  color: var(--lp-ink);
  font-size: var(--lp-fs-xs);
  line-height: var(--lp-lh);
  overflow-wrap: anywhere;
  cursor: pointer;
}
.as-suggestion:disabled { opacity: var(--lp-home-disabled-opacity); cursor: not-allowed; }
.as-suggestion:focus-visible {
  outline: calc(var(--lp-hairline-width) * 2) solid var(--lp-blue-deep);
  outline-offset: var(--lp-hairline-width);
}
@media (hover: hover) and (pointer: fine) {
  .as-suggestion:hover:enabled { background: var(--lp-line); }
}

/* ── the messages ─────────────────────────────────────────────────────────── */

.as-message { margin: 0 0 22px; }

.as-turn { margin-bottom: 22px; }
.as-tool-step {
  color: var(--lp-muted);
  font-size: var(--lp-fs-2xs);
  margin: 0;
}
.as-answer-pending:empty { display: none; }
.as-turn:has(.as-answer-pending:empty) { display: none; }
.as-turn > .as-message { margin-bottom: 0; }
.as-turn.is-new { animation: as-turn-enter 180ms ease-out; }

.as-notice {
  padding: var(--lp-home-tile-inset);
  border: var(--lp-hairline-width) solid var(--lp-line);
  border-radius: var(--lp-r-md);
  background: var(--lp-surface);
  color: var(--lp-ink);
  font-size: var(--lp-fs-xs);
  line-height: var(--lp-lh);
  overflow-wrap: anywhere;
}
.as-notice-sender { margin: 0 0 var(--lp-home-pagination-gap); color: var(--lp-muted); font-size: var(--lp-fs-2xs); }
.as-notice-subject { margin: 0; font-size: var(--lp-fs-sm); font-weight: var(--lp-fw-semibold); }
.as-notice-body { margin: var(--lp-home-pagination-inset) 0 0; }
.as-notice-open { display: inline-block; margin-top: var(--lp-home-pagination-inset); color: var(--lp-blue-solid); }
.as-notice-open:focus-visible {
  outline: calc(var(--lp-hairline-width) * 2) solid var(--lp-blue-deep);
  outline-offset: var(--lp-hairline-width);
}
/* C6: Approve is the inbox card's primary choice. Not now stays the quiet confirm button. */
.as-notice .as-confirm-actions { margin-top: var(--lp-home-pagination-inset); }
.as-notice .as-notice-approve {
  border-radius: var(--lp-r-md);
  background: var(--lp-primary);
  color: var(--lp-surface);
}
.as-notice .as-confirm-button:disabled { opacity: var(--lp-home-disabled-opacity); }
@media (hover: hover) and (pointer: fine) {
  .as-notice .as-notice-approve:hover:not(:disabled) { background: var(--lp-primary-hover); }
}

/* C22's facts share one containment layer; the turn owns entry motion. */
.as-ping {
  padding: 16px;
  border: 1px solid var(--lp-line);
  border-radius: var(--lp-r-md);
  background: var(--lp-surface);
  color: var(--lp-ink);
  font-size: var(--lp-fs-xs);
  line-height: var(--lp-lh);
  overflow-wrap: anywhere;
}
.as-ping-label { margin: 0 0 4px; color: var(--lp-muted); font-size: var(--lp-fs-2xs); }
.as-ping-title { margin: 0; font-size: var(--lp-fs-sm); font-weight: 600; }
.as-ping-facts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 16px; margin-top: 12px; }
.as-ping-fact { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }
.as-ping-reason,
.as-ping-action { margin: 12px 0 0; }
.as-ping-assigned { margin: 8px 0 0; color: var(--lp-muted); font-size: var(--lp-fs-2xs); }
.as-ping-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 12px; }
.as-ping-button {
  border: 0;
  background: transparent;
  font: inherit;
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 32px;
  padding: 4px 8px;
  border-radius: var(--lp-r-sm);
  text-decoration: none;
  cursor: pointer;
}
.as-ping-actions .as-ping-button { color: var(--lp-muted); }
.as-ping-button:disabled { opacity: 0.65; cursor: not-allowed; }
.as-ping-button:focus-visible { outline: 2px solid var(--lp-blue-solid); outline-offset: 2px; }
.as-ping-result { margin: 8px 0 0; color: var(--lp-muted); font-size: var(--lp-fs-2xs); }
.as-ping-problem { color: var(--lp-red-deep); }
.as-ping-digest { margin: 12px 0 0; padding: 0; list-style: none; }
.as-ping-ticket { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0; }
.as-ping-ticket + .as-ping-ticket { border-top: 1px solid var(--lp-line); }
.as-ping-ticket a { flex-shrink: 0; color: var(--lp-blue-solid); }
.as-ping-picker {
  min-width: 200px;
  max-width: 320px;
  padding: 4px;
  border: 1px solid var(--lp-line);
  border-radius: var(--lp-r-md);
  background: var(--lp-surface);
  color: var(--lp-ink);
  font-size: var(--lp-fs-xs);
  line-height: var(--lp-lh);
  animation: as-ping-picker-enter 180ms ease-out;
}
.as-ping-person { display: flex; width: 100%; justify-content: flex-start; text-align: left; overflow-wrap: anywhere; }
.as-ping-skeleton { height: 32px; border-radius: var(--lp-r-sm); background: var(--lp-surface-2); }
.as-ping-empty { margin: 0; padding: 8px; color: var(--lp-muted); }
@keyframes as-ping-picker-enter {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (hover: hover) and (pointer: fine) {
  .as-ping-button:hover:not(:disabled) { background: var(--lp-surface-2); color: var(--lp-ink); }
}
@media (prefers-reduced-motion: reduce) {
  .as-ping-picker { animation: none; }
}

@keyframes as-turn-enter {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.as-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  color: var(--lp-muted);
  font-size: var(--lp-fs-2xs);
  overflow-wrap: anywhere;
}
.as-divider::before,
.as-divider::after { content: ""; flex: 1; border-top: 1px solid var(--lp-line); }

.as-door {
  margin: 0 0 6px;
  color: var(--lp-muted);
  font-size: var(--lp-fs-2xs);
}

.as-skeleton {
  width: 65%;
  height: 20px;
  margin: 0 0 22px;
  border-radius: var(--lp-r-md);
  background: var(--lp-surface-2);
}
.as-skeleton--idle { visibility: hidden; }

.as-typing {
  display: flex;
  align-items: center;
  gap: calc(var(--lp-hairline-width) * 4);
  min-height: calc(var(--lp-fs-sm) * var(--lp-lh));
}

.as-typing-dot {
  width: calc(var(--lp-hairline-width) * 6);
  height: calc(var(--lp-hairline-width) * 6);
  border-radius: var(--lp-r-pill);
  background: var(--lp-muted);
  opacity: 0.5;
  animation: as-typing-dot calc(var(--lp-motion-feedback-duration) * 6)
    var(--lp-motion-feedback-easing) infinite;
}
.as-typing-dot:nth-child(2) { animation-delay: var(--lp-motion-feedback-duration); }
.as-typing-dot:nth-child(3) { animation-delay: calc(var(--lp-motion-feedback-duration) * 2); }

@keyframes as-typing-dot {
  0%, 100% { opacity: 0.5; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(calc(var(--lp-hairline-width) * -2)); }
}

@media (prefers-reduced-motion: reduce) {
  .as-typing-dot { animation: none; opacity: 1; transform: none; }
}

.as-confirm {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--lp-line);
  border-radius: var(--lp-r-md);
  font-size: var(--lp-fs-xs);
  line-height: var(--lp-lh);
}
.as-confirm > p { margin: 0 0 8px; }
.as-confirm-actions { display: flex; gap: 8px; }
.as-confirm-button,
.as-retry {
  border: 0;
  background: transparent;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.as-confirm-button {
  min-height: 32px;
  padding: 6px 12px;
  border-radius: var(--lp-r-md);
  color: var(--lp-ink);
}
.as-confirm-delete { background: var(--lp-red-deep); color: var(--lp-surface); }
.as-confirm-button:disabled,
.as-retry:disabled { opacity: 0.65; cursor: not-allowed; }
.as-confirm-button:focus-visible,
.as-retry:focus-visible { outline: 2px solid var(--lp-blue-solid); outline-offset: 2px; }
.as-retry { padding: 0; text-decoration: underline; }
.as-confirm-result { margin: 8px 0 0; font-size: var(--lp-fs-xs); color: var(--lp-muted); }
.as-confirm .as-problem { margin: 8px 0 0; }

.as-write-report {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin: 8px 0 0;
  color: var(--lp-muted);
  font-size: var(--lp-fs-2xs);
}
.as-write-target { overflow-wrap: anywhere; }
.as-write-report a { color: var(--lp-blue-solid); }

@media (hover: hover) and (pointer: fine) {
  .as-confirm-button:hover:not(:disabled) { background: var(--lp-surface-2); }
  .as-confirm-delete:hover:not(:disabled) { background: var(--lp-red-deep); opacity: 0.9; }
}

.as-message--user {
  display: flex;
  justify-content: flex-end;
}

/* R110: the user's turn is a brand purple bubble with white text. White on --lp-primary measures 7.7 to 1. */
.as-bubble {
  max-width: 78%;
  margin: 0;
  padding: 9px 14px;
  /* 20px is half the 39px one-line height: one line reads as a pill, more lines get large corners. */
  border-radius: calc(var(--lp-r-lg) * 2);
  background: var(--lp-primary);
  color: var(--lp-surface);
  font-size: var(--lp-fs-sm);
  line-height: var(--lp-lh);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* No bubble and no "Assistant" label: the reference prints the answer as the
   page's own prose, and a role label on every turn is the thing that makes a
   chat read like a transcript instead of a reply. */
.as-message-text {
  margin: 0;
  color: var(--lp-ink);
  font-size: var(--lp-fs-sm);
  line-height: var(--lp-lh);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.as-message--assistant.is-refusal .as-message-text { color: var(--lp-muted); }

.as-numeric {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 10px 0 0;
}

.as-numeric-label { color: var(--lp-muted); font-size: var(--lp-fs-2xs); }
.as-numeric-value { color: var(--lp-ink); font-size: var(--lp-fs-md); font-weight: 650; }

.as-preview {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 12px;
  padding: 9px 13px;
  border: 1px solid var(--lp-line);
  border-radius: var(--lp-r-md);
  background: var(--lp-surface);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.as-preview:hover { background: var(--lp-surface-2); }
.as-preview-name { color: var(--lp-ink); font-size: var(--lp-fs-xs); font-weight: 600; }
.as-preview-meta { color: var(--lp-blue-solid); font-size: var(--lp-fs-2xs); font-weight: 600; }

/* S72-T16 (C7, R98): a made file is one chip under the answer. An image shows below it, bounded. */
.as-artifacts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.as-artifact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  max-width: 100%;
}

.as-artifact-row {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 100%;
  padding: 9px 13px;
  border: 1px solid var(--lp-line);
  border-radius: var(--lp-r-md);
  background: var(--lp-surface);
}

.as-artifact-row:hover { background: var(--lp-surface-2); }

.as-artifact-open {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.as-artifact-download {
  color: var(--lp-blue-solid);
  font-size: var(--lp-fs-2xs);
  font-weight: 600;
  text-decoration: none;
}

.as-artifact-download:hover { text-decoration: underline; }

.as-artifact-open:focus-visible,
.as-artifact-download:focus-visible {
  outline: 2px solid var(--lp-blue-deep);
  outline-offset: 2px;
  border-radius: var(--lp-r-sm);
}

.as-artifact-image {
  display: block;
  width: auto;
  height: auto;
  max-width: min(100%, 28rem);
  max-height: 18rem;
  border: 1px solid var(--lp-line);
  border-radius: var(--lp-r-md);
  background: var(--lp-surface);
  object-fit: contain;
}

/* ── R20: the thumbs, which the server reads back into the next turn ───────── */

.as-rate {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
}

/* R112: the sources line and the two thumbs share one quiet row under the answer. */
.as-answer-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin-top: 10px;
}
.as-answer-foot .as-rate { margin-top: 0; }
.as-answer-foot .as-citation:hover { color: var(--lp-muted); text-decoration: none; }
/* The sentence is the toggle: it keeps the footer's quiet type and only darkens on hover. */
.as-answer-foot .as-sources-btn { font-weight: inherit; text-align: left; line-height: inherit; }
.as-answer-foot .as-sources-btn:focus-visible {
  outline: calc(var(--lp-hairline-width) * 2) solid var(--lp-blue-deep);
  outline-offset: var(--lp-hairline-width);
}

.as-rate-btn {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--lp-muted);
  cursor: pointer;
}

.as-rate-btn svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.as-rate-btn:hover { background: var(--lp-surface-2); color: var(--lp-ink); }
.as-rate-btn.is-on { background: var(--lp-blue-tint); color: var(--lp-blue-solid); }

.as-rate-why-said {
  margin-left: 4px;
  color: var(--lp-muted);
  font-size: var(--lp-fs-2xs);
}

.as-rate-why {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.as-rate-input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 6px 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);
}

.as-rate-input:focus { outline: none; border-color: var(--lp-blue-solid); }

.as-rate-send {
  flex: 0 0 auto;
  padding: 6px 12px;
  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);
  font-weight: 600;
  cursor: pointer;
}

.as-rate-send:hover { background: var(--lp-surface-2); }

.as-sources-btn {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--lp-muted);
  font: inherit;
  font-size: var(--lp-fs-2xs);
  font-weight: 600;
  cursor: pointer;
}

.as-sources-btn:hover { color: var(--lp-ink); }

.as-sources-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
}

.as-citation {
  color: var(--lp-muted);
  font-size: var(--lp-fs-2xs);
  line-height: var(--lp-lh);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.as-citation:hover { color: var(--lp-blue-solid); text-decoration: underline; }

.as-working { margin: 0 0 22px; }

.as-problem {
  margin: 0 0 10px;
  color: var(--lp-red-deep);
  font-size: var(--lp-fs-2xs);
}

/* ── the composer ─────────────────────────────────────────────────────────── */

.as-field {
  border: 1px solid var(--lp-line);
  border-radius: var(--lp-r-home-tile);
  background: var(--lp-surface-2);
  padding: var(--lp-panel-inset) var(--lp-panel-inset) var(--lp-panel-inset) calc(var(--lp-panel-inset) * 2);
  box-shadow: var(--lp-panel-shadow, var(--lp-home-tile-shadow));
}

.as-field:focus-within {
  outline: var(--lp-hairline-width) solid var(--lp-blue-deep);
  outline-offset: var(--lp-hairline-width);
}

.as-prompt {
  display: block;
  width: 100%;
  max-height: 180px;
  border: 0;
  outline: none;
  padding: 0 8px 0 0;
  background: transparent;
  color: var(--lp-ink);
  font: inherit;
  font-size: var(--lp-fs-sm);
  line-height: var(--lp-lh);
  resize: none;
  box-sizing: border-box;
}

.as-prompt::placeholder { color: var(--lp-muted); }

.as-field-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.as-send {
  flex: 0 0 auto;
  margin-left: auto;
  width: var(--lp-home-pagination-control-size);
  height: var(--lp-home-pagination-control-size);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--lp-r-pill);
  font: inherit;
  background: var(--lp-primary);
  color: var(--lp-surface);
  cursor: pointer;
  transition: transform var(--lp-motion-feedback-duration) var(--lp-motion-feedback-easing);
}

.as-send svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.as-send:active:enabled { transform: scale(0.96); }
.as-send:disabled { background: var(--lp-line); color: var(--lp-muted); cursor: default; }
.as-send:focus-visible {
  outline: calc(var(--lp-hairline-width) * 2) solid var(--lp-blue-deep);
  outline-offset: var(--lp-hairline-width);
}
@media (hover: hover) and (pointer: fine) {
  .as-send:hover:enabled { background: var(--lp-primary-hover); }
}
@media (prefers-reduced-motion: reduce) {
  .as-send { transition: none; }
  .as-send:active:enabled { transform: none; }
}

.as-stop {
  border: 0;
  background: transparent;
  font: inherit;
  color: var(--lp-muted);
  font-size: var(--lp-fs-2xs);
  border-radius: var(--lp-r-sm);
  padding: var(--lp-home-pagination-gap);
  min-height: var(--lp-home-pagination-control-size);
  cursor: pointer;
}
.as-stop:focus-visible { outline: var(--lp-hairline-width) solid var(--lp-blue-deep); }
.as-stop:disabled { opacity: var(--lp-home-disabled-opacity); cursor: not-allowed; }
@media (hover: hover) and (pointer: fine) {
  .as-stop:hover { background: var(--lp-line); color: var(--lp-ink); }
}

/* ── Glean's chips ────────────────────────────────────────────────────────── */

.as-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  padding: 0 6px;
}

.as-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 220px;
  padding: 5px 11px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--lp-surface-2);
  color: var(--lp-ink);
  font: inherit;
  font-size: var(--lp-fs-2xs);
  font-weight: 500;
  cursor: pointer;
}

.as-chip:hover { border-color: var(--lp-line); }
.as-chip.is-selected { background: var(--lp-blue-tint); border-color: var(--lp-blue-tint); font-weight: 600; }
/* The one the answer will be built on, when more than one is picked (R3). */
.as-chip.is-target { border-color: var(--lp-blue-solid); }

.as-chip-mark {
  flex: 0 0 auto;
  display: inline-flex;
  width: 14px;
  height: 14px;
  color: var(--lp-muted);
}

.as-chip-mark svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.as-chip.is-selected .as-chip-mark { color: var(--lp-blue-solid); }

.as-chip-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* A source this caller holds and cannot ask (see AssistantPage's note): still visible, because
   an artefact already built on it stays listed β€” but plainly not a door. */
.as-chip.is-blocked {
  color: var(--lp-muted);
  background: transparent;
  border-color: var(--lp-line);
  border-style: dashed;
  cursor: default;
}

.as-chip.is-blocked .as-chip-mark { opacity: 0.5; }
.as-chip.is-blocked:hover { border-color: var(--lp-line); }

.as-chips-note {
  flex: 1 0 100%;
  margin: 2px 0 0;
  color: var(--lp-muted);
  font-size: var(--lp-fs-2xs);
}

.as-chips-empty {
  margin: 2px 0 0;
  color: var(--lp-muted);
  font-size: var(--lp-fs-2xs);
}

/* Drafted semantic fields use the existing clarification card and chip anatomy. */
/* ⭐ A DRAFTED FIELD IS A CARD, NOT A PILL, AND THAT IS WHY THE RADIUS IS OVERRIDDEN HERE.
   MEASURED on the first take of shots/W61-T30-admin.png: `.w45-chip` carries
   `border-radius: var(--lp-r-pill)`, which is right for a one-word label and wrong for three
   stacked lines. At this height the pill becomes an ellipse, its painted edge curves in under the
   text, and neighbouring chips read as overlapping each other. A drafted field carries a label, a
   role and type line and a value sample, so it is given a card radius, an even padding and a
   shared width band instead. `agent-operator.css` belongs to another surface, so this overrides
   rather than edits it. */
.as-draft-card .as-draft-field {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  flex: 0 1 200px;
  min-width: 150px;
  max-width: 240px;
  border-radius: var(--lp-r-md);
  padding: 8px 10px;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  transition: opacity 150ms ease-out, transform 150ms ease-out;
}

/* Controls in a row share height and baseline (DESIGN.md section 4). */
.as-draft-card .w45-chip-row { align-items: stretch; }

.as-draft-card .as-draft-field:active:not(:disabled) { transform: scale(0.98); }
.as-draft-card button:disabled { opacity: 0.65; cursor: not-allowed; }
.as-draft-card button:focus-visible { outline: 2px solid var(--lp-blue-solid); outline-offset: 2px; }

.as-draft-detail,
.as-draft-state {
  color: var(--lp-muted);
  font-size: var(--lp-fs-2xs);
  line-height: var(--lp-lh);
}

.as-draft-state { margin: 8px 0; }

@media (prefers-reduced-motion: reduce) {
  .as-turn.is-new { animation: none; }
  .as-draft-card .as-draft-field { transition: none; }
  .as-draft-card .as-draft-field:active:not(:disabled) { transform: none; }
}