@terpjs/react-core 0.30.0 → 0.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/README.md +35 -14
  2. package/package.json +5 -5
  3. package/src/DashboardPage.tsx +34 -0
  4. package/src/Field.test.tsx +26 -1
  5. package/src/Field.tsx +15 -5
  6. package/src/HubPage.tsx +7 -2
  7. package/src/Page.test.tsx +192 -0
  8. package/src/Page.tsx +141 -55
  9. package/src/PageActions.test.tsx +64 -3
  10. package/src/PageActions.tsx +40 -15
  11. package/src/PageSequence.tsx +114 -0
  12. package/src/Stat.test.tsx +341 -0
  13. package/src/Stat.tsx +314 -0
  14. package/src/Timeline.test.tsx +74 -0
  15. package/src/Timeline.tsx +71 -0
  16. package/src/admin/AdminHub.tsx +11 -3
  17. package/src/admin/AuditLogAdmin.tsx +3 -1
  18. package/src/admin/GroupCreate.tsx +3 -1
  19. package/src/admin/GroupDetail.tsx +72 -67
  20. package/src/admin/GroupsAdmin.tsx +3 -1
  21. package/src/admin/ModuleAccessPanel.tsx +13 -12
  22. package/src/admin/RecordHistory.tsx +83 -0
  23. package/src/admin/UserCreate.tsx +3 -1
  24. package/src/admin/UserDetail.tsx +8 -1
  25. package/src/admin/UsersAdmin.tsx +3 -0
  26. package/src/admin/admin.test.tsx +208 -5
  27. package/src/bootstrap.test.tsx +31 -7
  28. package/src/bootstrap.tsx +30 -4
  29. package/src/charts/BarChart.tsx +74 -0
  30. package/src/charts/ProportionBar.tsx +118 -0
  31. package/src/charts/StatusHistory.tsx +75 -0
  32. package/src/charts/TrendChart.tsx +232 -0
  33. package/src/charts/charts.test.tsx +409 -0
  34. package/src/charts/scale.ts +103 -0
  35. package/src/dataview/DataView.test.tsx +255 -0
  36. package/src/dataview/DataView.tsx +35 -0
  37. package/src/dataview/DataViewCardList.tsx +21 -13
  38. package/src/dataview/DataViewTable.tsx +5 -6
  39. package/src/dataview/README.md +18 -0
  40. package/src/dataview/index.ts +1 -0
  41. package/src/dataview/internal.tsx +112 -5
  42. package/src/dataview/types.ts +39 -10
  43. package/src/errorMessages.test.tsx +17 -0
  44. package/src/errorMessages.tsx +18 -0
  45. package/src/format.ts +15 -0
  46. package/src/index.ts +24 -1
  47. package/src/layout.manifest.json +2 -9
  48. package/src/layout.manifest.test.ts +4 -2
  49. package/src/layout.test.tsx +74 -6
  50. package/src/layout.tsx +85 -25
  51. package/src/layoutContract.test.tsx +239 -1
  52. package/src/layoutContract.ts +131 -5
  53. package/src/layoutDeclaration.test.ts +31 -10
  54. package/src/layoutDeclaration.ts +9 -4
  55. package/src/locale.tsx +20 -3
  56. package/src/markers.test.ts +70 -2
  57. package/src/router.test.tsx +15 -3
  58. package/src/router.tsx +11 -2
  59. package/src/ssr.test.tsx +18 -0
  60. package/src/styles.test.ts +222 -190
  61. package/src/styles.ts +1268 -328
  62. package/src/theme.test.tsx +44 -18
  63. package/src/theme.themes.test.ts +22 -2
  64. package/src/theme.tsx +22 -14
  65. package/src/themes.ts +39 -4
  66. package/src/tokens.guard.test.ts +13 -15
  67. package/src/typography.tsx +5 -1
  68. package/src/ui/Alert.test.tsx +24 -1
  69. package/src/ui/Alert.tsx +10 -1
  70. package/src/ui/Card.tsx +5 -4
  71. package/src/ui/Tooltip.test.tsx +171 -2
  72. package/src/ui/Tooltip.tsx +144 -8
  73. package/src/ui/controlMessages.tsx +20 -7
  74. package/src/uiText.test.tsx +16 -0
  75. package/src/uiText.tsx +76 -7
package/src/styles.ts CHANGED
@@ -206,7 +206,7 @@ html, body {
206
206
  margin: 0;
207
207
  }
208
208
  body {
209
- background: var(--color-neutral-50);
209
+ background: var(--color-bg-canvas);
210
210
  }
211
211
  /* Border-box baseline: react-core sizes components as padding-inclusive
212
212
  (e.g. LoginView's 100vh page with padding, inputs at width:100% with
@@ -307,11 +307,14 @@ html {
307
307
  [data-terp="button"][data-variant="secondary"] {
308
308
  background: var(--color-neutral-0);
309
309
  color: var(--color-neutral-900);
310
- border-color: var(--color-neutral-300);
310
+ border-color: var(--color-border-strong);
311
311
  }
312
+ /* The danger as a filled surface, on tokens of its own (ADR 0170 §6, the split ADR 0093 §5
313
+ made for the accent): the danger INK is light in a dark palette so it reads on the app's own
314
+ ground, and a fill in that ink is a pale button that outshouts the primary one. */
312
315
  [data-terp="button"][data-variant="danger"] {
313
- background: var(--color-status-danger);
314
- color: var(--color-neutral-0);
316
+ background: var(--color-status-danger-fill);
317
+ color: var(--color-status-danger-fill-contrast);
315
318
  }
316
319
  [data-terp="button"][data-variant="ghost"] {
317
320
  background: transparent;
@@ -367,7 +370,7 @@ html {
367
370
  white-space: nowrap;
368
371
  }
369
372
  [data-terp="badge"][data-tone="neutral"] {
370
- color: var(--color-neutral-600);
373
+ color: var(--color-fg-muted);
371
374
  background: var(--color-neutral-100);
372
375
  border-color: var(--color-neutral-100);
373
376
  }
@@ -440,7 +443,7 @@ html {
440
443
  row already spell for the same tone. It was --color-neutral-50, which is the canvas: on
441
444
  a card with no fill the alert kept its border and lost its wash entirely. */
442
445
  [data-terp="alert"][data-tone="neutral"] {
443
- color: var(--color-neutral-600);
446
+ color: var(--color-fg-muted);
444
447
  background: var(--color-neutral-100);
445
448
  }
446
449
  [data-terp="alert"][data-tone="info"] {
@@ -473,6 +476,15 @@ html {
473
476
  [data-terp="alert-title"] {
474
477
  font-weight: var(--font-weight-semibold);
475
478
  }
479
+ /* What to do about it, under what happened, inside the alert's own tint: a wrapping row of
480
+ buttons, so two actions sit side by side on a desk and stack on a phone without leaving the
481
+ alert they answer. */
482
+ [data-terp="alert-actions"] {
483
+ display: flex;
484
+ flex-wrap: wrap;
485
+ gap: var(--space-2);
486
+ margin-block-start: var(--space-2);
487
+ }
476
488
 
477
489
  /* Text controls ------------------------------------------------------------ */
478
490
  /* Input, Select and Textarea deliberately share one marker, because the focus
@@ -481,7 +493,7 @@ html {
481
493
  carries that — no second attribute for a distinction the tag name already
482
494
  makes. */
483
495
  [data-terp="input"] {
484
- border: 1px solid var(--color-neutral-300);
496
+ border: 1px solid var(--color-border-strong);
485
497
  border-radius: var(--radius-md);
486
498
  color: var(--color-neutral-900);
487
499
  background: var(--color-neutral-0);
@@ -695,29 +707,34 @@ textarea[data-terp="input"] {
695
707
  > [data-terp="detail-list"][data-layout="aligned"]:not([data-columns]) {
696
708
  grid-template-columns: subgrid;
697
709
  }
698
- /* FieldRow's wide half: the three shared lines, and the columns that hold them.
710
+ /* FieldRow's wide half: the two shared lines, and the columns that hold them.
699
711
  align-items: start so a field shorter than its neighbour does not stretch, and
700
712
  justify-content: start so the row is as wide as its fields rather than as wide as the
701
- page. */
713
+ page.
714
+
715
+ TWO lines, label and body, where there were three -- label, control, messages. The
716
+ messages now live in the field's body under its control (see Field), and that retired
717
+ the third line's one cost: a line nobody on the row had anything for was still a line,
718
+ with a gutter on either side of it. */
702
719
  [data-terp="field-row"] {
703
720
  grid-auto-flow: column;
704
721
  grid-auto-columns: minmax(0, auto);
705
- grid-template-rows: auto auto auto;
722
+ grid-template-rows: auto auto;
706
723
  align-items: start;
707
724
  justify-content: start;
708
725
  }
709
- /* Each field spans all three and subgrids them, which is what puts every label on one
726
+ /* Each field spans both lines and subgrids them, which is what puts every label on one
710
727
  line and every control on the next whatever any one field has to say. */
711
728
  [data-terp="field-row"] > [data-terp="field"] {
712
729
  display: grid;
713
730
  grid-template-rows: subgrid;
714
731
  grid-row: 1 / -1;
715
732
  }
716
- /* The label element generates no box, so the label TEXT and the control become items of
717
- the field and can land on separate shared lines. It stays a <label> wrapping its
718
- control in the DOM, which is what names the control -- display: contents changes the
719
- box tree, and the accessible name is computed from the DOM. Field additionally points
720
- aria-labelledby at the text, so the name is exact either way. */
733
+ /* The label element generates no box, so the label TEXT and the body become items of the
734
+ field and can land on separate shared lines. It stays a <label> wrapping its control in
735
+ the DOM, which is what names the control -- display: contents changes the box tree, and
736
+ the accessible name is computed from the DOM. Field additionally points aria-labelledby
737
+ at the text, so the name is exact either way. */
721
738
  [data-terp="field-row"] > [data-terp="field"] > [data-terp="field-label"] {
722
739
  display: contents;
723
740
  }
@@ -773,6 +790,26 @@ textarea[data-terp="input"] {
773
790
  [data-terp="grid"][data-columns="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
774
791
  [data-terp="grid"][data-columns="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
775
792
  [data-terp="grid"][data-columns="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
793
+ /* The named track templates (ADR 0169 §2): proportions read left to right, each track
794
+ minmax(0, n fr) for the reason the fixed counts above give. A closed set on the parent rather
795
+ than a span on a child, so a row cannot go ragged whatever renders in it.
796
+
797
+ Each one gives up its tracks at the one cutover, which is the property a fixed count lacks
798
+ and the reason a template exists beside it: columns={4} keeps four tracks on a phone and
799
+ clips, a template does not. Every template becomes one track there, except the four-track set,
800
+ which becomes two — four small blocks as a square rather than a column four screens long.
801
+ The collapse is a viewport query, unlike "auto"'s container reflow, because a template is the
802
+ layout of a page section and the page changes shape at the cutover with the shell around it. */
803
+ [data-terp="grid"][data-template="1:1"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
804
+ [data-terp="grid"][data-template="1:1:1"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
805
+ [data-terp="grid"][data-template="1:1:1:1"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
806
+ [data-terp="grid"][data-template="2:1"] { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
807
+ [data-terp="grid"][data-template="1:2"] { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
808
+ [data-terp="grid"][data-template="3:1"] { grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); }
809
+ @media ${NARROW_VIEWPORT} {
810
+ [data-terp="grid"][data-template] { grid-template-columns: minmax(0, 1fr); }
811
+ [data-terp="grid"][data-template="1:1:1:1"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
812
+ }
776
813
  [data-terp="grid"][data-gap="0"] { gap: var(--space-0); }
777
814
  [data-terp="grid"][data-gap="1"] { gap: var(--space-1); }
778
815
  [data-terp="grid"][data-gap="2"] { gap: var(--space-2); }
@@ -790,6 +827,52 @@ textarea[data-terp="input"] {
790
827
  [data-terp="grid"][data-padding="4"] { padding: var(--space-4); }
791
828
  [data-terp="grid"][data-padding="6"] { padding: var(--space-6); }
792
829
  [data-terp="grid"][data-padding="8"] { padding: var(--space-8); }
830
+ /* A grid of fields lines its fields up by itself: every label on one line and every control
831
+ on the next, in each row of the grid, however long any label runs or whatever any field
832
+ says under its control. Before this, a grid of fields aligned their TOPS (or, with
833
+ align="end", their bottoms), so one label that wrapped to two lines pushed its control below
834
+ its neighbours', and one hint lifted a control above them. FieldRow had the fix, and only
835
+ for the fields placed in it on purpose; the ordinary composition -- a form's fields in a
836
+ Grid -- never got it.
837
+
838
+ Each field spans two of the grid's rows and subgrids them, label and body, the shape
839
+ FieldRow uses. Two rows rather than three because the body holds the control AND its
840
+ messages, so no row is ever empty: a row of fields with no hint has no zero-height messages
841
+ line carrying the grid's gap twice.
842
+
843
+ The grid's row gap is the caller's spacing BETWEEN rows of fields, and that is what it
844
+ stays. Inside a field the label sits var(--space-1) above its control as it does anywhere
845
+ else: the subgrid declares that gap, and a subgrid's own gap is honoured by moving its edge
846
+ items into the parent's gutter, so the label and the control meet at 4px while the grid's
847
+ tracks keep the caller's spacing.
848
+
849
+ Only a grid whose children are ALL fields. A grid mixing fields with other things -- a card,
850
+ a button -- keeps its ordinary cells, because a one-row item placed among two-row fields
851
+ would take a field's label line and push the auto-placement out of step for every row after
852
+ it. A row of fields with an action beside them is FieldRow's job, which puts the action on
853
+ the control line. */
854
+ [data-terp="grid"]:not(:has(> :not([data-terp="field"]))) > [data-terp="field"] {
855
+ display: grid;
856
+ grid-row: span 2;
857
+ grid-template-rows: subgrid;
858
+ row-gap: var(--space-1);
859
+ }
860
+ [data-terp="grid"]:not(:has(> :not([data-terp="field"])))
861
+ > [data-terp="field"]
862
+ > [data-terp="field-label"] {
863
+ display: contents;
864
+ }
865
+ /* The label at the FOOT of its line, directly above its control, in a grid of fields and in a
866
+ field row alike. The line is as tall as the longest label in the row, so a one-line label
867
+ beside a two-line one has a line of space to stand in, and at the top of it the short label
868
+ floated a line away from the control it names. Its spare space goes above it instead. */
869
+ [data-terp="grid"]:not(:has(> :not([data-terp="field"])))
870
+ > [data-terp="field"]
871
+ > [data-terp="field-label"]
872
+ > [data-terp="field-label-text"],
873
+ [data-terp="field-row"] > [data-terp="field"] > [data-terp="field-label"] > [data-terp="field-label-text"] {
874
+ align-self: end;
875
+ }
793
876
 
794
877
  /* Detail lists ------------------------------------------------------------- */
795
878
  /* The term and value are inline boxes inside a block row, which is what makes
@@ -906,10 +989,41 @@ textarea[data-terp="input"] {
906
989
  [data-terp="detail-list-row"]:not([data-full="true"]) {
907
990
  display: contents;
908
991
  }
992
+ /* The ruled grid (ADR 0169 §5): a record's facts as a sheet. Each pair is a cell -- its label
993
+ above its value -- padded half a gap all round, as many to a row as fit, and the list reaches
994
+ out by that half on both sides so the labels start on the line the content around them does.
995
+ StatGroup's construction, with a second rule: each cell draws a 1px shadow outside its start
996
+ edge and one outside its top edge, and the list's overflow clips the ones that fall outside it
997
+ -- so a cell that starts a row has no rule before it and the first row none above it, however
998
+ many render. The tracks meet with no gap, so the rules are continuous; the clip sits half a gap
999
+ outside the text, so a focus ring inside a cell keeps its sides.
1000
+
1001
+ 12.5rem is 11rem of fact and the 1.5rem of its padding. A gap from the gap prop opens space
1002
+ between ruled rows on top of this (its rules are declared later and win on source order). */
1003
+ [data-terp="detail-list"][data-layout="grid"] {
1004
+ gap: 0;
1005
+ margin-inline: calc(-1 * var(--space-3));
1006
+ overflow: hidden;
1007
+ }
1008
+ [data-terp="detail-list"][data-layout="grid"][data-columns="auto"] {
1009
+ grid-template-columns: repeat(auto-fit, minmax(min(12.5rem, 100%), 1fr));
1010
+ column-gap: 0;
1011
+ }
1012
+ [data-terp="detail-list"][data-layout="grid"] > [data-terp="detail-list-row"] {
1013
+ display: flex;
1014
+ flex-direction: column;
1015
+ gap: var(--space-1);
1016
+ padding: var(--space-3);
1017
+ box-shadow:
1018
+ -1px 0 0 0 var(--color-neutral-200),
1019
+ 0 -1px 0 0 var(--color-neutral-200);
1020
+ }
909
1021
  [data-terp="detail-list"][data-layout="aligned"] [data-terp="detail-list-term"],
910
1022
  [data-terp="detail-list"][data-layout="aligned"] [data-terp="detail-list-value"],
911
1023
  [data-terp="detail-list"][data-layout="stacked"] [data-terp="detail-list-term"],
912
- [data-terp="detail-list"][data-layout="stacked"] [data-terp="detail-list-value"] {
1024
+ [data-terp="detail-list"][data-layout="stacked"] [data-terp="detail-list-value"],
1025
+ [data-terp="detail-list"][data-layout="grid"] [data-terp="detail-list-term"],
1026
+ [data-terp="detail-list"][data-layout="grid"] [data-terp="detail-list-value"] {
913
1027
  display: block;
914
1028
  }
915
1029
  /* The label takes the muted, smaller, regular step so a pair reads as one unit rather than two
@@ -922,7 +1036,8 @@ textarea[data-terp="input"] {
922
1036
  the ::after above — and muting half a sentence is a different defect from the one this fixes.
923
1037
  Two layouts diverging was the bug; three converging would be another. */
924
1038
  [data-terp="detail-list"][data-layout="aligned"] [data-terp="detail-list-term"],
925
- [data-terp="detail-list"][data-layout="stacked"] [data-terp="detail-list-term"] {
1039
+ [data-terp="detail-list"][data-layout="stacked"] [data-terp="detail-list-term"],
1040
+ [data-terp="detail-list"][data-layout="grid"] [data-terp="detail-list-term"] {
926
1041
  font-size: var(--font-size-xs);
927
1042
  font-weight: var(--font-weight-normal);
928
1043
  color: var(--color-fg-muted);
@@ -947,7 +1062,8 @@ textarea[data-terp="input"] {
947
1062
  still renders at the step that Text asked for. That is the correct outcome for a caller who
948
1063
  said a size and the thing to know about a caller who did not. */
949
1064
  [data-terp="detail-list"][data-layout="aligned"] [data-terp="detail-list-value"],
950
- [data-terp="detail-list"][data-layout="stacked"] [data-terp="detail-list-value"] {
1065
+ [data-terp="detail-list"][data-layout="stacked"] [data-terp="detail-list-value"],
1066
+ [data-terp="detail-list"][data-layout="grid"] [data-terp="detail-list-value"] {
951
1067
  font-size: var(--font-size-sm);
952
1068
  }
953
1069
  /* The gap prop, and this block must stay AFTER the layout rules above. Both
@@ -1047,7 +1163,7 @@ textarea[data-terp="input"] {
1047
1163
  flex-direction: column;
1048
1164
  gap: var(--space-1);
1049
1165
  padding: var(--space-3);
1050
- border: 1px solid var(--color-neutral-300);
1166
+ border: 1px solid var(--color-border-strong);
1051
1167
  border-radius: var(--radius-md);
1052
1168
  background: var(--color-neutral-0);
1053
1169
  cursor: pointer;
@@ -1087,10 +1203,15 @@ textarea[data-terp="input"] {
1087
1203
  }
1088
1204
  [data-terp="tile-body"] {
1089
1205
  font-size: var(--font-size-xs);
1090
- color: var(--color-fg-subtle);
1206
+ color: var(--color-fg-muted);
1091
1207
  display: grid;
1092
1208
  gap: var(--space-1);
1093
1209
  }
1210
+ /* A tile's body is read to make the choice, so it carries the muted ink rather than the
1211
+ subtle one; a disabled tile is not a choice, and its body fades with the rest of it. */
1212
+ [data-terp="tile"][aria-disabled="true"] [data-terp="tile-body"] {
1213
+ color: inherit;
1214
+ }
1094
1215
  [data-terp="radio-group"] {
1095
1216
  display: grid;
1096
1217
  gap: var(--space-2);
@@ -1111,35 +1232,38 @@ textarea[data-terp="input"] {
1111
1232
  }
1112
1233
 
1113
1234
  /* Cards -------------------------------------------------------------------- */
1114
- /* The surface model, and this is the rule that states it: an in-flow block is an OBJECT —
1115
- a fill, a frame, a radius and a padding — sitting on a canvas that is tinted away from
1116
- it. Two tokens, two jobs: --color-bg-surface is what an object is made of and
1117
- --color-bg-canvas is what the page is made of, and the whole legibility of a screen
1118
- rests on the gap between them.
1119
-
1120
- It was frame-only for one release — border and radius with the canvas showing through —
1121
- and that is what this reverses. The argument then was sound about the DEFECT and wrong
1235
+ /* The surface model, and this is the rule that states it. A screen is legible because its
1236
+ blocks sit at different heights, and ADR 0169 gives the page four rungs, one job each:
1237
+ --color-bg-canvas is what the page is made of; --color-bg-subtle, the midpoint between
1238
+ canvas and surface, is what containers and chrome are made of — this card, the HubCard
1239
+ body, the profile card, the page band and the sequence bar; --color-bg-surface is where
1240
+ data is read — the
1241
+ full DataView's table frame, dataview-card, resource-list-row and empty-state; and the
1242
+ brand fill is kept for the one headline figure a page may carry.
1243
+
1244
+ Cards were frame-only for one release — border and radius with the canvas showing
1245
+ through — and that was reversed. The argument then was sound about the DEFECT and wrong
1122
1246
  about the fix: cards were painting --color-neutral-0, the far end of the primitive ramp,
1123
1247
  so an app that themed its canvas got cards that did not follow, and a card dropped on
1124
- something already a surface repainted it. Naming the SEMANTIC surface answers the first
1125
- (a theme moves both ends together, which is what the bg family is for) and
1126
- variant="plain" already answered the second.
1127
-
1128
- What frame-only cost was the thing a screen is judged on. With canvas and surface a
1129
- rounding error apart there is no object anywhere on the page: measured on the light
1130
- theme, a table, a hub card and the page behind them all rendered #f8fafc inside a
1131
- #e2e8f0 hairline, which reads as a wireframe of an app rather than an app. Tinting the
1132
- canvas alone does not fix it either — it just moves every object onto grey, and a data
1133
- table with a grey ground reads as disabled. Both halves have to move, and they are one
1134
- decision, so they are in one commit.
1135
-
1136
- Six rules follow the same line, and they are the framework's other in-flow blocks:
1137
- hubcard-body, profile-card, resource-list-row, empty-state, dataview-card and the full
1138
- DataView's table frame. Three kinds of element already did and keep doing so for reasons
1139
- of their own: an overlay has to be opaque over whatever it covers (dialog,
1140
- popover-panel, toast, the combobox list, and appshell-header, which the page scrolls
1141
- under); a control needs a surface of its own to read as a control (input, select, the
1142
- secondary button); and login-card is the one object on an otherwise empty canvas.
1248
+ something already a surface repainted it. Naming SEMANTIC tokens answers the first —
1249
+ every shipped palette declares every rung, which is what the bg family is for, and an
1250
+ app's theme.css that moves canvas or surface redeclares subtle with them (terp guide
1251
+ theming says so, because a token there does not recompute another) — and variant="plain"
1252
+ already answered the second.
1253
+
1254
+ What frame-only cost was the thing a screen is judged on: with every block and the page a
1255
+ rounding error apart there is no object anywhere, and the page reads as a wireframe of an
1256
+ app. Tinting the canvas alone does not fix it either — it moves every object onto grey,
1257
+ and a data table on a grey ground reads as disabled. That is why the containers step back
1258
+ to the midpoint while the collection stays on surface. In the midday theme the midpoint
1259
+ halves the step from canvas to surface, to about 1.06:1 either side, so a container's
1260
+ edge is carried by its hairline, and the table keeps the brightest fill on the page.
1261
+
1262
+ Three kinds of element paint --color-neutral-0 for reasons of their own: an overlay has to
1263
+ be opaque over whatever it covers (dialog, popover-panel, toast, the combobox list, and
1264
+ appshell-header, which the page scrolls under); a control needs a surface of its own to
1265
+ read as a control (input, select, the secondary button); and login-card is the one object
1266
+ on an otherwise empty canvas.
1143
1267
 
1144
1268
  The washes stay one step along the ramp — --color-neutral-100, or the
1145
1269
  --color-interactive-* token that names the state — rather than returning to
@@ -1153,7 +1277,7 @@ textarea[data-terp="input"] {
1153
1277
  display: flex;
1154
1278
  flex-direction: column;
1155
1279
  gap: var(--space-3);
1156
- background: var(--color-bg-surface);
1280
+ background: var(--color-bg-subtle);
1157
1281
  border: 1px solid var(--color-neutral-200);
1158
1282
  border-radius: var(--radius-lg);
1159
1283
  box-shadow: var(--shadow-sm);
@@ -1167,41 +1291,32 @@ textarea[data-terp="input"] {
1167
1291
  [data-terp="card"][data-gap="4"] { gap: var(--space-4); }
1168
1292
  [data-terp="card"][data-gap="6"] { gap: var(--space-6); }
1169
1293
  [data-terp="card"][data-gap="8"] { gap: var(--space-8); }
1294
+ /* A card's header is the page band's shape at a card's size: the title, the actions beside it
1295
+ when they fit, and the description on a line of its own under both -- then the body. The
1296
+ card used to put the title and the description in ONE column with the actions in a second
1297
+ one beside the pair, so the actions took their width out of the description: a sentence of
1298
+ description wrapped in a narrow column next to a single button, and grew the header three
1299
+ lines deep to say what one line under the title would have.
1300
+
1301
+ The same wrapping line the band uses (see page-header), for the same reasons. The heading
1302
+ group generates no box, so the title and the description are items of the header itself;
1303
+ order puts the actions straight after the title and the description last, with a full-line
1304
+ basis so it never sits beside them. The title claims 10rem before the actions must wrap, and
1305
+ wrapped actions are pushed to the end and wrap their own buttons.
1306
+
1307
+ align-items: center for the title's line: the actions are controls, a control is taller than
1308
+ a line of title, and the title belongs in the middle of the line it shares with them. The
1309
+ description sits var(--space-2) under that line, and the card's own gap separates the header
1310
+ from the body -- header, a little space, the description, a little more, the content. */
1170
1311
  [data-terp="card-header"] {
1171
1312
  display: flex;
1172
- align-items: center;
1173
- justify-content: space-between;
1174
1313
  flex-wrap: wrap;
1175
- gap: var(--space-3);
1176
- }
1177
- /* start rather than center once there is a description, and the condition is the whole point.
1178
- With a title alone, center is right: the actions slot is a control, so its box is
1179
- --density-control-min-height tall against a single line box, and start would leave the title
1180
- riding above it. With two or three lines of description the same declaration floats the
1181
- control in the middle of the block instead of beside the title it belongs to.
1182
-
1183
- :has() rather than an attribute Card could stamp, for the reason control-label's disabled
1184
- states use it (see the note there): the header has no idea what its heading holds, and the
1185
- alternative is a prop describing the DOM back to the sheet. Specificity (0,2,0) beats the
1186
- base rule above, so this does not depend on its position. */
1187
- [data-terp="card-header"]:has([data-terp="card-description"]) {
1188
- align-items: start;
1314
+ align-items: center;
1315
+ column-gap: var(--space-3);
1316
+ row-gap: var(--space-2);
1189
1317
  }
1190
- /* flex: 1 1 0, and the base size is the load-bearing half. Left at the initial 0 1 auto, the
1191
- heading's hypothetical main size is the max-content width of a block holding a title AND a
1192
- sentence of description — and flex breaks lines on hypothetical main sizes BEFORE it shrinks
1193
- anything, so with flex-wrap above the heading claimed the whole line and the actions slot
1194
- wrapped underneath it. Measured: a 103px header with the button below the description, where
1195
- the same component with no description rendered inline at 48px. Same prop, two results,
1196
- depending on whether a sibling prop was set.
1197
-
1198
- A base size of 0 means both items fit on one line by construction, and the heading then grows
1199
- into whatever the actions slot does not use. min-width: 0 stays for the other half of that
1200
- story: a flex item's automatic minimum size is its content's, so a long unbreakable word in a
1201
- title would otherwise refuse to shrink past it. */
1202
1318
  [data-terp="card-heading"] {
1203
- flex: 1 1 0;
1204
- min-width: 0;
1319
+ display: contents;
1205
1320
  }
1206
1321
  /* Chrome off, heading kept. Three declarations removed rather than a second component
1207
1322
  with six markers of its own describing the same DOM: a titled region inside something
@@ -1299,6 +1414,11 @@ textarea[data-terp="input"] {
1299
1414
  background: var(--color-neutral-100);
1300
1415
  color: var(--color-fg-default);
1301
1416
  }
1417
+ /* An identifier in a table cell stays one token. Broken at a hyphen, its chip became two chips
1418
+ on two lines; whole, the column widens to it, and the table scrolls where the page cannot. */
1419
+ [data-terp="dataview-table"] td [data-terp="code"] {
1420
+ white-space: nowrap;
1421
+ }
1302
1422
  /* The same wash as inline code, and that is new: the block was --color-neutral-50 while
1303
1423
  the chip above it was --color-neutral-100, so two renderings of one thing disagreed —
1304
1424
  and the block's half was the canvas, which a card with no fill would have shown
@@ -1355,8 +1475,19 @@ textarea[data-terp="input"] {
1355
1475
  inline-size: 1px;
1356
1476
  }
1357
1477
 
1478
+ /* The actions: one item, after the title, pushed to the end of whichever line it lands on, and
1479
+ allowed to shrink to that line -- min-width: 0, or a flex item refuses to go below its
1480
+ content and a row of buttons runs past the card's edge. Its own buttons wrap when it does. */
1358
1481
  [data-terp="card-actions"] {
1359
- flex-shrink: 0;
1482
+ order: 2;
1483
+ flex: 0 1 auto;
1484
+ min-width: 0;
1485
+ margin-inline-start: auto;
1486
+ display: flex;
1487
+ flex-wrap: wrap;
1488
+ justify-content: flex-end;
1489
+ align-items: center;
1490
+ gap: var(--space-2);
1360
1491
  }
1361
1492
  /* lg, and it is no longer "the step below the page title" — page-title moved DOWN to sm in
1362
1493
  0.14.0 when the header became a band, so a section heading is now two steps above the view's
@@ -1372,9 +1503,21 @@ textarea[data-terp="input"] {
1372
1503
  }
1373
1504
  [data-terp="card-description"] {
1374
1505
  margin: 0;
1375
- color: var(--color-neutral-600);
1506
+ color: var(--color-fg-muted);
1376
1507
  font-size: var(--font-size-sm);
1377
1508
  }
1509
+ /* Their places in the header line (see card-header): the title first, claiming 10rem before the
1510
+ actions must wrap; the description last, on a line of its own. After the two base rules
1511
+ rather than beside the header's, so the look of each is read first and its placement after. */
1512
+ [data-terp="card-header"] [data-terp="card-title"] {
1513
+ order: 1;
1514
+ flex: 1 1 10rem;
1515
+ min-width: 0;
1516
+ }
1517
+ [data-terp="card-header"] [data-terp="card-description"] {
1518
+ order: 3;
1519
+ flex: 1 1 100%;
1520
+ }
1378
1521
 
1379
1522
  /* Tabs --------------------------------------------------------------------- */
1380
1523
  /* The tab strip sits one pixel over the list's bottom rule, so the selected
@@ -1397,7 +1540,7 @@ textarea[data-terp="input"] {
1397
1540
  padding: var(--space-2) var(--space-3);
1398
1541
  border: 0;
1399
1542
  border-block-end: 2px solid transparent;
1400
- color: var(--color-neutral-600);
1543
+ color: var(--color-fg-muted);
1401
1544
  background: transparent;
1402
1545
  cursor: pointer;
1403
1546
  margin-block-end: -1px;
@@ -1436,7 +1579,7 @@ textarea[data-terp="input"] {
1436
1579
  display: inline-flex;
1437
1580
  align-items: center;
1438
1581
  padding: var(--space-2) 0;
1439
- color: var(--color-neutral-600);
1582
+ color: var(--color-fg-muted);
1440
1583
  text-decoration: none;
1441
1584
  border-block-end: 2px solid transparent;
1442
1585
  }
@@ -1470,7 +1613,7 @@ textarea[data-terp="input"] {
1470
1613
  [data-terp="breadcrumbs"] {
1471
1614
  font-size: var(--font-size-sm);
1472
1615
  line-height: var(--font-line-height-snug);
1473
- color: var(--color-neutral-600);
1616
+ color: var(--color-fg-muted);
1474
1617
  }
1475
1618
  /* NOWRAP on both, and the li is the one that matters. A crumb's chevron lives inside the li
1476
1619
  beside its label, so a wrapping li let a long label push its own separator onto the next
@@ -1516,7 +1659,7 @@ textarea[data-terp="input"] {
1516
1659
  font-weight: var(--font-weight-medium);
1517
1660
  }
1518
1661
  [data-terp="breadcrumbs"] a {
1519
- color: var(--color-neutral-600);
1662
+ color: var(--color-fg-muted);
1520
1663
  text-decoration: none;
1521
1664
  transition: color var(--motion-duration-fast) var(--motion-easing-standard);
1522
1665
  }
@@ -1570,7 +1713,7 @@ textarea[data-terp="input"] {
1570
1713
  min-height: 100vh;
1571
1714
  font-family: var(--font-family-sans);
1572
1715
  color: var(--color-neutral-900);
1573
- background: var(--color-neutral-50);
1716
+ background: var(--color-bg-canvas);
1574
1717
  }
1575
1718
  /* The sidebar. width is a rule now rather than an inline value chosen per render, which
1576
1719
  is what finally puts its transition inside terp.motion's reach: the aside carried no
@@ -1785,10 +1928,11 @@ textarea[data-terp="input"] {
1785
1928
  text-overflow: ellipsis;
1786
1929
  white-space: nowrap;
1787
1930
  }
1788
- /* Visually hidden, five elements, one rule. One is the skip link, which is the whole point of
1931
+ /* Visually hidden, one rule. One is the skip link, which is the whole point of
1789
1932
  the block for it: hidden at rest and un-hidden by a rule in terp.state. Two are the drawer's
1790
1933
  focus sentinels, which
1791
- must stay focusable and so cannot be display: none. The other two are the brand title
1934
+ must stay focusable and so cannot be display: none. Two are a figure's words for what its
1935
+ colours and its sparkline show (see Stat): read out, never drawn. The rest are the brand title
1792
1936
  and the nav labels in the icon rail, which were a style-object TERNARY before this —
1793
1937
  the component picked between two objects per render, and the collapsed branch was
1794
1938
  painted by nothing, because the rail state was internal and no specimen could reach it.
@@ -1796,6 +1940,10 @@ textarea[data-terp="input"] {
1796
1940
  [data-terp="appshell-skip-link"],
1797
1941
  [data-terp="drawer-focus-start"],
1798
1942
  [data-terp="drawer-focus-end"],
1943
+ [data-terp="stat-sentiment"],
1944
+ [data-terp="stat-trend-data"],
1945
+ [data-terp="chart-table"],
1946
+ [data-terp="status-history-data"],
1799
1947
  [data-terp="appshell-sidebar"][data-collapsed="true"] [data-terp="appshell-brand-title"],
1800
1948
  [data-terp="appshell-sidebar"][data-collapsed="true"] [data-terp="appshell-nav-label"],
1801
1949
  [data-terp="appshell-sidebar"][data-collapsed="true"] [data-terp="appshell-nav-group-label"] {
@@ -2093,174 +2241,108 @@ textarea[data-terp="input"] {
2093
2241
 
2094
2242
  align-items: center rather than baseline, because the row mixes a heading, pill badges and
2095
2243
  a button cluster: baseline alignment lines up the text and leaves the pills sitting low.
2096
- Wrapping is kept from the old heading row for the same reason it was there — a long title
2097
- meeting a wide action cluster takes a second line instead of overflowing — and the band
2098
- grows past its floor when it does. */
2244
+
2245
+ A WRAPPING FLEX LINE, and this is the third shape the band has had. It was a wrapping flex
2246
+ row first; ADR 0135 made it a grid of named areas, because a source-ordered wrap could not
2247
+ keep the meta group and the cluster as two groups and justify-content: space-between spread
2248
+ a wrapped cluster across the width. Both objections are answered here without areas:
2249
+ order puts the cluster straight after the trail and the meta group after both, and the
2250
+ cluster is ONE item pushed to the end by margin-inline-start: auto, so no free space is ever
2251
+ distributed among buttons.
2252
+
2253
+ What areas could not do is the reason for the change. "Beside the trail if it fits, under it
2254
+ if not" is a question about content, and a grid template answers it per viewport: above the
2255
+ first cutover the cluster stayed beside the trail however wide it was -- squeezing the trail
2256
+ to nothing, and with enough actions running past the window's edge -- and below it the
2257
+ cluster took a row of its own even when a single button would have fitted beside a short
2258
+ title. Reported on exactly the pages that have one action and one crumb: an overview's "New"
2259
+ button sitting alone under its title on a phone. A flex line wraps on what the items need:
2260
+ the cluster shares the trail's line when the WHOLE trail fits beside it, and when it does not
2261
+ it drops to a line of its own and wraps its own buttons there rather than pushing them off
2262
+ screen. */
2099
2263
  [data-terp="page-header"] {
2100
- display: grid;
2101
- grid-template-columns: minmax(0, 1fr) auto;
2102
- grid-template-areas: "trail actions";
2264
+ display: flex;
2265
+ flex-wrap: wrap;
2103
2266
  align-items: center;
2104
2267
  gap: var(--space-2) var(--space-4);
2105
2268
  min-width: 0;
2106
2269
  }
2107
- /* The two-row band. It used to move the action cluster onto the meta row at every width, on
2108
- the reasoning that a page with badges or a lead line ALREADY spends a second row, so the
2109
- cluster joining them costs no height and buys the trail the whole first row.
2110
-
2111
- The second half of that was never true, because the rule that gave the trail the first row
2112
- never matched (see the trail's own rule below). So the cluster was paying the whole price
2113
- and the trail collected none of it: measured on a 1280px viewport, an ordinary detail page
2114
- -- two crumbs, one badge, one button -- put the button on line two with 1028px of empty
2115
- room beside the trail on line one. That is what "the button wraps before the breadcrumb is
2116
- long" turns out to be, and it is width-independent: the same at 1440.
2117
-
2118
- So the cluster keeps its place beside the trail and the meta group takes the row below it,
2119
- which is also what the one-row band does and therefore one rule for where a page's actions
2120
- live rather than two. Below the first cutover the band becomes a single column instead --
2121
- there the cluster genuinely cannot share a line with the title, and the row it used to take
2122
- from the trail was squeezing the h1 to nothing.
2123
-
2124
- A grid rather than the flex-wrap this was: wrap order follows source order, so the meta
2125
- group and the cluster could not share a row while staying two groups, and the moment the
2126
- band did wrap justify-content: space-between had free space to distribute -- which
2127
- spread a page's buttons across the full width, or left-aligned a single cluster on a row
2128
- whose whole job was to right-align it. Areas say where things go and no free space is
2129
- distributed anywhere, so neither failure has anywhere to happen. */
2130
- [data-terp="page-header"][data-has-meta] {
2131
- /* auto, not 1fr. Equal-height lines read as one band of two lines, which is why they were
2132
- here -- but fr rows in an indefinite container resolve to the LARGEST row's content, so
2133
- the shorter line's item was centred in a track sized by the taller one and the taller
2134
- line's item filled its track exactly. With no block padding under it (the chrome row
2135
- spends none, by the invariant below) that put the bottom row flush against the band's
2136
- border: measured 9px above the content and 0px below it on every two-row page. Rows sized
2137
- to their content, plus the padding the multi-row band now spends, give 4px and 4px. */
2138
- grid-auto-rows: auto;
2139
- }
2140
- /* WHICH meta decides the row, not whether there is any. Badges show at every width, so a band
2141
- carrying one has its second row at every width. A lead line shows only above the SECOND
2142
- cutover (see page-description below), so a band whose only meta is a lead line has nothing
2143
- to put on that row anywhere beneath it -- and a grid row with nothing visible in it is still
2144
- a row. It was one: the empty meta group took a track, the band's row gap and the multi-row
2145
- band's block padding came with it, and the whole was stretched to the header floor. Measured
2146
- below the first cutover on a hub with a lead line, the title sat 6.8px above the centre of a
2147
- one-line band whose other line showed nothing at all.
2148
-
2149
- So Page stamps the kind (data-has-meta="badges" or "description"), and a description-only
2150
- band is a one-row band until the correction at the second cutover gives it its meta row --
2151
- the same mobile-first shape the lead line itself is written in. Its meta group is taken out
2152
- of flow there too, and not merely left empty: its grid-area names an area the one-row
2153
- template does not declare, and an item placed into a missing named area is not dropped but
2154
- given IMPLICIT lines, which is a new row after all. */
2270
+ /* WHICH meta decides whether it shows, not whether there is any. Badges show at every width.
2271
+ A lead line shows only above the SECOND cutover (see page-description below), so a band
2272
+ whose only meta is a lead line has nothing to put on its meta line anywhere beneath it -- and
2273
+ an empty flex item with a full-width basis is still a line, with the band's gap above it.
2274
+ Page stamps the kind (data-has-meta="badges" or "description"), and the description-only
2275
+ group is out of flow until the correction at the second cutover brings it back: the same
2276
+ mobile-first shape the lead line itself is written in. */
2155
2277
  [data-terp="page-header"][data-has-meta="description"] [data-terp="page-meta"] {
2156
2278
  display: none;
2157
2279
  }
2158
- @media ${WIDE_VIEWPORT_QUERY} {
2159
- [data-terp="page-header"][data-has-meta="badges"] {
2160
- grid-template-areas:
2161
- "trail actions"
2162
- "meta meta";
2163
- }
2164
- }
2165
2280
  @media ${ROOMY_VIEWPORT_QUERY} {
2166
- [data-terp="page-header"][data-has-meta="description"] {
2167
- grid-template-areas:
2168
- "trail actions"
2169
- "meta meta";
2170
- }
2171
2281
  [data-terp="page-header"][data-has-meta="description"] [data-terp="page-meta"] {
2172
2282
  display: flex;
2173
2283
  }
2174
2284
  }
2175
- /* Below the first cutover the band is one column and nothing competes for a line. The trail
2176
- keeps the leaf and one ancestor: every crumb carries min-width: 0 and an ellipsis while the
2177
- separators are flex: 0 0 auto, so a trail with no room does not degrade to short labels --
2178
- it degrades to a row of bare chevrons with the h1 among the casualties. Measured at 360px
2179
- on a six-crumb page: six labels under 8px, no page title on screen at all, and the cluster
2180
- overlapping the badges by 24px. Dropping the ancestors takes their separators with them,
2181
- which is the only degradation here that leaves something readable.
2182
-
2183
- The actions row is declared only when there IS a cluster -- :has() for the same reason
2184
- card-header and control-label use it, that the alternative is an attribute the component
2185
- would have to stamp. A named row with nothing in it is still a row, and with the band's
2186
- gap under it that is 8px of empty space wedged under the trail on every page that has no
2187
- actions. */
2285
+ /* Below the first cutover the trail keeps the leaf and one ancestor: every crumb carries
2286
+ min-width: 0 and an ellipsis while the separators are flex: 0 0 auto, so a trail with no
2287
+ room does not degrade to short labels -- it degrades to a row of bare chevrons with the h1
2288
+ among the casualties. Measured at 360px on a six-crumb page: six labels under 8px and no
2289
+ page title on screen at all. Dropping the ancestors takes their separators with them, which
2290
+ is the only degradation here that leaves something readable. */
2188
2291
  @media ${NARROW_VIEWPORT} {
2189
- [data-terp="page-header"] {
2190
- grid-template-columns: minmax(0, 1fr);
2191
- grid-template-areas: "trail";
2192
- }
2193
- [data-terp="page-header"]:has(> [data-terp="page-actions"]) {
2194
- grid-template-areas:
2195
- "trail"
2196
- "actions";
2197
- }
2198
- /* Written AFTER the :has() rule and not before it: the two selectors tie at (0,2,0), so
2199
- source order is what decides a page that carries meta and no cluster, and it belongs to
2200
- this one. The combined selector below outranks both at (0,3,0).
2201
-
2202
- Badges only: this whole block sits below the first cutover, where a lead line never
2203
- shows, so a description-only band keeps the rows it would have with no meta at all. */
2204
- [data-terp="page-header"][data-has-meta="badges"] {
2205
- grid-template-areas:
2206
- "trail"
2207
- "meta";
2208
- }
2209
- [data-terp="page-header"][data-has-meta="badges"]:has(> [data-terp="page-actions"]) {
2210
- grid-template-areas:
2211
- "trail"
2212
- "meta"
2213
- "actions";
2214
- }
2215
2292
  [data-terp="breadcrumbs"] li:not(:last-child):not(:nth-last-child(2)) {
2216
2293
  display: none;
2217
2294
  }
2218
2295
  [data-terp="breadcrumbs"] li:nth-last-child(2):not(:first-child)::before {
2219
2296
  content: "…";
2220
2297
  margin-inline-end: var(--space-2);
2221
- color: var(--color-neutral-600);
2298
+ color: var(--color-fg-muted);
2222
2299
  }
2223
2300
  }
2224
2301
  /* The band's left group, and it generates NO box. The trail and the meta group have to be
2225
- grid items of the band itself -- they sit on different rows -- but the marker is published
2226
- and a wrapper that boxed them would put them both in one cell. display: contents is the
2227
- sheet's existing answer to exactly that shape (see the markdown wrapper): the children
2228
- stay in flow as the grid's own items, and the marker survives for the scanner and for
2229
- anything reading the DOM.
2230
-
2231
- The flex basis this used to carry is gone with the box. What it bought -- a heading that
2232
- shrinks instead of pushing the cluster off the row -- is now the grid's minmax(0, 1fr)
2233
- first column, which does the same job by construction rather than by getting a flex
2234
- hypothetical size right. */
2302
+ items of the band itself -- the trail shares a line with the cluster and the meta group
2303
+ takes one of its own -- and a wrapper that boxed them would make them one item.
2304
+ display: contents keeps the marker for the scanner and for anything reading the DOM. */
2235
2305
  [data-terp="page-heading"] {
2236
2306
  display: contents;
2237
2307
  }
2238
- /* The trail's placement, and the combinator is the whole of it. This was a CHILD selector,
2239
- and the trail is not a child of the band: Page renders it inside page-heading, which is
2240
- display: contents. That removes the BOX and not the node, and selectors match the tree, so
2241
- the rule matched nothing at all and the trail was auto-placed with its automatic minimum
2242
- intact. Both halves below were therefore dead from the day the heading group arrived, and
2243
- the two-row band above was justified by a benefit this rule was supposed to deliver.
2244
-
2245
- Descendant, not child, and scoped to the band: page-header holds the heading group and the
2246
- cluster and nothing else, so there is no second trail here to catch by accident. */
2308
+ /* The trail: first, and growing into whatever the cluster leaves. Its basis is auto -- its own
2309
+ full width -- because that is what "fits" means: the cluster joins the trail's line only when
2310
+ the whole trail and the cluster fit on it together, so a short overview title keeps its "New"
2311
+ button beside it, and a title too long to share a line keeps the line and sends the cluster
2312
+ under it rather than being cut short to make room. A fixed claim was tried first (12rem) and
2313
+ answered the wrong question: at a phone's width it moved a single button off a one-word
2314
+ title, and at a desk's it truncated a title the cluster could have wrapped under.
2315
+ min-width: 0 so a trail longer than the whole line still ellipsises rather than widening it.
2316
+
2317
+ Descendant, not child: Page renders the trail inside page-heading, which is display:
2318
+ contents. That removes the box and not the node, and selectors match the tree -- a child
2319
+ selector here matched nothing for a release, and the trail kept its automatic minimum. */
2247
2320
  [data-terp="page-header"] [data-terp="breadcrumbs"] {
2248
- grid-area: trail;
2321
+ order: 1;
2322
+ flex: 1 1 auto;
2249
2323
  min-width: 0;
2250
2324
  }
2251
- /* Badges and the lead line, grouped so they share the second row as one left-hand item
2252
- rather than competing for cells with the cluster opposite them. */
2325
+ /* The cluster: one item, pushed to the line's end. It may shrink to the line it is on, and
2326
+ min-width: 0 is what lets it -- a flex item's automatic minimum is its content's, so a
2327
+ cluster wider than the window would otherwise refuse to shrink and run off the edge. Shrunk,
2328
+ its own flex-wrap (see page-actions) breaks its buttons onto further lines. */
2329
+ [data-terp="page-header"] > [data-terp="page-actions"] {
2330
+ order: 2;
2331
+ flex: 0 1 auto;
2332
+ min-width: 0;
2333
+ margin-inline-start: auto;
2334
+ }
2335
+ /* Badges and the lead line, grouped as one item with a full-line basis, so they always take a
2336
+ line of their own under the trail and the cluster rather than competing with either. */
2253
2337
  [data-terp="page-meta"] {
2254
- grid-area: meta;
2338
+ order: 3;
2339
+ flex: 1 1 100%;
2255
2340
  display: flex;
2256
2341
  flex-wrap: wrap;
2257
2342
  align-items: center;
2258
2343
  gap: var(--space-2) var(--space-3);
2259
2344
  min-width: 0;
2260
2345
  }
2261
- [data-terp="page-header"] > [data-terp="page-actions"] {
2262
- grid-area: actions;
2263
- }
2264
2346
  /* The lead line is desktop-only, and it is written as the correction rather than the rule:
2265
2347
  hidden at every width, shown again above the SECOND cutover. Mobile-first in the literal
2266
2348
  sense, and it is what lets the three regions come out of two queries (see ./breakpoints) —
@@ -2326,7 +2408,7 @@ textarea[data-terp="input"] {
2326
2408
  margin: 0;
2327
2409
  flex: 1 1 0;
2328
2410
  min-width: 0;
2329
- color: var(--color-fg-subtle);
2411
+ color: var(--color-fg-muted);
2330
2412
  font-size: var(--font-size-sm);
2331
2413
  overflow: hidden;
2332
2414
  white-space: nowrap;
@@ -2334,70 +2416,64 @@ textarea[data-terp="input"] {
2334
2416
  }
2335
2417
  /* The band's CHROME, which needs no shell above it and so is not gated on one. Its height
2336
2418
  and its border are what make the row a band rather than a title line, and they are correct
2337
- wherever Page renders — the workbench's specimen cards and the unit tests included. That
2338
- split is the repair of a real contradiction: these declarations used to sit inside the
2339
- shell-gated rule below while the comment claimed "standalone, the band is still a bordered
2340
- row at the header's height", which the rule made false and a test fifteen lines away in
2341
- styles.test.ts pinned as false. The three page-header specimens were pictures of a plain
2342
- flex row that the comment described as chrome.
2419
+ wherever Page renders — the workbench's specimen cards and the unit tests included.
2343
2420
 
2344
2421
  box-sizing: border-box so the floor counts the padding, matching appshell-header, whose
2345
- height this is reading. Without it the two are a padding apart and the "same height as the
2346
- header above it" claim is off by 1rem.
2347
-
2348
- padding-block is ZERO for the reason the app header's rule states in full, and this row is
2349
- where the symptom showed: with var(--space-2) a single action button beat the floor, so the
2350
- band was 53px on a page with actions and 48px on a page without — the one piece of chrome
2351
- whose entire promise is that it is the same height as the header above it, changing height
2352
- per page. var(--space-1) fixed that for the default control and not for the large one, which
2353
- is why this is zero rather than a step. It still grows past the floor when the row WRAPS, which is the
2354
- one case that should move it: a long title meeting a wide action cluster takes a second
2355
- line rather than overflowing, and a band that clipped its own title to keep a height would
2356
- be the worse trade.
2422
+ height this is reading. Without it the two are a padding apart.
2423
+
2424
+ ONE calc((var(--shell-header-height) - 1px - var(--density-control-min-height)) / 2), spent at the edges and between lines alike. Every line of the band is at least a
2425
+ control tall (the rule after this one), and the inset is what the header height leaves around
2426
+ one control, halved: (48px - 1px rule - 36px) / 2 = 5.5px at comfortable density. So a band
2427
+ of one line is inset + control + inset + rule = the header's 48px exactly, and every line it
2428
+ adds is a control and one more inset -- the second line as far from the first as the first is
2429
+ from the border. The two shapes before this each got half of that wrong: content-sized lines
2430
+ with 4px of padding crammed a multi-line band against its border, and lines a full 47px tall
2431
+ each stacked their centring space where two met, about 26px between the trail and the badges
2432
+ against 13px from the border.
2433
+
2434
+ On EVERY chrome band rather than on the kinds known to be multi-line, which is what the flex
2435
+ line changed: whether the cluster wraps depends on its content, and no selector can see that
2436
+ it did. Spent everywhere, a band that wraps for any reason gets the same inset, and a band
2437
+ that does not is the 48px it always was. The one price is the large control: 2.75rem plus the
2438
+ inset either side is 56px, so a band carrying a size="lg" button grows by 8px, where the
2439
+ zero padding this replaces held it at 48. A band's own actions are default size, and a page
2440
+ that chooses a large one has chosen a taller band.
2357
2441
 
2358
2442
  :not([data-measure="narrow"]) because a form is capped WITH its header (ADR 0098 §3) — a
2359
2443
  Save button a screen-width from its field is worse than one over it — so a form gets the
2360
- one-row band with no chrome at all: a title row, which is what it wants.
2444
+ band with no chrome at all: a title row, which is what it wants.
2361
2445
 
2362
2446
  padding-BLOCK only. The inline gutter belongs to the bleed below, because standalone there
2363
2447
  is nothing to bleed into and an inline pad with no negative margin would inset the band's
2364
- content from the body beneath it for no reason. */
2448
+ content from the body beneath it for no reason. The inset is written out rather than named:
2449
+ a custom property declared here is one the token sheet does not publish, which
2450
+ tokens.guard.test.ts refuses. */
2365
2451
  [data-terp="page"]:not([data-measure="narrow"]) > [data-terp="page-header"] {
2366
- padding-block: var(--space-0);
2452
+ padding-block: calc((var(--shell-header-height) - 1px - var(--density-control-min-height)) / 2);
2453
+ row-gap: calc((var(--shell-header-height) - 1px - var(--density-control-min-height)) / 2);
2367
2454
  min-height: var(--shell-header-height);
2368
2455
  box-sizing: border-box;
2369
2456
  border-block-end: 1px solid var(--color-neutral-200);
2370
2457
  }
2371
- /* The block padding the ONE-ROW band cannot have, spent on the bands that are already more
2372
- than one row. The rule above stays at var(--space-0) and stays tied to the app header's
2373
- own padding, because that row is the one making the claim: 48px, the same as the header
2374
- above it, and the largest control this package ships (2.75rem) has to fit inside it. A band
2375
- that carries meta has broken that height already and makes no such claim, so it can afford
2376
- the 4px — and it is the only band where the missing padding was ever visible, since the
2377
- one-row band centres its single line inside the floor and reads as padded either way.
2378
- Below the cutover the same is true of a band whose cluster has taken a row of its own.
2379
-
2380
- The narrow rule weighs (0,3,0) plus :has()'s argument, so (0,4,0) — the same as the meta
2381
- rule, and they declare the same value, so the tie decides nothing.
2382
-
2383
- A description-only band is multi-row only above the second cutover (see the meta-kind rule
2384
- near the top of the band), so that is the only width it spends this padding at. Below it
2385
- the band is one row and holds the floor like any other: spending 4px + 4px there is exactly
2386
- what pushed a lone title off the centre of a band with nothing else in it. */
2387
- [data-terp="page"]:not([data-measure="narrow"]) > [data-terp="page-header"][data-has-meta="badges"] {
2388
- padding-block: var(--space-1);
2458
+ /* The trail's line and the cluster's are at least a control tall, so the trail alone is the
2459
+ same height as a line holding the cluster, and centres in it. The trail's own list is centred
2460
+ inside it by making the nav a flex box here; outside the band a trail is just the list. */
2461
+ [data-terp="page"]:not([data-measure="narrow"]) > [data-terp="page-header"] [data-terp="breadcrumbs"],
2462
+ [data-terp="page"]:not([data-measure="narrow"]) > [data-terp="page-header"] > [data-terp="page-actions"] {
2463
+ min-height: var(--density-control-min-height);
2389
2464
  }
2390
- @media ${ROOMY_VIEWPORT_QUERY} {
2391
- [data-terp="page"]:not([data-measure="narrow"])
2392
- > [data-terp="page-header"][data-has-meta="description"] {
2393
- padding-block: var(--space-1);
2394
- }
2465
+ /* The meta line -- badges, the lead sentence -- is not a control's line. It takes its own height
2466
+ and sits directly under the line above it, the band's gap cancelled, and keeps --space-2 under
2467
+ it: with the band's inset that is the room the title has above its ink, so the band reads as a
2468
+ title and its subtitle and neither hugs a border. As a control-tall line of its own, the lead
2469
+ sentence sat 42px under a 14px title, in a band nearly twice the header's height. */
2470
+ [data-terp="page"]:not([data-measure="narrow"]) > [data-terp="page-header"] [data-terp="page-meta"] {
2471
+ margin-block-start: calc((var(--shell-header-height) - 1px - var(--density-control-min-height)) / -2);
2472
+ padding-block-end: var(--space-2);
2395
2473
  }
2396
- @media ${NARROW_VIEWPORT} {
2397
- [data-terp="page"]:not([data-measure="narrow"])
2398
- > [data-terp="page-header"]:has(> [data-terp="page-actions"]) {
2399
- padding-block: var(--space-1);
2400
- }
2474
+ [data-terp="page"]:not([data-measure="narrow"]) > [data-terp="page-header"] [data-terp="breadcrumbs"] {
2475
+ display: flex;
2476
+ align-items: center;
2401
2477
  }
2402
2478
  /* The BLEED, which does need a shell, because the negative-margin idiom is only correct when
2403
2479
  the box being escaped is appshell-main and that box pads by exactly --shell-gutter. ADR
@@ -2405,9 +2481,10 @@ textarea[data-terp="input"] {
2405
2481
  keying this half on the shell is what keeps it: standalone the band is the same bordered
2406
2482
  row at the same height, it simply does not reach past its container.
2407
2483
 
2408
- The surface comes with the bleed rather than with the chrome, and that is deliberate under
2409
- 0.14.0's surface model: a block paints no fill of its own, and this one is only chrome —
2410
- the app header's companion — once there is an app header above it to pair with.
2484
+ The fill comes with the bleed rather than with the chrome, and that is deliberate: this band
2485
+ is only chrome — the app header's companion — once there is an app header above it to pair
2486
+ with. Chrome sits on --color-bg-subtle, the container rung of ADR 0169's surface ladder, so
2487
+ the band steps back from the white app header above it and from the data below it.
2411
2488
 
2412
2489
  ONE rule for both variants, which is the payoff of the token rather than a tidy-up. As two
2413
2490
  literals this needed a mobile twin, and a negative margin whose sign has to agree with a
@@ -2418,7 +2495,55 @@ textarea[data-terp="input"] {
2418
2495
  > [data-terp="page-header"] {
2419
2496
  margin: calc(-1 * var(--shell-gutter)) calc(-1 * var(--shell-gutter)) 0;
2420
2497
  padding-inline: var(--shell-gutter);
2421
- background: var(--color-neutral-0);
2498
+ background: var(--color-bg-subtle);
2499
+ }
2500
+ /* The summary band (ADR 0169 §4): the page's own figures, directly under the band that names
2501
+ the page, so what the page is about is the first thing read after its name.
2502
+
2503
+ The fill is --color-bg-summary, a token of its own because the record leaves the fill to the
2504
+ theme: each palette ships it at the brand's soft tint, and an app that wants a calmer band
2505
+ moves that one token without moving the tint the hub tiles and the selected states share.
2506
+ The text it carries is declared against it in token-pairs.json.
2507
+
2508
+ A wrapping flex line. A group of figures takes whatever the line has, a lone figure stays
2509
+ near its own measure beside it -- the grow factors are what say so, 999 against 1 -- and a
2510
+ line of text takes a line of its own. Standalone (the workbench, a narrow form) it is a
2511
+ rounded block on the page; inside a shell it bleeds to the content column's edges as the
2512
+ band above it does, flush against that band's border by cancelling the page's own gap.
2513
+
2514
+ Its items hang from the top, and a lone figure takes the block padding a group's cells do,
2515
+ so every label in the band reads on one line and every value on the next. Centred, a
2516
+ headline tile with a sparkline set the group beside it 20px lower than its own label. */
2517
+ [data-terp="page-summary"] {
2518
+ display: flex;
2519
+ flex-wrap: wrap;
2520
+ align-items: flex-start;
2521
+ gap: var(--space-4) var(--space-6);
2522
+ min-width: 0;
2523
+ padding: var(--space-5) var(--space-4);
2524
+ box-sizing: border-box;
2525
+ border-radius: var(--radius-lg);
2526
+ background: var(--color-bg-summary);
2527
+ color: var(--color-fg-default);
2528
+ }
2529
+ [data-terp="page-summary"] > [data-terp="stat-group"] {
2530
+ flex: 999 1 24rem;
2531
+ }
2532
+ [data-terp="page-summary"] > [data-terp="stat"] {
2533
+ flex: 1 1 14rem;
2534
+ max-inline-size: 22rem;
2535
+ padding: var(--space-3) var(--space-4);
2536
+ }
2537
+ [data-terp="page-summary"] > [data-terp="text"] {
2538
+ flex: 1 1 100%;
2539
+ }
2540
+ [data-terp="appshell-main"]
2541
+ > [data-terp="page"]:not([data-measure="narrow"])
2542
+ > [data-terp="page-summary"] {
2543
+ margin: calc(-1 * var(--space-4)) calc(-1 * var(--shell-gutter)) 0;
2544
+ padding-inline: var(--shell-gutter);
2545
+ border-radius: 0;
2546
+ border-block-end: 1px solid var(--color-neutral-200);
2422
2547
  }
2423
2548
  /* The content measure, and the subheader band, which are ONE declaration rather than two
2424
2549
  features (ADR 0097 §2). A full-width band only means anything once the column beside it is
@@ -2444,7 +2569,9 @@ textarea[data-terp="input"] {
2444
2569
  never asked for, silently. The frame's own header is the only thing meant to span the track,
2445
2570
  and the marker says so. (The layout contract's runtime check still drops the header by TAG
2446
2571
  name, because that check runs where no marker is guaranteed; the two mechanisms answer
2447
- different questions and only this one is a style.)
2572
+ different questions and only this one is a style.) The summary band is the frame's too, and
2573
+ spans the track for the same reason; a selector list inside the one :not() counts as its
2574
+ most specific argument, so naming it leaves the weight below where it was.
2448
2575
 
2449
2576
  And no backticks in this block, which is not a style note: a backtick here TERMINATES
2450
2577
  TERP_STYLES_CSS and the parse fails somewhere else entirely with "try inserting a
@@ -2472,7 +2599,7 @@ textarea[data-terp="input"] {
2472
2599
  still wins with it. min() rather than a bare token so a track narrower than the measure is
2473
2600
  untouched rather than overflowing. */
2474
2601
  [data-terp="appshell"][data-content-width="measured"]
2475
- [data-terp="page"] > *:not([data-terp="page-header"]) {
2602
+ [data-terp="page"] > *:not([data-terp="page-header"], [data-terp="page-summary"]) {
2476
2603
  width: min(100%, var(--shell-content-max-width));
2477
2604
  }
2478
2605
  /* The reach-through, for the one body child that generates no box of its own. Markdown is
@@ -2488,6 +2615,130 @@ textarea[data-terp="input"] {
2488
2615
  width: min(100%, var(--shell-content-max-width));
2489
2616
  }
2490
2617
 
2618
+ /* The sequence bar (ADR 0168) ---------------------------------------------- */
2619
+ /* A page's previous and next neighbours and its place among them, rendered by Page after its
2620
+ article when the page is given a sequence. The band at the top says where the page is; this
2621
+ bar at the bottom says what comes before and after it.
2622
+
2623
+ STICKY, and that is the reason it exists rather than a row of buttons under the body. A row
2624
+ placed after the content sits wherever the content ends, so stepping through a series moved
2625
+ the control on every page — a long record put "next" below the fold, a short one put it
2626
+ halfway up the screen — and the reader had to find it again each time. Pinned to the bottom
2627
+ it is in one place for the whole series.
2628
+
2629
+ THREE CELLS, always rendered: an absent neighbour leaves its cell empty, so "next" is at the
2630
+ same spot on the first page as on the fortieth. The outer two are minmax(0, 1fr), which is
2631
+ what lets a long neighbour name truncate inside its half instead of pushing the position
2632
+ off centre.
2633
+
2634
+ A surface of its own, which a block in this sheet does not usually paint: content scrolls
2635
+ UNDER a sticky bar, so a transparent one would print the body through itself. The same fill
2636
+ and border the band at the top carries — --color-bg-subtle, the chrome rung of ADR 0169's
2637
+ surface ladder — so the two read as one frame around the body.
2638
+
2639
+ The safe-area inset is the phone's home indicator: max() keeps the ordinary padding where
2640
+ there is none and clears the indicator where there is. */
2641
+ [data-terp="page-sequence"] {
2642
+ position: sticky;
2643
+ bottom: 0;
2644
+ z-index: var(--z-index-sticky);
2645
+ display: grid;
2646
+ grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
2647
+ align-items: center;
2648
+ gap: var(--space-3);
2649
+ margin-block-start: var(--space-4);
2650
+ padding-block: var(--space-2) max(var(--space-2), env(safe-area-inset-bottom));
2651
+ border-block-start: 1px solid var(--color-neutral-200);
2652
+ background: var(--color-bg-subtle);
2653
+ font-size: var(--font-size-sm);
2654
+ }
2655
+ [data-terp="page-sequence-previous"],
2656
+ [data-terp="page-sequence-next"] {
2657
+ display: flex;
2658
+ min-width: 0;
2659
+ }
2660
+ [data-terp="page-sequence-next"] {
2661
+ justify-content: flex-end;
2662
+ }
2663
+ [data-terp="page-sequence-position"] {
2664
+ color: var(--color-fg-subtle);
2665
+ white-space: nowrap;
2666
+ font-variant-numeric: tabular-nums;
2667
+ }
2668
+ /* The links read as the ghost button they sit beside in every other toolbar — same height,
2669
+ same ink, same wash on hover (terp.state) — while staying links, which is the half a button
2670
+ could not be: a step to a sibling page is a navigation, so it opens in a new tab on a
2671
+ middle-click like any other link. Child selectors from the marked cells rather than a marker
2672
+ on the anchor, because the anchor is the router's: a renderer that forwards no attributes
2673
+ would otherwise leave the bar unstyled with no error, which is the reason Link's marker is
2674
+ on a wrapper too. */
2675
+ [data-terp="page-sequence-previous"] > a,
2676
+ [data-terp="page-sequence-next"] > a {
2677
+ display: inline-flex;
2678
+ align-items: center;
2679
+ gap: var(--space-1);
2680
+ max-width: 100%;
2681
+ min-height: var(--density-control-min-height);
2682
+ padding: 0 var(--space-2);
2683
+ border-radius: var(--radius-md);
2684
+ box-sizing: border-box;
2685
+ color: var(--color-neutral-700);
2686
+ font-weight: var(--font-weight-medium);
2687
+ text-decoration: none;
2688
+ }
2689
+ [data-terp="page-sequence-label"] {
2690
+ min-width: 0;
2691
+ overflow: hidden;
2692
+ text-overflow: ellipsis;
2693
+ white-space: nowrap;
2694
+ }
2695
+ /* A narrow frame caps the bar with it, as it caps its own band (ADR 0098 §3). */
2696
+ [data-terp="page"][data-measure="narrow"] + [data-terp="page-sequence"] {
2697
+ max-width: 32rem;
2698
+ }
2699
+ /* Inside a shell the bar has to be at the BOTTOM of the content column even when the page is
2700
+ short, or a short page and a long one put it in different places and the bar has fixed
2701
+ nothing. appshell-main already fills the column — the shell is at least the viewport's
2702
+ height and main grows to fill what the header and footer leave — so the page only has to
2703
+ take up the rest of main, and that needs main to be a flex column.
2704
+
2705
+ Scoped to a main that HAS a bar, with :has(), so no other page changes at all: a page with
2706
+ no sequence keeps main as the block it has always been. Inside the scope the article is a
2707
+ flex item of a column container, which stretches it across main exactly as block layout did
2708
+ (stretch fills the cross axis; the automatic minimum size applies to the main axis only),
2709
+ and flex-grow gives it the free height.
2710
+
2711
+ The bar then bleeds through main's padding to the column's edges, by the same gutter the
2712
+ band at the top bleeds by, so the frame's bottom edge lines up with its top one. Bottom too,
2713
+ so a bar at rest and a bar pinned to the viewport sit on the same line rather than a gutter
2714
+ apart. A narrow frame keeps its cap and takes only the bottom bleed. */
2715
+ [data-terp="appshell-main"]:has(> [data-terp="page-sequence"]) {
2716
+ display: flex;
2717
+ flex-direction: column;
2718
+ }
2719
+ [data-terp="appshell-main"] > [data-terp="page"]:has(+ [data-terp="page-sequence"]) {
2720
+ flex-grow: 1;
2721
+ }
2722
+ [data-terp="appshell-main"] > [data-terp="page-sequence"] {
2723
+ margin-block-end: calc(-1 * var(--shell-gutter));
2724
+ }
2725
+ [data-terp="appshell-main"]
2726
+ > [data-terp="page"]:not([data-measure="narrow"])
2727
+ + [data-terp="page-sequence"] {
2728
+ margin-inline: calc(-1 * var(--shell-gutter));
2729
+ padding-inline: var(--shell-gutter);
2730
+ }
2731
+ /* A bar pinned over the bottom of the viewport can cover what the browser just scrolled into
2732
+ view: tab to the last field of a long form and the field lands behind the bar (WCAG 2.2 SC
2733
+ 2.4.11, focus not obscured). Scroll padding at the bottom of the document — its scroll
2734
+ container, see the gutter rule on html — keeps a focused or scrolled-to element above it.
2735
+ The bar's own height, from the tokens it is built of: a control, its two paddings and the
2736
+ border. The root's control height, which is the comfortable one and so never the shorter of
2737
+ the two densities. */
2738
+ html:has([data-terp="page-sequence"]) {
2739
+ scroll-padding-block-end: calc(var(--density-control-min-height) + 2 * var(--space-2) + 1px);
2740
+ }
2741
+
2491
2742
  /* The split archetype ------------------------------------------------------ */
2492
2743
  /* A list beside the record it selects. Mobile-first: one column, list first, so the tab
2493
2744
  sequence is the reading order in both layouts and the stacked case needs no rule at all.
@@ -2543,7 +2794,7 @@ textarea[data-terp="input"] {
2543
2794
  display: grid;
2544
2795
  place-items: center;
2545
2796
  padding: var(--space-6);
2546
- background: var(--color-neutral-50);
2797
+ background: var(--color-bg-canvas);
2547
2798
  font-family: var(--font-family-sans);
2548
2799
  color: var(--color-neutral-900);
2549
2800
  }
@@ -2619,7 +2870,7 @@ textarea[data-terp="input"] {
2619
2870
  gap: var(--space-4);
2620
2871
  padding: var(--space-4);
2621
2872
  max-width: 32rem;
2622
- background: var(--color-bg-surface);
2873
+ background: var(--color-bg-subtle);
2623
2874
  border: 1px solid var(--color-neutral-200);
2624
2875
  border-radius: var(--radius-lg);
2625
2876
  }
@@ -2659,7 +2910,7 @@ textarea[data-terp="input"] {
2659
2910
  }
2660
2911
  [data-terp="profile-role"] {
2661
2912
  margin: 0;
2662
- color: var(--color-neutral-600);
2913
+ color: var(--color-fg-muted);
2663
2914
  }
2664
2915
 
2665
2916
  /* The built-in admin screens ----------------------------------------------- */
@@ -2677,10 +2928,11 @@ textarea[data-terp="input"] {
2677
2928
  [data-terp="admin-form"] {
2678
2929
  max-width: 32rem;
2679
2930
  }
2680
- /* A section heading inside a detail screen: the members list, the permission
2681
- grants. font-size-base rather than the UA default, which for an h2 is LARGER than
2682
- the page's own h1 at font-size-lg — so without this a section outranks the view
2683
- it sits in. */
2931
+ /* A section heading inside a detail screen: the access a person or a group holds per
2932
+ module. An h3, the level a Card's title and a titled collection take, so the sections of
2933
+ one screen sit at one level of its outline. font-size-base rather than the UA default for a
2934
+ heading, which is larger than the page's own title -- so without this a section outranks
2935
+ the view it sits in. */
2684
2936
  [data-terp="admin-section-title"] {
2685
2937
  margin: 0;
2686
2938
  font-size: var(--font-size-base);
@@ -2762,7 +3014,7 @@ textarea[data-terp="input"] {
2762
3014
  height: 100%;
2763
3015
  min-height: 10rem;
2764
3016
  padding: var(--space-4);
2765
- background: var(--color-bg-surface);
3017
+ background: var(--color-bg-subtle);
2766
3018
  border: 1px solid var(--color-neutral-200);
2767
3019
  border-radius: var(--radius-lg);
2768
3020
  box-shadow: var(--shadow-sm);
@@ -2802,7 +3054,7 @@ textarea[data-terp="input"] {
2802
3054
  /* neutral-600 rather than fg-muted, and it is not the tinted-surface case: this text
2803
3055
  sits on the card's own neutral-0 and measures 7.58 / 7.94 / 7.50 / 7.60 / 18.42. */
2804
3056
  [data-terp="hubcard-description"] {
2805
- color: var(--color-neutral-600);
3057
+ color: var(--color-fg-muted);
2806
3058
  font-size: var(--font-size-sm);
2807
3059
  line-height: 1.5;
2808
3060
  }
@@ -2874,10 +3126,12 @@ textarea[data-terp="input"] {
2874
3126
  leaves the toolbar inside a surface, and leaves two nested frames whenever the view
2875
3127
  is empty (the empty state's dashed frame inside the card's solid one).
2876
3128
 
2877
- What the slot carries is now a FRAME rather than a fill — border and radius, with the
2878
- page showing through, per the card rule's note on the surface model. That changes the
2879
- sentence above by one word and not the ownership it settles: the frame is the table's,
2880
- not the view's.
3129
+ What the slot carries is the surface itself — a fill, a border and a radius — and the
3130
+ page's one raised shadow. The collection is where data is read, so under ADR 0169's
3131
+ surface ladder it keeps --color-bg-surface while the containers around it step back to
3132
+ --color-bg-subtle, and --shadow-md lifts it above them: the table is the brightest object
3133
+ on the page by rule. None of that moves the ownership settled above: the frame is the
3134
+ table's, not the view's.
2881
3135
 
2882
3136
  Keyed on [data-variant="full"] rather than the bare marker for the reason the
2883
3137
  previous rule gave and which still holds: [data-variant="embedded"] must declare
@@ -2889,6 +3143,7 @@ textarea[data-terp="input"] {
2889
3143
  background: var(--color-bg-surface);
2890
3144
  border: 1px solid var(--color-neutral-200);
2891
3145
  border-radius: var(--radius-lg);
3146
+ box-shadow: var(--shadow-md);
2892
3147
  }
2893
3148
  /* The horizontal scroll container the reset's scrollbar comment already names. A
2894
3149
  marker rather than [data-terp="dataview"] > div, which also matches the toolbar.
@@ -3134,13 +3389,9 @@ input[data-terp="input"][type="password"]::-ms-reveal {
3134
3389
  gap: var(--space-1);
3135
3390
  }
3136
3391
  /* The two toggles at rest, which is to say INACTIVE. 2rem stays a literal, pager
3137
- reasoning. Their border is the neutral-300 control boundary, which measures
3138
- 1.42-2.36:1 across the surfaces a bordered control sits on in four themes — below
3139
- the 3:1 SC 1.4.11 asks of a control boundary. Still not fixed here, because a token
3140
- clearing 3:1 repaints every bordered control in the package, but no longer only a
3141
- sentence: control-boundary-on-surface and control-boundary-on-canvas are declared
3142
- pairings held at their measured floors by BELOW_UI in tokens.contrast.test.js, so
3143
- the debt can only shrink and emptying that table is the acceptance criterion. */
3392
+ reasoning. Their border is the control boundary every bordered control shares,
3393
+ --color-border-strong, which control-boundary-on-surface and control-boundary-on-canvas
3394
+ in token-pairs.json hold at the 3:1 SC 1.4.11 asks of it in every theme. */
3144
3395
  [data-terp="dataview-toolbar-layout"] > [data-terp="iconbutton"] {
3145
3396
  display: inline-flex;
3146
3397
  align-items: center;
@@ -3148,7 +3399,7 @@ input[data-terp="input"][type="password"]::-ms-reveal {
3148
3399
  min-height: 2rem;
3149
3400
  padding: var(--space-1) var(--space-2);
3150
3401
  background: transparent;
3151
- border: 1px solid var(--color-neutral-300);
3402
+ border: 1px solid var(--color-border-strong);
3152
3403
  border-radius: var(--radius-md);
3153
3404
  cursor: pointer;
3154
3405
  color: var(--color-fg-subtle);
@@ -3374,11 +3625,17 @@ th[data-terp="dataview-actions-cell"] > span {
3374
3625
  /* DataView: the card layout ------------------------------------------------ */
3375
3626
  /* The responsive stand-in for a row, so it reads the same cell-padding tokens:
3376
3627
  a card IS the row's padding, and having compact tighten the table while
3377
- leaving the cards alone would make the attribute mean two things. */
3628
+ leaving the cards alone would make the attribute mean two things.
3629
+
3630
+ The list has NO padding of its own. It is a direct child of the view, beside the toolbar
3631
+ and the pagination -- not inside the table's frame -- so the space-2 it used to carry inset
3632
+ every card 8px from the edge the toolbar, the pagination and the table frame all sit on.
3633
+ Measured at a phone width: toolbar 16-394px, cards 24-386px. The cards are the frame in
3634
+ this layout, so their edge is the one that lines up. */
3378
3635
  [data-terp="dataview-card-list"] {
3379
3636
  list-style: none;
3380
3637
  margin: 0;
3381
- padding: var(--space-2);
3638
+ padding: 0;
3382
3639
  display: grid;
3383
3640
  gap: var(--space-2);
3384
3641
  }
@@ -3448,12 +3705,21 @@ th[data-terp="dataview-actions-cell"] > span {
3448
3705
  [data-terp="dataview-card-title"] {
3449
3706
  font-weight: var(--font-weight-medium);
3450
3707
  }
3708
+ /* The status slot is a PLACE, not a pill. It used to wear one -- a neutral-100 fill, space-2
3709
+ of inline padding and a full radius -- around whatever the status column rendered, and what
3710
+ a status column renders is usually a Badge, which is a pill already: so the card showed a
3711
+ badge inside a slightly wider grey capsule, and a slot carrying a badge AND a date (one cell,
3712
+ two things) put both in it. The fill could only ever be seen as that stray margin.
3713
+
3714
+ Bare now: the column's own content decides how it looks. Plain text still reads as
3715
+ secondary, at the size it had, in --color-fg-muted rather than the neutral-700 it sat in on
3716
+ its own fill: without that fill the text lands on whichever tone wash the card took, and
3717
+ fg-muted is the ink declared and measured against all five (see the meta rule below). */
3451
3718
  [data-terp="dataview-card-status"] {
3719
+ display: inline-flex;
3720
+ align-items: center;
3452
3721
  font-size: var(--font-size-sm);
3453
- padding: 0 var(--space-2);
3454
- background: var(--color-neutral-100);
3455
- border-radius: var(--radius-full);
3456
- color: var(--color-neutral-700);
3722
+ color: var(--color-fg-muted);
3457
3723
  }
3458
3724
  /* Subtitle and date share one name because they share every declaration. Two
3459
3725
  markers would suggest the sheet distinguishes them, and it does not.
@@ -3560,7 +3826,7 @@ th[data-terp="dataview-actions-cell"] > span {
3560
3826
  min-height: 2rem;
3561
3827
  padding: var(--space-1) var(--space-2);
3562
3828
  background: var(--color-neutral-0);
3563
- border: 1px solid var(--color-neutral-300);
3829
+ border: 1px solid var(--color-border-strong);
3564
3830
  border-radius: var(--radius-md);
3565
3831
  cursor: pointer;
3566
3832
  color: var(--color-neutral-700);
@@ -3593,7 +3859,7 @@ th[data-terp="dataview-actions-cell"] > span {
3593
3859
  gap: var(--space-1);
3594
3860
  padding: var(--space-1) var(--space-2);
3595
3861
  background: transparent;
3596
- border: 1px solid var(--color-neutral-300);
3862
+ border: 1px solid var(--color-border-strong);
3597
3863
  border-radius: var(--radius-md);
3598
3864
  cursor: pointer;
3599
3865
  color: var(--color-neutral-700);
@@ -3691,7 +3957,7 @@ th[data-terp="dataview-actions-cell"] > span {
3691
3957
  color: var(--color-status-danger);
3692
3958
  }
3693
3959
  [data-terp="resource-list-empty"] {
3694
- color: var(--color-neutral-600);
3960
+ color: var(--color-fg-muted);
3695
3961
  }
3696
3962
  [data-terp="resource-list-items"] {
3697
3963
  list-style: none;
@@ -3723,7 +3989,7 @@ th[data-terp="dataview-actions-cell"] > span {
3723
3989
  gap: var(--space-3);
3724
3990
  padding: var(--space-8) var(--space-6);
3725
3991
  text-align: center;
3726
- color: var(--color-neutral-600);
3992
+ color: var(--color-fg-muted);
3727
3993
  background: var(--color-bg-surface);
3728
3994
  border: 1px dashed var(--color-neutral-300);
3729
3995
  border-radius: var(--radius-lg);
@@ -3757,7 +4023,7 @@ th[data-terp="dataview-actions-cell"] > span {
3757
4023
  font-weight: var(--font-weight-semibold);
3758
4024
  }
3759
4025
  [data-terp="empty-state-description"] {
3760
- color: var(--color-neutral-600);
4026
+ color: var(--color-fg-muted);
3761
4027
  font-size: var(--font-size-sm);
3762
4028
  line-height: 1.5;
3763
4029
  max-width: 36ch;
@@ -3875,7 +4141,7 @@ input[data-terp="input"][role="combobox"] {
3875
4141
  align-items: center;
3876
4142
  gap: var(--space-1);
3877
4143
  padding: var(--space-1);
3878
- border: 1px solid var(--color-neutral-300);
4144
+ border: 1px solid var(--color-border-strong);
3879
4145
  border-radius: var(--radius-md);
3880
4146
  background: var(--color-neutral-0);
3881
4147
  }
@@ -3911,7 +4177,7 @@ input[data-terp="input"][role="combobox"] {
3911
4177
  min-inline-size: var(--space-4);
3912
4178
  min-block-size: var(--space-4);
3913
4179
  padding: 0;
3914
- color: var(--color-neutral-600);
4180
+ color: var(--color-fg-muted);
3915
4181
  background: transparent;
3916
4182
  border: none;
3917
4183
  border-radius: var(--radius-sm);
@@ -4016,7 +4282,7 @@ button[data-terp="input"][data-placeholder="true"] {
4016
4282
  justify-content: center;
4017
4283
  width: 2rem;
4018
4284
  height: 2rem;
4019
- border: 1px solid var(--color-neutral-300);
4285
+ border: 1px solid var(--color-border-strong);
4020
4286
  border-radius: var(--radius-md);
4021
4287
  background: transparent;
4022
4288
  color: var(--color-neutral-700);
@@ -4081,10 +4347,19 @@ button[data-terp="input"][data-placeholder="true"] {
4081
4347
 
4082
4348
  /* Fields ------------------------------------------------------------------- */
4083
4349
  [data-terp="field"],
4084
- [data-terp="field-label"] {
4350
+ [data-terp="field-label"],
4351
+ [data-terp="field-body"] {
4085
4352
  display: grid;
4086
4353
  gap: var(--space-1);
4087
4354
  }
4355
+ /* The body holds its control at the control's own height. Where fields share lines, a body is
4356
+ stretched to the tallest body on its line -- a neighbour's control AND its hint -- and its
4357
+ grid track stretched with it, so a field with no hint grew a control half again as tall as
4358
+ the one beside it. align-content: start keeps the tracks their content's height and leaves
4359
+ the spare space below, where a hint would have been. */
4360
+ [data-terp="field-body"] {
4361
+ align-content: start;
4362
+ }
4088
4363
  [data-terp="field-label-text"] {
4089
4364
  font-weight: var(--font-weight-medium);
4090
4365
  font-size: var(--font-size-sm);
@@ -4111,7 +4386,7 @@ button[data-terp="input"][data-placeholder="true"] {
4111
4386
  justify-items: start;
4112
4387
  }
4113
4388
  [data-terp="field-hint"] {
4114
- color: var(--color-fg-subtle);
4389
+ color: var(--color-fg-muted);
4115
4390
  font-size: var(--font-size-xs);
4116
4391
  }
4117
4392
  [data-terp="field-error"] {
@@ -4244,6 +4519,13 @@ button[data-terp="input"][data-placeholder="true"] {
4244
4519
  border-radius: var(--radius-full);
4245
4520
  background: var(--color-bg-inset);
4246
4521
  }
4522
+ /* In a table cell the measure is shorter, and still one measure for the whole column, so its
4523
+ bars compare as any meters do. An automatic table layout sizes a column from what its cells
4524
+ cannot shrink below, and a 10rem bar beside its value made a bar column some 13rem wide
4525
+ however narrow it was declared -- the names and identifiers beside it wrapped to make room. */
4526
+ [data-terp="dataview-table"] td [data-terp="meter-bar"] {
4527
+ inline-size: 6rem;
4528
+ }
4247
4529
  /* Blink draws the track and the fill as pseudo-elements, one per region, and this is the
4248
4530
  block the screenshot lane sees; WebKit documents the same pseudo-elements, and no lane runs
4249
4531
  it. Each engine's selectors are their own rules and must
@@ -4308,24 +4590,665 @@ button[data-terp="input"][data-placeholder="true"] {
4308
4590
  white-space: nowrap;
4309
4591
  }
4310
4592
 
4593
+ /* Charts (ADR 0158, ADR 0169 §6) -------------------------------------------- */
4594
+ /* A chart is a tile on the surface, the rung where data is read, as a figure is: the surface,
4595
+ its hairline and its small shadow. Every mark is SVG geometry in attributes and every colour
4596
+ is a rule here, keyed on the markers and on data-series / data-tone, so nothing is styled
4597
+ inline. The marks' colours hold 3:1 against the surface, declared in token-pairs.json; the
4598
+ gridlines are decorative and declare nothing. */
4599
+ [data-terp="trend-chart"],
4600
+ [data-terp="bar-chart"],
4601
+ [data-terp="proportion-bar"] {
4602
+ display: flex;
4603
+ flex-direction: column;
4604
+ gap: var(--space-3);
4605
+ min-width: 0;
4606
+ margin: 0;
4607
+ padding: var(--space-4);
4608
+ box-sizing: border-box;
4609
+ border: 1px solid var(--color-neutral-200);
4610
+ border-radius: var(--radius-lg);
4611
+ background: var(--color-bg-surface);
4612
+ box-shadow: var(--shadow-sm);
4613
+ color: var(--color-fg-default);
4614
+ }
4615
+ [data-terp="chart-caption"] {
4616
+ color: var(--color-fg-default);
4617
+ font-size: var(--font-size-sm);
4618
+ font-weight: var(--font-weight-semibold);
4619
+ line-height: var(--font-line-height-snug);
4620
+ }
4621
+ /* The plot beside its value axis, and the period labels under the plot only. The axis takes
4622
+ three ticks in two equal steps, so space-between puts each label on its gridline with no
4623
+ position of its own; the plot's height is the axis's height. */
4624
+ [data-terp="chart-body"] {
4625
+ display: grid;
4626
+ grid-template-columns: auto minmax(0, 1fr);
4627
+ column-gap: var(--space-2);
4628
+ row-gap: var(--space-1);
4629
+ }
4630
+ [data-terp="chart-axis"] {
4631
+ display: flex;
4632
+ flex-direction: column;
4633
+ justify-content: space-between;
4634
+ block-size: 10rem;
4635
+ color: var(--color-fg-muted);
4636
+ font-size: var(--font-size-xs);
4637
+ line-height: var(--font-line-height-tight);
4638
+ text-align: end;
4639
+ font-variant-numeric: tabular-nums;
4640
+ }
4641
+ /* The top and foot labels straddle their gridlines rather than hang from the one and stand on
4642
+ the other: half a line out of the axis's box each, so all three sit centred on their lines. */
4643
+ [data-terp="chart-axis"] > :first-child {
4644
+ margin-block-start: -0.6em;
4645
+ }
4646
+ [data-terp="chart-axis"] > :last-child {
4647
+ margin-block-end: -0.6em;
4648
+ }
4649
+ [data-terp="chart-plot"] {
4650
+ display: block;
4651
+ inline-size: 100%;
4652
+ block-size: 10rem;
4653
+ overflow: visible;
4654
+ }
4655
+ [data-terp="chart-gridline"] {
4656
+ stroke: var(--color-neutral-200);
4657
+ stroke-width: 1;
4658
+ vector-effect: non-scaling-stroke;
4659
+ }
4660
+ [data-terp="trend-chart-line"] {
4661
+ fill: none;
4662
+ stroke: var(--color-chart-1);
4663
+ stroke-width: 2;
4664
+ stroke-linecap: round;
4665
+ stroke-linejoin: round;
4666
+ vector-effect: non-scaling-stroke;
4667
+ }
4668
+ [data-terp="trend-chart-area"] {
4669
+ fill: var(--color-chart-1);
4670
+ fill-opacity: 0.15;
4671
+ }
4672
+ [data-terp="trend-chart-column"] {
4673
+ fill: var(--color-chart-1);
4674
+ }
4675
+ /* The earlier period: the subtle ink, dashed, behind the series, so the two read apart by
4676
+ weight and by pattern as well as by colour. */
4677
+ [data-terp="trend-chart-comparison"] {
4678
+ fill: none;
4679
+ stroke: var(--color-fg-subtle);
4680
+ stroke-width: 1.5;
4681
+ stroke-dasharray: 4 3;
4682
+ vector-effect: non-scaling-stroke;
4683
+ }
4684
+ /* A point with no neighbour -- a series of one, or a value between two gaps -- is a dot: a line
4685
+ needs two points, and a polyline of one is never stroked. It is a zero-length stroke with a
4686
+ round cap, so the plot's stretch cannot turn it into an ellipse the way a circle would. */
4687
+ [data-terp="trend-chart-dot"] {
4688
+ fill: none;
4689
+ stroke: var(--color-chart-1);
4690
+ stroke-width: 6;
4691
+ stroke-linecap: round;
4692
+ vector-effect: non-scaling-stroke;
4693
+ }
4694
+ [data-terp="trend-chart-dot"][data-series="comparison"] {
4695
+ stroke: var(--color-fg-subtle);
4696
+ stroke-width: 4;
4697
+ }
4698
+ /* The period labels: a line's first, middle and last at the ends and the centre; a column
4699
+ chart's under each column in a slot of its own, the ones not printed still holding their
4700
+ place, so a label sits under its column. */
4701
+ [data-terp="chart-labels"] {
4702
+ grid-column: 2;
4703
+ display: flex;
4704
+ justify-content: space-between;
4705
+ gap: var(--space-2);
4706
+ min-width: 0;
4707
+ color: var(--color-fg-muted);
4708
+ font-size: var(--font-size-xs);
4709
+ }
4710
+ /* No gap between a column chart's label slots: each is exactly its column's band, or the
4711
+ labels drift off their columns by the gaps they add up. */
4712
+ [data-terp="chart-labels"][data-mark="columns"] {
4713
+ gap: 0;
4714
+ }
4715
+ /* A printed label is centred on its column and may be wider than its band: it overflows to
4716
+ both sides, over the neighbours that print nothing, rather than being cut to the band. */
4717
+ [data-terp="chart-labels"][data-mark="columns"] > span {
4718
+ flex: 1 1 0;
4719
+ min-width: 0;
4720
+ display: flex;
4721
+ justify-content: center;
4722
+ white-space: nowrap;
4723
+ }
4724
+ /* A single point stands in the middle of the plot, and so does its label. */
4725
+ [data-terp="chart-labels"] > :only-child {
4726
+ margin-inline: auto;
4727
+ }
4728
+ [data-terp="chart-labels"] > [data-quiet="true"] {
4729
+ visibility: hidden;
4730
+ }
4731
+ /* The legend: a word for every colour on the chart, and a swatch drawn the way its mark is. */
4732
+ [data-terp="chart-legend"] {
4733
+ display: flex;
4734
+ flex-wrap: wrap;
4735
+ gap: var(--space-1) var(--space-4);
4736
+ margin: 0;
4737
+ padding: 0;
4738
+ list-style: none;
4739
+ color: var(--color-fg-muted);
4740
+ font-size: var(--font-size-xs);
4741
+ }
4742
+ [data-terp="chart-legend-item"] {
4743
+ display: inline-flex;
4744
+ align-items: center;
4745
+ gap: var(--space-2);
4746
+ }
4747
+ [data-terp="chart-legend-value"] {
4748
+ color: var(--color-fg-default);
4749
+ font-variant-numeric: tabular-nums;
4750
+ }
4751
+ [data-terp="chart-swatch"] {
4752
+ flex: none;
4753
+ inline-size: 0.75rem;
4754
+ block-size: 0.75rem;
4755
+ border-radius: var(--radius-sm);
4756
+ background: var(--color-chart-1);
4757
+ }
4758
+ /* A line's swatch is a line, as a comparison's is a dashed one. */
4759
+ [data-terp="trend-chart"][data-mark="line"] [data-terp="chart-swatch"][data-series="main"] {
4760
+ block-size: 0;
4761
+ border-radius: 0;
4762
+ border-block-start: 2px solid var(--color-chart-1);
4763
+ background: none;
4764
+ }
4765
+ [data-terp="chart-swatch"][data-series="comparison"] {
4766
+ block-size: 0;
4767
+ border-radius: 0;
4768
+ border-block-start: 2px dashed var(--color-fg-subtle);
4769
+ background: none;
4770
+ }
4771
+ /* The chart ramp, for a part or a swatch with no tone of its own, in order. */
4772
+ [data-terp="chart-swatch"][data-series="2"],
4773
+ [data-terp="proportion-bar-part"][data-series="2"] { background: var(--color-chart-2); fill: var(--color-chart-2); }
4774
+ [data-terp="chart-swatch"][data-series="3"],
4775
+ [data-terp="proportion-bar-part"][data-series="3"] { background: var(--color-chart-3); fill: var(--color-chart-3); }
4776
+ [data-terp="chart-swatch"][data-series="4"],
4777
+ [data-terp="proportion-bar-part"][data-series="4"] { background: var(--color-chart-4); fill: var(--color-chart-4); }
4778
+ [data-terp="chart-swatch"][data-series="5"],
4779
+ [data-terp="proportion-bar-part"][data-series="5"] { background: var(--color-chart-5); fill: var(--color-chart-5); }
4780
+ [data-terp="proportion-bar-part"] { fill: var(--color-chart-1); }
4781
+ /* A part that is a state takes its state's tone, the status dots' colours, declared the same. */
4782
+ [data-terp="chart-swatch"][data-tone="neutral"],
4783
+ [data-terp="proportion-bar-part"][data-tone="neutral"],
4784
+ [data-terp="status-history-cell"][data-tone="neutral"] { background: var(--color-fg-subtle); fill: var(--color-fg-subtle); }
4785
+ [data-terp="chart-swatch"][data-tone="info"],
4786
+ [data-terp="proportion-bar-part"][data-tone="info"],
4787
+ [data-terp="status-history-cell"][data-tone="info"] { background: var(--color-status-info); fill: var(--color-status-info); }
4788
+ [data-terp="chart-swatch"][data-tone="success"],
4789
+ [data-terp="proportion-bar-part"][data-tone="success"],
4790
+ [data-terp="status-history-cell"][data-tone="success"] { background: var(--color-status-success); fill: var(--color-status-success); }
4791
+ [data-terp="chart-swatch"][data-tone="warning"],
4792
+ [data-terp="proportion-bar-part"][data-tone="warning"],
4793
+ [data-terp="status-history-cell"][data-tone="warning"] { background: var(--color-status-warning); fill: var(--color-status-warning); }
4794
+ [data-terp="chart-swatch"][data-tone="danger"],
4795
+ [data-terp="proportion-bar-part"][data-tone="danger"],
4796
+ [data-terp="status-history-cell"][data-tone="danger"] { background: var(--color-status-danger); fill: var(--color-status-danger); }
4797
+ /* The proportion bar: one bar the width of its tile, its parts parted by a hairline of the
4798
+ surface so two near colours still read as two. */
4799
+ [data-terp="proportion-bar-track"] {
4800
+ display: block;
4801
+ inline-size: 100%;
4802
+ block-size: 0.75rem;
4803
+ border-radius: var(--radius-full);
4804
+ overflow: hidden;
4805
+ }
4806
+ [data-terp="proportion-bar-gap"] {
4807
+ stroke: var(--color-bg-surface);
4808
+ stroke-width: 2;
4809
+ vector-effect: non-scaling-stroke;
4810
+ }
4811
+ /* The bar chart is a table: a category's name, its bar and its value, one row each, the bars
4812
+ scaled to the largest. The name column takes what its longest name needs up to a third of
4813
+ the tile; the bar takes the rest. A table cell's max-inline-size is ignored in an automatic
4814
+ table layout, so the cap is on the name inside the cell, in units of the chart's own width:
4815
+ the chart is a container for exactly that. */
4816
+ [data-terp="bar-chart"] {
4817
+ container-type: inline-size;
4818
+ }
4819
+ [data-terp="bar-chart-table"] {
4820
+ inline-size: 100%;
4821
+ border-collapse: collapse;
4822
+ font-size: var(--font-size-sm);
4823
+ }
4824
+ [data-terp="bar-chart-label"] {
4825
+ inline-size: 1%;
4826
+ padding: var(--space-1) var(--space-3) var(--space-1) 0;
4827
+ color: var(--color-fg-default);
4828
+ font-weight: var(--font-weight-normal);
4829
+ text-align: start;
4830
+ }
4831
+ [data-terp="bar-chart-name"] {
4832
+ display: block;
4833
+ max-inline-size: 33cqi;
4834
+ overflow: hidden;
4835
+ text-overflow: ellipsis;
4836
+ white-space: nowrap;
4837
+ }
4838
+ [data-terp="bar-chart-bar"] {
4839
+ padding: var(--space-1) 0;
4840
+ }
4841
+ [data-terp="bar-chart-bar"] > svg {
4842
+ display: block;
4843
+ inline-size: 100%;
4844
+ block-size: 0.875rem;
4845
+ }
4846
+ [data-terp="bar-chart-mark"] {
4847
+ fill: var(--color-chart-1);
4848
+ }
4849
+ [data-terp="bar-chart-value"] {
4850
+ inline-size: 1%;
4851
+ padding: var(--space-1) 0 var(--space-1) var(--space-3);
4852
+ color: var(--color-fg-default);
4853
+ text-align: end;
4854
+ white-space: nowrap;
4855
+ font-variant-numeric: tabular-nums;
4856
+ }
4857
+ /* A status history: one small cell per run, oldest first, and the latest run's ending in words
4858
+ beside them. Inline, so it sits in a sentence, a collection's cell or a summary band. */
4859
+ [data-terp="status-history"] {
4860
+ display: inline-flex;
4861
+ align-items: center;
4862
+ gap: var(--space-2);
4863
+ max-inline-size: 100%;
4864
+ }
4865
+ [data-terp="status-history-cells"] {
4866
+ display: inline-flex;
4867
+ gap: 2px;
4868
+ }
4869
+ [data-terp="status-history-cell"] {
4870
+ inline-size: 0.5rem;
4871
+ block-size: 0.875rem;
4872
+ border-radius: 2px;
4873
+ }
4874
+ [data-terp="status-history-latest"] {
4875
+ color: var(--color-fg-muted);
4876
+ font-size: var(--font-size-xs);
4877
+ white-space: nowrap;
4878
+ }
4879
+
4880
+ /* Timeline (ADR 0169 §5) ----------------------------------------------------- */
4881
+ /* Events in order on a line that joins them: a marker per event, its words beside it, and the
4882
+ line drawn by each event but the last, from under its marker to its foot, so it ends at the
4883
+ last marker rather than running past it. Unframed, so it reads in a card or on the page. The
4884
+ marker takes the event's tone where it has one; the label is always its word. */
4885
+ [data-terp="timeline"] {
4886
+ display: grid;
4887
+ margin: 0;
4888
+ padding: 0;
4889
+ list-style: none;
4890
+ }
4891
+ [data-terp="timeline-event"] {
4892
+ position: relative;
4893
+ display: grid;
4894
+ grid-template-columns: 1rem minmax(0, 1fr);
4895
+ column-gap: var(--space-3);
4896
+ row-gap: 2px;
4897
+ padding-block-end: var(--space-4);
4898
+ }
4899
+ [data-terp="timeline-event"]:last-child {
4900
+ padding-block-end: 0;
4901
+ }
4902
+ [data-terp="timeline-event"]:not(:last-child)::before {
4903
+ content: "";
4904
+ position: absolute;
4905
+ inset-block: 1.1rem 0;
4906
+ inset-inline-start: calc(0.5rem - 1px);
4907
+ border-inline-start: 2px solid var(--color-neutral-200);
4908
+ }
4909
+ [data-terp="timeline-marker"] {
4910
+ grid-row: 1 / span 3;
4911
+ justify-self: center;
4912
+ margin-block-start: 0.3rem;
4913
+ inline-size: 0.625rem;
4914
+ block-size: 0.625rem;
4915
+ border-radius: var(--radius-full);
4916
+ background: var(--color-fg-subtle);
4917
+ }
4918
+ [data-terp="timeline-event"][data-tone="info"] > [data-terp="timeline-marker"] { background: var(--color-status-info); }
4919
+ [data-terp="timeline-event"][data-tone="success"] > [data-terp="timeline-marker"] { background: var(--color-status-success); }
4920
+ [data-terp="timeline-event"][data-tone="warning"] > [data-terp="timeline-marker"] { background: var(--color-status-warning); }
4921
+ [data-terp="timeline-event"][data-tone="danger"] > [data-terp="timeline-marker"] { background: var(--color-status-danger); }
4922
+ [data-terp="timeline-label"] {
4923
+ grid-column: 2;
4924
+ color: var(--color-fg-default);
4925
+ font-size: var(--font-size-sm);
4926
+ font-weight: var(--font-weight-medium);
4927
+ }
4928
+ [data-terp="timeline-when"] {
4929
+ grid-column: 2;
4930
+ color: var(--color-fg-muted);
4931
+ font-size: var(--font-size-xs);
4932
+ font-variant-numeric: tabular-nums;
4933
+ }
4934
+ [data-terp="timeline-detail"] {
4935
+ grid-column: 2;
4936
+ color: var(--color-fg-muted);
4937
+ font-size: var(--font-size-sm);
4938
+ }
4939
+
4940
+ /* The prominent collection (ADR 0169 §5) ------------------------------------- */
4941
+ /* A collection's own heading, with its count as part of its name. The card title's step and
4942
+ weight, so a titled collection and a titled card are one level of the page; the count is a
4943
+ neutral pill -- muted ink on the neutral wash, a declared pairing -- in tabular figures so a
4944
+ count that changes does not move the title. */
4945
+ [data-terp="dataview-title"] {
4946
+ display: flex;
4947
+ flex-wrap: wrap;
4948
+ align-items: center;
4949
+ gap: var(--space-2);
4950
+ margin: 0;
4951
+ color: var(--color-fg-default);
4952
+ font-size: var(--font-size-lg);
4953
+ font-weight: var(--font-weight-semibold);
4954
+ line-height: var(--font-line-height-snug);
4955
+ }
4956
+ [data-terp="dataview-count"] {
4957
+ padding: 0 var(--space-2);
4958
+ border-radius: var(--radius-full);
4959
+ background: var(--color-neutral-100);
4960
+ color: var(--color-fg-muted);
4961
+ font-size: var(--font-size-xs);
4962
+ font-weight: var(--font-weight-semibold);
4963
+ line-height: var(--font-line-height-base);
4964
+ font-variant-numeric: tabular-nums;
4965
+ }
4966
+ /* A status column's quiet form: a dot before the cell's text, which is the word the dot stands
4967
+ for. Each tone's dot holds 3:1 against the surface the rows are read on, declared in
4968
+ token-pairs.json; neutral is the subtle ink, whose text pairing on the surface already holds
4969
+ more than that. */
4970
+ [data-terp="dataview-status"] {
4971
+ display: inline-flex;
4972
+ align-items: center;
4973
+ gap: var(--space-2);
4974
+ }
4975
+ [data-terp="dataview-status-dot"] {
4976
+ flex: none;
4977
+ width: 0.5rem;
4978
+ height: 0.5rem;
4979
+ border-radius: var(--radius-full);
4980
+ background: var(--color-fg-subtle);
4981
+ }
4982
+ [data-terp="dataview-status-dot"][data-tone="info"] {
4983
+ background: var(--color-status-info);
4984
+ }
4985
+ [data-terp="dataview-status-dot"][data-tone="success"] {
4986
+ background: var(--color-status-success);
4987
+ }
4988
+ [data-terp="dataview-status-dot"][data-tone="warning"] {
4989
+ background: var(--color-status-warning);
4990
+ }
4991
+ [data-terp="dataview-status-dot"][data-tone="danger"] {
4992
+ background: var(--color-status-danger);
4993
+ }
4994
+
4995
+ /* Figures (ADR 0169) --------------------------------------------------------- */
4996
+ /* One figure is a tile on --color-bg-surface, the rung where data is read (ADR 0169 §3): the
4997
+ surface, its hairline and its small shadow, as a boxed card one rung brighter. The value is
4998
+ the largest type on the tile and the label names it, which is the order a Card with a title
4999
+ over a line of text had backwards.
5000
+
5001
+ A column whose items keep their own widths (align-items: flex-start), so the delta's pill
5002
+ and the target's meter are as wide as what they say rather than as wide as the tile; the
5003
+ sparkline asks for the full width itself. */
5004
+ [data-terp="stat"] {
5005
+ display: flex;
5006
+ flex-direction: column;
5007
+ align-items: flex-start;
5008
+ gap: var(--space-1);
5009
+ min-width: 0;
5010
+ padding: var(--space-4);
5011
+ box-sizing: border-box;
5012
+ border: 1px solid var(--color-neutral-200);
5013
+ border-radius: var(--radius-lg);
5014
+ background: var(--color-bg-surface);
5015
+ box-shadow: var(--shadow-sm);
5016
+ color: var(--color-fg-default);
5017
+ }
5018
+ [data-terp="stat-label"] {
5019
+ color: var(--color-fg-muted);
5020
+ font-size: var(--font-size-sm);
5021
+ font-weight: var(--font-weight-medium);
5022
+ line-height: var(--font-line-height-snug);
5023
+ }
5024
+ /* Tabular figures, so a value that ticks does not change width; anywhere-wrapping, so a long
5025
+ figure in a narrow track breaks rather than widening it. */
5026
+ [data-terp="stat-value"] {
5027
+ max-inline-size: 100%;
5028
+ font-size: var(--font-size-2xl);
5029
+ font-weight: var(--font-weight-semibold);
5030
+ line-height: var(--font-line-height-tight);
5031
+ letter-spacing: var(--font-letter-spacing-tight);
5032
+ font-variant-numeric: tabular-nums;
5033
+ overflow-wrap: anywhere;
5034
+ }
5035
+ [data-terp="stat-delta"] {
5036
+ display: flex;
5037
+ flex-wrap: wrap;
5038
+ align-items: center;
5039
+ gap: var(--space-1) var(--space-2);
5040
+ color: var(--color-fg-muted);
5041
+ font-size: var(--font-size-xs);
5042
+ line-height: var(--font-line-height-snug);
5043
+ }
5044
+ /* The change is a pill with its own soft fill, the badge's construction, and that is what
5045
+ makes its contrast its own: the success ink measures under AA directly on the summary band's
5046
+ tint in the midday theme, and on its soft fill it is the success badge, declared and gated
5047
+ wherever a band or a card puts it. Neutral is muted ink on the neutral wash, a declared
5048
+ pairing too. */
5049
+ [data-terp="stat-change"] {
5050
+ display: inline-flex;
5051
+ align-items: center;
5052
+ gap: var(--space-1);
5053
+ padding: 1px var(--space-2);
5054
+ border: 1px solid;
5055
+ border-radius: var(--radius-full);
5056
+ font-weight: var(--font-weight-semibold);
5057
+ font-variant-numeric: tabular-nums;
5058
+ white-space: nowrap;
5059
+ }
5060
+ [data-terp="stat-change"][data-sentiment="positive"] {
5061
+ color: var(--color-status-success);
5062
+ background: var(--color-status-success-soft);
5063
+ border-color: var(--color-status-success-soft);
5064
+ }
5065
+ [data-terp="stat-change"][data-sentiment="negative"] {
5066
+ color: var(--color-status-danger);
5067
+ background: var(--color-status-danger-soft);
5068
+ border-color: var(--color-status-danger-soft);
5069
+ }
5070
+ [data-terp="stat-change"][data-sentiment="neutral"] {
5071
+ color: var(--color-fg-muted);
5072
+ background: var(--color-neutral-100);
5073
+ border-color: var(--color-neutral-100);
5074
+ }
5075
+ [data-terp="stat-arrow"] {
5076
+ flex: none;
5077
+ width: 0.625rem;
5078
+ height: 0.625rem;
5079
+ fill: currentColor;
5080
+ }
5081
+ /* The sparkline: the full width of its tile at a fixed height, so sparklines side by side
5082
+ share a scale of height. The SVG stretches to its box, and non-scaling-stroke keeps the
5083
+ line at its width through the stretch. The accent is a declared pairing on every ground a
5084
+ figure stands on -- text pairings on the surface, a container and the summary band, and the
5085
+ focus ring's non-text pairing on the canvas -- so the line clears the 3:1 a graphic needs
5086
+ everywhere. The wash under it is reinforcement only. */
5087
+ [data-terp="stat-trend"] {
5088
+ display: block;
5089
+ align-self: stretch;
5090
+ margin-block-start: var(--space-1);
5091
+ }
5092
+ [data-terp="stat-trend-chart"] {
5093
+ display: block;
5094
+ width: 100%;
5095
+ height: 2rem;
5096
+ overflow: visible;
5097
+ }
5098
+ [data-terp="stat-trend-line"] {
5099
+ fill: none;
5100
+ stroke: var(--color-fg-accent);
5101
+ stroke-width: 1.5;
5102
+ stroke-linecap: round;
5103
+ stroke-linejoin: round;
5104
+ vector-effect: non-scaling-stroke;
5105
+ }
5106
+ [data-terp="stat-trend-area"] {
5107
+ fill: var(--color-fg-accent);
5108
+ fill-opacity: 0.12;
5109
+ stroke: none;
5110
+ }
5111
+ /* The target's meter prints its share at the tile's small step, beside the caption's, rather
5112
+ than at the body size it would inherit from a tile that sets none. */
5113
+ [data-terp="stat"] > [data-terp="meter"] {
5114
+ margin-block-start: var(--space-1);
5115
+ font-size: var(--font-size-sm);
5116
+ }
5117
+ [data-terp="stat-caption"] {
5118
+ color: var(--color-fg-muted);
5119
+ font-size: var(--font-size-xs);
5120
+ line-height: var(--font-line-height-snug);
5121
+ }
5122
+ /* The headline: the one figure on a page filled with the brand colour (ADR 0169 §4), every
5123
+ word on it in the brand's contrast ink -- the primary button's pairing. The delta keeps its
5124
+ pill, which carries its own pairing onto any fill. One shadow step up, so it also stands
5125
+ off the page. */
5126
+ [data-terp="stat"][data-headline] {
5127
+ border-color: var(--color-brand-primary);
5128
+ background: var(--color-brand-primary);
5129
+ box-shadow: var(--shadow-md);
5130
+ color: var(--color-brand-primary-contrast);
5131
+ }
5132
+ [data-terp="stat"][data-headline] [data-terp="stat-label"],
5133
+ [data-terp="stat"][data-headline] [data-terp="stat-delta"],
5134
+ [data-terp="stat"][data-headline] [data-terp="stat-caption"] {
5135
+ color: var(--color-brand-primary-contrast);
5136
+ }
5137
+ [data-terp="stat"][data-headline] [data-terp="stat-trend-line"] {
5138
+ stroke: var(--color-brand-primary-contrast);
5139
+ }
5140
+ [data-terp="stat"][data-headline] [data-terp="stat-trend-area"] {
5141
+ fill: var(--color-brand-primary-contrast);
5142
+ }
5143
+ /* A group of figures: one ruled row, unframed wherever it is placed. As many figures to a line
5144
+ as fit -- two on a phone -- each a cell padded half a gap either side, and the group reaching
5145
+ out by that half on both sides so the first figure's text starts on the line the content
5146
+ around it does.
5147
+
5148
+ The rule before a figure is a 1px shadow outside its cell's start edge. For a figure that
5149
+ starts a line that edge is the group's own, where overflow: hidden clips the shadow, so no
5150
+ figure at a line's start carries a rule however the row wraps. The clip sits half a gap
5151
+ outside the text rather than at it, which is the point of the padding: a focus ring on
5152
+ something inside a figure has room to draw, where clipping at the text's edge cut its side
5153
+ off -- the first version, rules drawn in the column gap, did exactly that.
5154
+
5155
+ 9.5rem is 8rem of figure and the 1.5rem of its padding. */
5156
+ [data-terp="stat-group"] {
5157
+ display: grid;
5158
+ grid-template-columns: repeat(auto-fit, minmax(min(9.5rem, 100%), 1fr));
5159
+ row-gap: var(--space-4);
5160
+ min-width: 0;
5161
+ margin-inline: calc(-1 * var(--space-3));
5162
+ overflow: hidden;
5163
+ }
5164
+ /* Every cell takes the block padding the headline's fill needs, so a row with a headline in it
5165
+ keeps its labels on one line: padded alone, the headline's label sat 12px under the rest. */
5166
+ [data-terp="stat-group"] > [data-terp="stat"] {
5167
+ padding: var(--space-3);
5168
+ border: 0;
5169
+ border-radius: 0;
5170
+ background: none;
5171
+ box-shadow: -1px 0 0 0 var(--color-neutral-200);
5172
+ }
5173
+ /* The headline keeps its fill in a group, inset in its own padding and held off the figures
5174
+ on either side by half a gap, so it reads as the one filled cell of the row. The group
5175
+ reaches out by half a gap so a focus ring has room; the fill must not reach out with it, or
5176
+ a headline that starts a line pokes past the edge every other block on the page keeps --
5177
+ with the margin, its fill starts where the band's content does. The fill is its own
5178
+ division, so no rule is drawn on either side of it. */
5179
+ [data-terp="stat-group"] > [data-terp="stat"][data-headline] {
5180
+ margin-inline: var(--space-3);
5181
+ padding: var(--space-3) var(--space-4);
5182
+ border-radius: var(--radius-lg);
5183
+ background: var(--color-brand-primary);
5184
+ box-shadow: none;
5185
+ }
5186
+ [data-terp="stat-group"] > [data-terp="stat"][data-headline] + [data-terp="stat"] {
5187
+ box-shadow: none;
5188
+ }
5189
+ /* A lone figure in a boxed card: the card is its frame, so the figure takes no tile of its own
5190
+ -- a tile inside a box is a frame inside a frame. A group's cells keep theirs, and the
5191
+ headline keeps its fill wherever it is. A plain card has no frame to lend, so a figure in one
5192
+ keeps its tile. */
5193
+ [data-terp="card"]:not([data-variant]) [data-terp="stat"]:not([data-headline], [data-terp="stat-group"] > *) {
5194
+ padding: 0;
5195
+ border: 0;
5196
+ border-radius: 0;
5197
+ background: none;
5198
+ box-shadow: none;
5199
+ }
5200
+ /* In a hub card's stat row the card is the frame, so an ordinary figure has none of its own
5201
+ there. The headline keeps its fill wherever it is. */
5202
+ [data-terp="hubcard-stat"] > [data-terp="stat"]:not([data-headline]) {
5203
+ padding: 0;
5204
+ border: 0;
5205
+ border-radius: 0;
5206
+ background: none;
5207
+ box-shadow: none;
5208
+ }
5209
+
4311
5210
  /* Tooltips ----------------------------------------------------------------- */
4312
5211
  /* No display declaration here on purpose: the panel is hidden with the hidden
4313
5212
  attribute, and any author display would beat the UA's [hidden] rule and
4314
- leave the tooltip permanently visible. */
5213
+ leave the tooltip permanently visible.
5214
+
5215
+ The bubble is PORTALLED -- to the body, or into the dialog its trigger sits in, since a
5216
+ modal dialog is in the top layer and nothing outside it paints above it -- and placed with
5217
+ position: fixed, the way [data-terp="popover-panel"] already was. It used to be an
5218
+ absolutely positioned child of
5219
+ its anchor, and that failed three ways an app reported together:
5220
+ - An ancestor with overflow other than visible clipped it, whatever its z-index. A DataView
5221
+ cell is inside the table's horizontal scroller, so a tooltip there was cut off at the
5222
+ table's edge instead of drawing over it.
5223
+ - Its containing block was the anchor, so its available width was the TRIGGER's. A long
5224
+ message on a button wrapped to the button's width -- a column of words one button wide --
5225
+ and grew upward from there.
5226
+ - It always opened above and started at the trigger's left edge, so a trigger near the top
5227
+ or the right edge of the window put the message off screen.
5228
+ The component now measures the trigger and the bubble, opens above or flips below, and
5229
+ clamps the bubble inside the viewport; only those coordinates and the one-frame
5230
+ visibility before them are inline, the measured part ADR 0094 allows. inline-size:
5231
+ max-content is what makes the measured width the MESSAGE's rather than whatever room a
5232
+ containing block happens to leave, so where the bubble lands cannot change what it measures.
5233
+
5234
+ The anchor keeps its inline-flex and loses its position: relative, which existed only to
5235
+ be the bubble's containing block. */
4315
5236
  [data-terp="tooltip-anchor"] {
4316
- position: relative;
4317
5237
  display: inline-flex;
4318
5238
  }
4319
5239
  [data-terp="tooltip"] {
4320
- position: absolute;
5240
+ position: fixed;
4321
5241
  z-index: var(--z-index-tooltip);
4322
- inset-block-end: calc(100% + var(--space-1));
4323
- inset-inline-start: 0;
5242
+ inline-size: max-content;
4324
5243
  max-inline-size: min(18rem, calc(100vw - 2 * var(--space-4)));
4325
5244
  padding: var(--space-1) var(--space-2);
4326
5245
  border-radius: var(--radius-sm);
4327
5246
  color: var(--color-neutral-0);
4328
5247
  background: var(--color-neutral-900);
5248
+ /* Declared, not inherited, now that the bubble is portalled: its parent is the body, which
5249
+ no Terp rule gives a typeface, so it rendered in the browser's default serif. The
5250
+ popover panel declares its family for the same reason. */
5251
+ font-family: var(--font-family-sans);
4329
5252
  font-size: var(--font-size-xs);
4330
5253
  font-weight: var(--font-weight-medium);
4331
5254
  line-height: 1.4;
@@ -4351,7 +5274,7 @@ button[data-terp="input"][data-placeholder="true"] {
4351
5274
  padding: var(--space-1) var(--space-2);
4352
5275
  background: transparent;
4353
5276
  color: var(--color-neutral-700);
4354
- border: 1px solid var(--color-neutral-300);
5277
+ border: 1px solid var(--color-border-strong);
4355
5278
  border-radius: var(--radius-md);
4356
5279
  cursor: pointer;
4357
5280
  font-family: var(--font-family-sans);
@@ -4422,7 +5345,7 @@ button[data-terp="input"][data-placeholder="true"] {
4422
5345
  }
4423
5346
  [data-terp="theme-toggle-label"],
4424
5347
  [data-terp="language-switcher-label"] {
4425
- color: var(--color-neutral-600);
5348
+ color: var(--color-fg-muted);
4426
5349
  }
4427
5350
 
4428
5351
  /* Account menu -------------------------------------------------------------- */
@@ -4472,7 +5395,7 @@ button[data-terp="input"][data-placeholder="true"] {
4472
5395
  outside this selector by construction) and the panel keeps the neutral. The sheet already
4473
5396
  argues this exact split for the drawer close button. */
4474
5397
  [data-terp="user-menu-role"] {
4475
- color: var(--color-neutral-600);
5398
+ color: var(--color-fg-muted);
4476
5399
  }
4477
5400
  [data-terp="user-menu"] [data-terp="user-menu-role"] {
4478
5401
  color: var(--color-sidebar-muted);
@@ -4662,7 +5585,7 @@ button[data-terp="input"][data-placeholder="true"] {
4662
5585
  color: var(--color-neutral-900);
4663
5586
  }
4664
5587
  [data-terp="dialog-description"] {
4665
- color: var(--color-neutral-600);
5588
+ color: var(--color-fg-muted);
4666
5589
  font-size: var(--font-size-sm);
4667
5590
  line-height: 1.5;
4668
5591
  }
@@ -4731,10 +5654,10 @@ button[data-terp="input"][data-placeholder="true"] {
4731
5654
  on whatever ancestor happens to establish a context looks like. It reads
4732
5655
  --z-index-tooltip (70) now, the level published for it.
4733
5656
 
4734
- Still true, and NOT fixed by this: an ancestor with overflow: hidden clips an
4735
- absolutely positioned tooltip whatever its level. The fix for that is the one
4736
- [data-terp="popover-panel"] already uses — position: fixed with measured
4737
- coordinates — and it is a change to the component rather than to this sheet. */
5657
+ That left one failure no level could fix: an ancestor with overflow other than visible
5658
+ clipped the absolutely positioned bubble whatever its z-index. It is fixed the way this
5659
+ panel was, by the component rather than the sheet -- the tooltip is portalled and placed
5660
+ with position: fixed from measured coordinates now (see its own rule). */
4738
5661
  [data-terp="popover-panel"] {
4739
5662
  position: fixed;
4740
5663
  z-index: var(--z-index-popover);
@@ -4821,7 +5744,7 @@ button[data-terp="input"][data-placeholder="true"] {
4821
5744
  }
4822
5745
  [data-terp="button"][data-variant="secondary"]:hover:not(:disabled) {
4823
5746
  background: var(--color-neutral-100);
4824
- border-color: var(--color-neutral-300);
5747
+ border-color: var(--color-border-strong);
4825
5748
  }
4826
5749
  [data-terp="button"][data-variant="ghost"]:hover:not(:disabled) {
4827
5750
  background: var(--color-neutral-100);
@@ -4932,7 +5855,7 @@ button[data-terp="input"][data-placeholder="true"] {
4932
5855
  user is pointing at the thing they need to fix. Narrowing the aggressor rather than adding a
4933
5856
  competing [aria-invalid="true"]:hover rule is this sheet's convention. */
4934
5857
  [data-terp="input"]:hover:not(:disabled):not(:focus):not([aria-invalid="true"]) {
4935
- border-color: var(--color-neutral-400);
5858
+ border-color: var(--color-neutral-500);
4936
5859
  }
4937
5860
  [data-terp="input"]:focus,
4938
5861
  [data-terp="input"]:focus-visible {
@@ -5248,6 +6171,23 @@ button[data-terp="input"][data-placeholder="true"] {
5248
6171
  text-decoration: underline;
5249
6172
  }
5250
6173
 
6174
+ /* Sequence links ----------------------------------------------------------- */
6175
+ /* The ghost button's hover, for links that read as one (see the bar's rule in terp.base). */
6176
+ [data-terp="page-sequence-previous"] > a:hover,
6177
+ [data-terp="page-sequence-next"] > a:hover {
6178
+ background: var(--color-neutral-100);
6179
+ color: var(--color-neutral-900);
6180
+ }
6181
+ /* The shared ring, restated for an anchor that carries no marker of its own: the router renders
6182
+ it, so [data-terp]:focus-visible cannot reach it, and without this a keyboard user stepping
6183
+ through a series would get whatever ring the browser draws by default. */
6184
+ [data-terp="page-sequence-previous"] > a:focus-visible,
6185
+ [data-terp="page-sequence-next"] > a:focus-visible {
6186
+ outline: 2px solid var(--color-fg-accent);
6187
+ outline-offset: 1px;
6188
+ box-shadow: 0 0 0 3px var(--color-focus-ring);
6189
+ }
6190
+
5251
6191
  /* The pager's disabled ink, scoped rather than added to the shared iconbutton
5252
6192
  rule above: of the seventeen sites wearing that marker only six can be disabled at
5253
6193
  all — these four and the view-options panel's two reorder arrows, which carry