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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
86469e7
 
 
 
 
210ad98
 
 
 
 
 
 
 
 
 
86469e7
 
 
 
 
210ad98
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
86469e7
 
 
 
 
210ad98
 
 
 
 
 
86469e7
eb7e65c
 
 
 
 
 
 
 
 
 
86469e7
eb7e65c
 
 
 
 
 
 
 
 
86469e7
eb7e65c
 
 
 
 
 
 
86469e7
eb7e65c
 
 
 
 
86469e7
 
 
 
 
eb7e65c
 
86469e7
 
 
 
 
 
 
eb7e65c
86469e7
eb7e65c
86469e7
eb7e65c
86469e7
eb7e65c
 
86469e7
 
 
 
eb7e65c
 
86469e7
 
 
eb7e65c
 
 
 
 
 
 
86469e7
 
eb7e65c
 
 
 
 
 
 
 
 
 
 
 
86469e7
 
eb7e65c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
/*
  TalkToDoc design system.
  Palette: "Olive Garden Feast" (user-supplied Coolors palette):
  #606C38 (olive), #283618 (dark forest green), #FEFAE0 (cream),
  #DDA15E (tan/gold), #BC6C25 (rust).

  Patient view uses the olive as its primary color, provider view uses a
  darkened variant of the rust, one color family per role, same approach
  as the previous palette. Raw #BC6C25 and raw #DDA15E both fail WCAG
  contrast as text on light backgrounds, so darkened variants are used
  anywhere either color needs to be read as text rather than a fill.

  System fonts only, no external font download, this matters for the
  low-bandwidth rural settings this system is built for.
*/

:root {
  /* Base */
  --color-bg: #FEFAE0;
  --color-surface: #FFFFFF;
  --color-border: #E8DFC0;

  /* Text */
  --color-text: #283618;
  --color-text-secondary: #5C6650;
  --color-text-on-primary: #FFFFFF;
  --color-text-on-provider-accent: #FFFFFF;

  /* Primary (shared, patient role) */
  --color-primary: #606C38;
  --color-primary-dark: #283618;
  --color-primary-light: #E8ECDC;

  /* Accent */
  --color-accent: #DDA15E;
  /* Raw #DDA15E fails WCAG contrast as text (2.14:1), this darkened
     variant clears AA at 5.33:1, used anywhere it needs to be text. */
  --color-accent-text: #8A5F26;

  /* Provider-only accent */
  /* Raw #BC6C25 gives only 3.95:1 with white text, not enough for
     normal-size text, this darkened variant clears AA at 5.25:1. */
  --color-provider-accent: #A15A1F;
  --color-provider-accent-light: #FBEADB;
  --color-provider-accent-text: #7A431A;

  /* Semantic */
  --color-success: #2E7D32;
  --color-error: #B3261E;
  --color-error-light: #FBEAE9;

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  /* Type scale */
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.5rem;
  --text-2xl: 2rem;

  --radius: 20px;
  --radius-sm: 14px;
  --radius-lg: 28px;

  /* Soft elevation, replaces hard 1px borders on cards and controls */
  --shadow-sm: 0 1px 2px rgba(40, 54, 24, 0.05), 0 2px 6px rgba(40, 54, 24, 0.04);
  --shadow-md: 0 6px 20px rgba(40, 54, 24, 0.08), 0 2px 6px rgba(40, 54, 24, 0.05);
  --shadow-lg: 0 16px 40px rgba(40, 54, 24, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  font-size: var(--text-base);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  margin: 0 0 var(--space-2) 0;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

h1 { font-size: var(--text-2xl); }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-lg); letter-spacing: -0.01em; }

p {
  margin: 0 0 var(--space-4) 0;
  color: var(--color-text-secondary);
}

.app-shell {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
}

.app-header {
  padding: var(--space-5) var(--space-4) var(--space-6);
  background: linear-gradient(155deg, var(--color-primary) 0%, var(--color-primary-dark) 130%);
  color: var(--color-text-on-primary);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}

.header-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.18);
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 150ms ease, transform 100ms ease;
}

.header-icon-btn:hover {
  background: rgba(255, 255, 255, 0.28);
}

.header-icon-btn:active {
  transform: scale(0.94);
}

.header-icon-btn svg {
  width: 20px;
  height: 20px;
}

.app-header.provider {
  background: linear-gradient(155deg, var(--color-provider-accent) 0%, var(--color-provider-accent-text) 160%);
  color: var(--color-text-on-provider-accent);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-mark svg {
  width: 16px;
  height: 16px;
}

.app-header h1 {
  font-size: var(--text-lg);
  margin: 0;
}

.app-header .role-tag {
  display: inline-block;
  margin-top: var(--space-1);
  font-size: var(--text-sm);
  opacity: 0.85;
}

.app-main {
  flex: 1;
  padding: var(--space-5) var(--space-4) var(--space-7);
}

.card {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: var(--space-5);
  margin-bottom: var(--space-4);
  box-shadow: var(--shadow-sm);
}

.step {
  display: none;
}

.step.active {
  display: block;
  animation: step-in 220ms ease;
}

@keyframes step-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .step.active {
    animation: none;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: background-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn:focus-visible {
  outline: 2px solid var(--color-primary-dark);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-text-on-primary);
  box-shadow: 0 4px 14px rgba(96, 108, 56, 0.32);
}
.btn-primary:hover { background: var(--color-primary-dark); }
.btn-primary:disabled {
  background: var(--color-border);
  color: var(--color-text-secondary);
  box-shadow: none;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
}
.btn-secondary:hover { background: #DAE1CD; }

.btn-provider {
  background: var(--color-provider-accent);
  color: var(--color-text-on-provider-accent);
  box-shadow: 0 4px 14px rgba(161, 90, 31, 0.32);
}
.btn-provider:hover { background: var(--color-provider-accent-text); }

.btn-row {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

/* Language grid */
.language-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.language-option {
  padding: var(--space-4);
  text-align: center;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: box-shadow 120ms ease, transform 120ms ease, background-color 120ms ease;
}

.language-option:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.language-option:active {
  transform: scale(0.96);
}

.language-option[aria-pressed="true"] {
  background: var(--color-primary);
  color: var(--color-text-on-primary);
  box-shadow: 0 4px 14px rgba(96, 108, 56, 0.32);
  animation: select-pop 260ms ease;
}

@keyframes select-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .language-option[aria-pressed="true"] { animation: none; }
}

/* Inputs */
label {
  display: block;
  font-weight: 600;
  font-size: var(--text-sm);
  margin-bottom: var(--space-2);
}

textarea, input[type="text"] {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  font-family: inherit;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  resize: vertical;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

textarea:focus, input[type="text"]:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px var(--color-primary-light);
}

.helper-text {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-top: var(--space-2);
}

.divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-4) 0;
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
}
.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

/* Recording indicator */
.record-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}

.record-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-error);
  display: none;
}

.record-btn.recording .record-dot {
  display: inline-block;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* Status / results */
.status-banner {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  margin-bottom: var(--space-4);
}

.status-banner.error {
  background: var(--color-error-light);
  color: var(--color-error);
}

.status-banner.info {
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
}

.result-block {
  margin-bottom: var(--space-4);
}

.search-input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: var(--text-base);
  font-family: inherit;
  color: var(--color-text);
  background: var(--color-surface);
}

.search-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.history-row {
  cursor: pointer;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-3);
  transition: box-shadow 150ms ease, border-color 150ms ease, transform 100ms ease;
}

.history-row:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.history-row:active {
  transform: scale(0.99);
}

.history-row:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.history-row .timestamp {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  font-weight: 400;
  float: right;
}

/* Provider queue tabs (Waiting / Active / Completed) */
.queue-tabs {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.queue-tab {
  flex: 1;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}

.queue-tab:hover {
  border-color: var(--color-provider-accent);
}

.queue-tab.active {
  background: var(--color-provider-accent);
  border-color: var(--color-provider-accent);
  color: var(--color-text-on-provider-accent);
}

.queue-tab .tab-count {
  opacity: 0.8;
  margin-left: var(--space-1);
}

/* Workspace: reference/status line above the patient's message */
.workspace-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

/* Original-language transcript, collapsed by default under the English
   translation so the provider isn't required to read a language they
   may not speak, but can always verify against the source. */
.original-transcript {
  margin-top: var(--space-3);
  font-size: var(--text-sm);
}

.original-transcript summary {
  cursor: pointer;
  color: var(--color-text-secondary);
  font-weight: 600;
}

.original-transcript summary:hover {
  color: var(--color-provider-accent-text);
}

.original-transcript p {
  margin: var(--space-2) 0 0;
  color: var(--color-text);
  background: var(--color-bg);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
}

/* Read-only rows for a patient's other consultations, shown for context
   in the workspace. Deliberately not clickable - see the comment next to
   #patient-history-list in provider.html for why. */
.history-row-static {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-3);
}

.history-row-static .timestamp {
  float: none;
  margin-left: auto;
  font-weight: 400;
}

/* Response composer preview: a real translation + real generated speech,
   so it's visually set apart as "this is what actually gets sent",
   distinct from the (still-editable, not-yet-committed) reply above it. */
.preview-block {
  margin-top: var(--space-4);
  padding: var(--space-4);
  border: 1px dashed var(--color-provider-accent);
  border-radius: var(--radius);
  background: var(--color-provider-accent-light);
}

.preview-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-provider-accent-text);
  margin-bottom: var(--space-3);
}

.preview-block .chat-bubble.from-provider {
  margin-bottom: var(--space-3);
}

/* Keep the shared audio player on-brand in the provider context (rust
   accent) instead of the patient page's green. */
.provider .audio-btn {
  background: var(--color-provider-accent);
  color: var(--color-text-on-provider-accent);
}

.provider .audio-btn:hover {
  background: var(--color-provider-accent-text);
}

.provider .audio-btn-sm {
  background: var(--color-provider-accent-light);
  color: var(--color-provider-accent-text);
}

.provider .audio-seek {
  accent-color: var(--color-provider-accent);
}

.result-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-1);
}

.result-text {
  font-size: var(--text-base);
  color: var(--color-text);
}

audio {
  width: 100%;
  margin-top: var(--space-3);
}

.interaction-id {
  font-family: ui-monospace, monospace;
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: var(--text-sm);
}

.provider .interaction-id {
  background: var(--color-provider-accent-light);
  color: var(--color-provider-accent-text);
}

.nlu-summary {
  background: var(--color-provider-accent-light);
  border-left: 3px solid var(--color-provider-accent-text);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  font-size: var(--text-base);
  margin-bottom: 0;
}

.nav-link {
  display: block;
  text-align: center;
  margin-top: var(--space-5);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.nav-link a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
}

.nav-link.provider a {
  color: var(--color-provider-accent-text);
}

/* ============================================================
   Hero section: greeting + ambient presence orb
   ============================================================ */

.hero {
  text-align: center;
  padding: var(--space-4) 0 var(--space-6);
}

.hero-orb-wrap {
  position: relative;
  width: 132px;
  height: 132px;
  margin: 0 auto var(--space-5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-orb-glow {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--color-primary) 0%, rgba(96, 108, 56, 0) 70%);
  opacity: 0.35;
  animation: breathe 3400ms ease-in-out infinite;
}

.provider .hero-orb-glow {
  background: radial-gradient(circle, var(--color-provider-accent) 0%, rgba(161, 90, 31, 0) 70%);
}

.hero-orb {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: linear-gradient(155deg, #7C8A47 0%, var(--color-primary) 45%, var(--color-primary-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 32px rgba(40, 54, 24, 0.32), inset 0 1px 1px rgba(255, 255, 255, 0.25);
}

.provider .hero-orb {
  background: linear-gradient(155deg, #C97D3A 0%, var(--color-provider-accent) 45%, var(--color-provider-accent-text) 100%);
  box-shadow: 0 12px 32px rgba(122, 67, 26, 0.32), inset 0 1px 1px rgba(255, 255, 255, 0.25);
}

.hero-orb svg {
  width: 36px;
  height: 36px;
  color: var(--color-bg);
}

@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 0.35; }
  50% { transform: scale(1.12); opacity: 0.55; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-orb-glow { animation: none; }
}

.hero h2 {
  margin-bottom: var(--space-1);
}

.hero p {
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================================
   Unified input bar (textarea + inline mic button)
   ============================================================ */

.input-bar {
  position: relative;
}

.input-bar textarea {
  padding-right: 52px;
}

.mic-inline-btn {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: var(--color-primary);
  color: var(--color-text-on-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: visible;
  box-shadow: 0 4px 12px rgba(96, 108, 56, 0.35);
  transition: background-color 120ms ease, transform 120ms ease;
}

.mic-inline-btn:hover {
  background: var(--color-primary-dark);
}

.mic-inline-btn.recording {
  background: var(--color-error);
  animation: pulse-ring 1400ms ease-in-out infinite;
}

@keyframes pulse-ring {
  0%, 100% { box-shadow: 0 0 0 0 rgba(179, 38, 30, 0.35); }
  50% { box-shadow: 0 0 0 8px rgba(179, 38, 30, 0); }
}

.mic-inline-btn svg {
  width: 18px;
  height: 18px;
}

/* ============================================================
   Listening state: replaces the input bar while recording
   ============================================================ */

.listening-panel {
  text-align: center;
  padding: var(--space-6) 0 var(--space-4);
}

.listening-orb-wrap {
  position: relative;
  width: 128px;
  height: 128px;
  margin: 0 auto var(--space-4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.listening-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--color-primary);
  opacity: 0;
  animation: ripple 2200ms ease-out infinite;
}

.listening-ring:nth-child(2) { animation-delay: 700ms; }
.listening-ring:nth-child(3) { animation-delay: 1400ms; }

@keyframes ripple {
  0% { transform: scale(0.55); opacity: 0.5; }
  100% { transform: scale(1); opacity: 0; }
}

.listening-core {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-text-on-primary);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.listening-core svg {
  width: 28px;
  height: 28px;
}

@media (prefers-reduced-motion: reduce) {
  .listening-ring { animation: none; opacity: 0.25; transform: scale(0.8); }
}

.listening-caption {
  font-weight: 600;
  margin-bottom: var(--space-1);
}

/* ============================================================
   Quick symptom chips
   ============================================================ */

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: var(--space-3) 0 var(--space-4);
}

.chip {
  padding: 8px 16px;
  border-radius: 999px;
  border: none;
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--text-sm);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: box-shadow 120ms ease, transform 120ms ease, background-color 120ms ease;
}

.chip:hover {
  box-shadow: var(--shadow-md);
  background: var(--color-primary-light);
  transform: translateY(-1px);
}

.chip:active {
  transform: scale(0.95);
}

/* ============================================================
   Chat bubbles, used for the conversation view and history
   ============================================================ */

.chat-thread {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.chat-bubble {
  max-width: 85%;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  font-size: var(--text-base);
  line-height: 1.45;
}

.chat-bubble .chat-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: 2px;
  opacity: 0.75;
}

.chat-bubble.from-patient {
  align-self: flex-end;
  background: var(--color-primary);
  color: var(--color-text-on-primary);
  border-bottom-right-radius: 4px;
}

.chat-bubble.from-provider {
  align-self: flex-start;
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  color: var(--color-text);
  border-bottom-left-radius: 4px;
}

.provider .chat-bubble.from-provider {
  background: var(--color-provider-accent-light);
  box-shadow: none;
}

/* ============================================================
   Provider queue cards
   ============================================================ */

.queue-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  width: 100%;
  text-align: left;
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-3);
  background: var(--color-surface);
  border: none;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: box-shadow 120ms ease, transform 120ms ease;
}

.queue-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.queue-card:active {
  transform: scale(0.98);
}

.queue-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-provider-accent-light);
  color: var(--color-provider-accent-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.queue-body {
  flex: 1;
  min-width: 0;
}

.queue-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: 2px;
}

.queue-top-right {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.queue-lang {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-secondary);
  text-transform: capitalize;
}

.queue-preview {
  color: var(--color-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================================
   Micro-animations: list entrance, mic ripple, skeleton loading
   ============================================================ */

.list-item-in {
  animation: list-item-in 260ms ease both;
}

@keyframes list-item-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .list-item-in { animation: none; }
}

/* One-shot ripple on the inline mic button when tapped */
.mic-inline-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--color-primary);
  opacity: 0;
}

.mic-inline-btn.tapped::after {
  animation: mic-ripple 500ms ease-out;
}

@keyframes mic-ripple {
  0% { opacity: 0.6; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.9); }
}

@media (prefers-reduced-motion: reduce) {
  .mic-inline-btn.tapped::after { animation: none; }
}

/* Skeleton loading shimmer, shown briefly while the queue or history
   is being fetched, instead of a blank gap */
.skeleton-row {
  height: 64px;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-3);
  background: linear-gradient(100deg, var(--color-border) 30%, #F3EDD3 50%, var(--color-border) 70%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1300ms ease-in-out infinite;
}

@keyframes skeleton-shimmer {
  from { background-position: 140% 0; }
  to { background-position: -40% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .skeleton-row { animation: none; opacity: 0.6; }
}

/* Queue heading count, smooth transition when the number changes */
.queue-heading-text {
  display: inline-block;
  animation: count-change 220ms ease;
}

@keyframes count-change {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Relative timestamps on queue cards and history entries */
.timestamp {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Offline banner */
.offline-banner {
  display: none;
  align-items: center;
  gap: var(--space-2);
  background: var(--color-error-light);
  color: var(--color-error);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-4);
  animation: step-in 220ms ease;
}

.offline-banner.visible {
  display: flex;
}

.offline-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-error);
  flex-shrink: 0;
  animation: pulse 1.4s ease-in-out infinite;
}

/* ============================================================
   Web / desktop environment (min-width: 900px)
   Mobile layout above this point is untouched.
   ============================================================ */

@media (min-width: 900px) {
  body {
    background:
      radial-gradient(640px circle at 12% 8%, rgba(96, 108, 56, 0.10), transparent 60%),
      radial-gradient(520px circle at 92% 85%, rgba(221, 161, 94, 0.16), transparent 60%),
      var(--color-bg);
    min-height: 100vh;
    padding: var(--space-7) var(--space-5);
  }

  .app-shell {
    max-width: 640px;
    margin: 0 auto;
    min-height: auto;
    border-radius: 20px;
    box-shadow: 0 30px 70px rgba(40, 54, 24, 0.16);
    overflow: hidden;
  }

  /* The provider shell is wider, to make room for the two-column layout */
  .app-shell.provider-shell {
    max-width: 1080px;
  }

  .provider-page .app-main {
    padding-bottom: var(--space-6);
  }

  .provider-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: var(--space-5);
    align-items: start;
  }

  /* On desktop both panes stay visible, mobile's one-at-a-time step
     system is only used below this breakpoint. */
  .provider-layout .step {
    display: block !important;
    animation: none !important;
  }

  .provider-layout [data-step="list"] .hero {
    text-align: left;
    padding: 0 0 var(--space-4);
  }

  .provider-layout [data-step="list"] .hero-orb-wrap {
    margin: 0 0 var(--space-3);
    width: 64px;
    height: 64px;
  }

  .provider-layout [data-step="list"] .hero-orb {
    width: 56px;
    height: 56px;
  }

  .provider-layout [data-step="list"] .hero-orb svg {
    width: 24px;
    height: 24px;
  }

  .provider-layout [data-step="list"] .hero-orb-glow {
    inset: -10px;
  }

  .provider-layout [data-step="respond"] #back-to-list {
    display: none;
  }

  .provider-layout [data-step="respond"] .btn-row {
    justify-content: flex-end;
  }

  .provider-layout [data-step="respond"] .btn-provider {
    width: auto;
    padding-left: var(--space-6);
    padding-right: var(--space-6);
  }

  .detail-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: var(--space-3);
    min-height: 320px;
    border: 1px dashed var(--color-border);
    border-radius: var(--radius);
    padding: var(--space-6);
    color: var(--color-text-secondary);
  }

  .detail-placeholder-mark {
    position: static;
    width: 44px;
    height: 44px;
    background: var(--color-provider-accent-light);
  }

  .detail-placeholder-mark svg {
    width: 20px;
    height: 20px;
    color: var(--color-provider-accent-text);
  }

  /* Patient shell: a composed, contained card on a filled background,
     rather than a phone screen stretched across a wide window. */
  .patient-shell .hero {
    padding-top: var(--space-3);
  }
}

/* Icons inside buttons and labels */
.icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.icon-sm {
  width: 14px;
  height: 14px;
}

/* Loading spinner, shown inside buttons while an AI step is running */
.spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: currentColor;
  animation: spin 700ms linear infinite;
  flex-shrink: 0;
}

.btn-secondary .spinner,
.btn[disabled] .spinner {
  border: 2px solid rgba(0, 0, 0, 0.15);
  border-top-color: currentColor;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 1400ms; }
}

/* Recording timer */
.record-timer {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

/* Status badges, used in the provider queue and patient history */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-sm);
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
}

.status-badge.waiting {
  background: var(--color-provider-accent-light);
  color: var(--color-provider-accent-text);
}

.status-badge.answered {
  background: #E3EDE3;
  color: var(--color-success);
}

/* Waiting-state status timeline: 3 honest steps (submitted / waiting /
   ready). Only "submitted" and "waiting" are ever shown as reached,
   because that's genuinely all two states the backend tracks; the app
   never fabricates an in-between "provider is reviewing" stage. */
.status-timeline {
  display: flex;
  align-items: flex-start;
  margin: var(--space-4) 0 var(--space-5);
}

.timeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 0;
  text-align: center;
}

.timeline-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  margin-bottom: var(--space-2);
  flex-shrink: 0;
}

.timeline-step.done .timeline-dot {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.timeline-step.current .timeline-dot {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px var(--color-primary-light);
  animation: timeline-pulse 1.8s ease-in-out infinite;
}

@keyframes timeline-pulse {
  0%, 100% { box-shadow: 0 0 0 4px var(--color-primary-light); }
  50% { box-shadow: 0 0 0 7px var(--color-primary-light); }
}

@media (prefers-reduced-motion: reduce) {
  .timeline-step.current .timeline-dot {
    animation: none;
  }
}

.timeline-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-secondary);
  line-height: 1.3;
}

.timeline-step.done .timeline-label,
.timeline-step.current .timeline-label {
  color: var(--color-text);
}

.timeline-connector {
  flex: 0 0 auto;
  width: 32px;
  height: 2px;
  background: var(--color-border);
  margin: 7px -4px 0;
}

/* General, clearly-non-personalized safety guidance shown while waiting.
   Uses the primary-light tint rather than the error/warning colors, since
   it's reassurance and a standing safety note, not an alert. */
.waiting-note {
  background: var(--color-primary-light);
  border-left: 3px solid var(--color-primary);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text);
  margin-bottom: var(--space-4);
}

.waiting-note strong {
  color: var(--color-primary-dark);
}

/* Custom audio player, replaces the bare native <audio controls> element
   so playback matches the rest of the design system instead of looking
   like a raw, inconsistently-styled browser widget. */
.audio-player audio {
  display: none;
}

.audio-player-controls {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.audio-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--color-primary);
  color: var(--color-text-on-primary);
  cursor: pointer;
  transition: background 150ms ease, transform 100ms ease;
}

.audio-btn svg {
  width: 20px;
  height: 20px;
}

.audio-btn:hover {
  background: var(--color-primary-dark);
}

.audio-btn:active {
  transform: scale(0.94);
}

.audio-btn-sm {
  width: 36px;
  height: 36px;
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
}

.audio-btn-sm:hover {
  background: #DAE1CD;
}

.audio-time {
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
  color: var(--color-text-secondary);
  flex-shrink: 0;
  min-width: 34px;
}

.audio-seek {
  flex: 1;
  min-width: 0;
  height: 4px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

/* Toast confirmation, appears briefly after an action completes */
.toast {
  position: fixed;
  left: 50%;
  bottom: var(--space-6);
  transform: translateX(-50%) translateY(12px);
  background: var(--color-text);
  color: var(--color-bg);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease, transform 200ms ease;
  z-index: 100;
}

.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================================
   Filter chips (12E), focus rings, disabled states,
   skip link, sr-only utility, desktop Back-hide (12F)
   ============================================================ */

/* Filter chips — status/language filters above list and history views.
   Distinct from .chip (symptom/reply quick-select) which uses pill shape
   and sits inline in a card. These are tighter, sit in their own row,
   and have an explicit active/selected state. */
.filter-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.filter-chip {
  padding: var(--space-1) var(--space-3);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 130ms ease, border-color 130ms ease, color 130ms ease;
}

.filter-chip:hover {
  border-color: var(--color-primary);
  color: var(--color-text);
}

.filter-chip.active {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
  color: var(--color-primary-dark);
}

.filter-chip:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.provider .filter-chip:hover {
  border-color: var(--color-provider-accent);
}

.provider .filter-chip.active {
  background: var(--color-provider-accent-light);
  border-color: var(--color-provider-accent);
  color: var(--color-provider-accent-text);
}

.provider .filter-chip:focus-visible {
  outline-color: var(--color-provider-accent);
}

/* Sort toggle button, shown on provider Completed tab only */
.sort-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  margin-top: var(--space-2);
  transition: border-color 130ms ease, color 130ms ease;
}

.sort-toggle-btn:hover {
  border-color: var(--color-provider-accent);
  color: var(--color-provider-accent-text);
}

.sort-toggle-btn:focus-visible {
  outline: 2px solid var(--color-provider-accent);
  outline-offset: 2px;
}

.sort-toggle-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* Queue tab and card focus rings */
.queue-tab:focus-visible {
  outline: 2px solid var(--color-provider-accent);
  outline-offset: 2px;
}

.queue-card:focus-visible {
  outline: 2px solid var(--color-provider-accent);
  outline-offset: 2px;
}

/* Audio button focus rings */
.audio-btn:focus-visible {
  outline: 2px solid var(--color-primary-dark);
  outline-offset: 2px;
}

.provider .audio-btn:focus-visible {
  outline-color: var(--color-provider-accent-text);
}

/* Provider Send button disabled state, mirrors .btn-primary:disabled */
.btn-provider:disabled {
  background: var(--color-border);
  color: var(--color-text-secondary);
  box-shadow: none;
  cursor: not-allowed;
}

/* Spinner inside the provider Send button */
.btn-provider .spinner {
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
}

/* Empty state: shown when a list is genuinely empty or no results match
   filters/search. Intentionally minimal — icon, short title, one line. */
.empty-state {
  text-align: center;
  padding: var(--space-7) var(--space-5);
}

.empty-state-icon {
  width: 36px;
  height: 36px;
  stroke: var(--color-border);
  margin: 0 auto var(--space-3);
  display: block;
}

.empty-state-title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.empty-state-body {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin: 0;
}

/* Desktop provider: hide Back buttons inside the respond pane.
   On desktop both panes are always visible (two-column grid), so
   Back belongs to mobile-only one-at-a-time navigation. */
@media (min-width: 900px) {
  .provider-layout [data-step="respond"] #back-to-list,
  .provider-layout [data-step="respond"] #back-to-list-readonly {
    display: none;
  }
}

/* Visually-hidden utility: screen-reader-only text, visible to AT
   but not rendered on screen. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip link: keyboard users can bypass the header and jump to main
   content. Visually hidden until focused, rises to the top on Tab. */
.skip-link {
  position: absolute;
  top: -40px;
  left: var(--space-4);
  background: var(--color-text);
  color: var(--color-bg);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: var(--space-2) var(--space-4);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  text-decoration: none;
  z-index: 200;
  transition: top 150ms ease;
}

.skip-link:focus {
  top: 0;
}