cornfield 0.47.0 → 0.49.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 (65) hide show
  1. package/core/contrast.js +6 -6
  2. package/core/strings.js +14 -0
  3. package/explorer/check.js +7 -227
  4. package/explorer/connection.js +3 -3
  5. package/explorer/css/account.css +46 -0
  6. package/explorer/css/base.css +159 -0
  7. package/explorer/css/changes.css +160 -0
  8. package/explorer/css/decision.css +68 -0
  9. package/explorer/css/dialogs.css +50 -0
  10. package/explorer/css/header.css +75 -0
  11. package/explorer/css/layers.css +92 -0
  12. package/explorer/css/live.css +48 -0
  13. package/explorer/css/map.css +43 -0
  14. package/explorer/css/node-panel.css +188 -0
  15. package/explorer/css/page.css +83 -0
  16. package/explorer/css/proposal.css +151 -0
  17. package/explorer/css/search.css +84 -0
  18. package/explorer/css/sheets.css +134 -0
  19. package/explorer/css/whatif.css +55 -0
  20. package/explorer/css/work.css +288 -0
  21. package/explorer/engine/checks.js +252 -0
  22. package/explorer/engine/connection.js +36 -0
  23. package/explorer/engine/layers.js +1 -0
  24. package/explorer/engine/map-style.js +2 -2
  25. package/explorer/engine/player.js +489 -0
  26. package/explorer/engine/proposal.js +373 -0
  27. package/explorer/engine/render.js +1 -0
  28. package/explorer/engine/source.js +315 -0
  29. package/explorer/engine/theme-sheet.js +444 -0
  30. package/explorer/focus-room.js +1 -1
  31. package/explorer/header-fit.js +3 -3
  32. package/explorer/house.css +1 -1
  33. package/explorer/index.html +23 -61
  34. package/explorer/instance.js +82 -6
  35. package/explorer/page-address.js +59 -0
  36. package/explorer/page-pieces.js +33 -5
  37. package/explorer/page.js +20 -20
  38. package/explorer/panels.js +1 -3
  39. package/explorer/pieces/changes.js +502 -0
  40. package/explorer/pieces/decision.js +657 -0
  41. package/explorer/pieces/layers.js +4 -0
  42. package/explorer/pieces/map-stage.css +1 -1
  43. package/explorer/pieces/map.js +113 -2
  44. package/explorer/pieces/node-panel.js +34 -1
  45. package/explorer/pieces/proposal.js +488 -0
  46. package/explorer/pieces/scope-link.js +50 -0
  47. package/explorer/pieces/scope.js +247 -0
  48. package/explorer/pieces/status.css +24 -0
  49. package/explorer/pieces/status.js +144 -0
  50. package/explorer/plugins.js +0 -10
  51. package/explorer/proposal.js +64 -697
  52. package/explorer/review-column.js +24 -439
  53. package/explorer/review.js +27 -673
  54. package/explorer/scenario-ui.js +32 -478
  55. package/explorer/sheets.js +8 -7
  56. package/explorer/theme-model.js +1 -1
  57. package/explorer/theme.js +1 -1
  58. package/explorer/tokens.css +2 -2
  59. package/explorer/view.js +6 -5
  60. package/explorer/waiting-line.js +7 -50
  61. package/package.json +1 -1
  62. package/server/components.js +144 -0
  63. package/server/embed.js +3 -1
  64. package/server/server.js +9 -1
  65. package/explorer/explorer.css +0 -1512
@@ -0,0 +1,188 @@
1
+ /*
2
+ * node-panel.css: the node panel
3
+ * What is selected (panels.js, #138): type, name, one line, facts, mockups, threads, the diff, the actions; the slide-over from the right
4
+ * from 768px, a bottom sheet below. Read by corn-node-panel (D4).
5
+ * No rule here asks what the document says (`:root`, `html`, `body`, `[data-theme]`), sizes from the window (`vw`, `vh`) or is `position: fixed` unless it says why;
6
+ * a width rule is a container query on `corn-box` (page.css), a height rule on `corn-page`. base.css loads first.
7
+ */
8
+ .hx-var { color: var(--corn-hue-pink); font-family: var(--corn-mono); font-size: var(--corn-text-2xs); background: color-mix(in srgb, var(--corn-ground) 55%, transparent); padding: 0 var(--corn-space-1); border-radius: var(--corn-radius-xs); }
9
+ .hx-drawer-title { font-family: var(--corn-font-display); }
10
+ /* fixed (spec 0011 D8): on a phone, with a sheet open, the tap that closes it covers the whole window, the header too (it never draws: see sheets.css). In the stage it would leave the header live under an open sheet */
11
+ .hx-backdrop { position: fixed; inset: 0; z-index: 40; background: var(--corn-scrim); backdrop-filter: blur(calc(var(--corn-blur) / 4)); }
12
+ @container corn-box (min-width: 768px) {
13
+ .hx-backdrop { display: none; }
14
+ }
15
+ .hx-drawer { display: flex; flex-direction: column; z-index: 40; border-color: var(--corn-line); box-shadow: var(--corn-shadow-lg); pointer-events: none; touch-action: pan-y; transition: transform 0.2s ease-out; }
16
+ .hx-drawer * { touch-action: pan-y; }
17
+ .hx-drawer.drawer-open { pointer-events: auto; }
18
+ /* The closed panel waits just off the right edge: its shadow would show there */
19
+ .hx-drawer:not(.drawer-open) { box-shadow: none; }
20
+ @container corn-box (max-width: 767px) {
21
+ /* A sheet in #sheet-dock (sheets.js, "phone bottom sheets" at the end of this file) */
22
+ .hx-drawer { position: relative; width: 100%; border-radius: var(--corn-radius-lg) var(--corn-radius-lg) 0 0; border-left: 0; transform: none; z-index: auto; }
23
+ .hx-drawer:not(.drawer-open) { display: none; }
24
+ }
25
+ @container corn-box (min-width: 768px) {
26
+ .hx-drawer { position: absolute; top: 0; right: 0; bottom: 0; width: 480px; transform: translateX(100%); }
27
+ .hx-drawer.drawer-open { transform: translateX(0); }
28
+ }
29
+ .hx-drawer-handle { display: flex; justify-content: center; padding: var(--corn-space-3) 0 var(--corn-space-1); }
30
+ .hx-drawer-handle span { width: 48px; height: 6px; border-radius: var(--corn-radius-pill); background: var(--corn-surface-3); }
31
+ .hx-drawer-body { flex: 1; display: flex; flex-direction: column; gap: var(--corn-space-5); padding: var(--corn-panel-pad); overflow-y: auto; user-select: text; }
32
+ .hx-drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--corn-space-3); }
33
+ .hx-drawer-title { font-size: var(--corn-text-lg); font-weight: 700; color: var(--corn-text); overflow-wrap: anywhere; }
34
+ .hx-lead { font-size: var(--corn-text-base); line-height: 1.5; color: var(--corn-text-2); }
35
+ .hx-block { display: flex; flex-direction: column; gap: var(--corn-space-3); }
36
+ .hx-meta { display: flex; flex-direction: column; gap: var(--corn-space-5); font-size: var(--corn-text-md); color: var(--corn-text-2); overflow-wrap: anywhere; }
37
+ .hx-meta > :empty { display: none; } /* no live data, no threads: no gap where they would be */
38
+ .hx-sec { margin-top: var(--corn-space-2); padding-top: var(--corn-space-2); border-top: var(--corn-border) solid var(--corn-line); }
39
+ .hx-line { display: flex; align-items: flex-start; gap: var(--corn-space-2); padding: calc(var(--corn-space-1) / 2) 0; }
40
+ .hx-linkbtn { margin-left: var(--corn-space-1); padding: 0; border: 0; background: none; color: var(--corn-hue-fuchsia); text-decoration: underline; font-size: inherit; }
41
+ .hx-sim { display: flex; flex-direction: column; gap: var(--corn-space-2); padding-top: var(--corn-space-1); font-family: var(--corn-font); }
42
+ .hx-field-label { font-size: var(--corn-text-2xs); color: var(--corn-text-3); }
43
+ .hx-field { width: 100%; padding: var(--corn-space-1) var(--corn-space-3); border-radius: var(--corn-radius-sm); border: var(--corn-border) solid var(--corn-line); background: color-mix(in srgb, var(--corn-ground) 80%, transparent); color: var(--corn-text-2); font-family: var(--corn-mono); font-size: var(--corn-text-xs); }
44
+ .hx-sim-result { font-size: var(--corn-text-xs); }
45
+ .hx-error-text { padding-top: var(--corn-space-3); color: var(--corn-bad); }
46
+ .hx-ms { width: 56px; flex: none; text-align: right; color: var(--corn-hue-fuchsia); }
47
+ .hx-file { padding: calc(var(--corn-space-1) / 2) 0; }
48
+ .hx-sandbox { display: flex; flex-direction: column; gap: var(--corn-space-4); padding: var(--corn-space-5); border-radius: var(--corn-radius); border: var(--corn-border) solid var(--corn-line); background: color-mix(in srgb, var(--corn-ground) 80%, transparent); }
49
+ .hx-sandbox-title { display: flex; align-items: center; justify-content: space-between; font-size: var(--corn-text-2xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--corn-text-3); }
50
+ .hx-sandbox-name { display: flex; align-items: center; gap: var(--corn-space-2); }
51
+ .hx-sandbox-stage { min-height: 90px; display: flex; align-items: center; justify-content: center; padding: var(--corn-space-5); border-radius: var(--corn-radius-sm); border: var(--corn-border) dashed var(--corn-surface-2); background: var(--corn-ground); overflow-x: auto; }
52
+ .hx-sandbox-controls { display: flex; flex-direction: column; gap: var(--corn-space-2); padding-top: var(--corn-space-3); border-top: var(--corn-border) solid var(--corn-line); font-size: var(--corn-text-xs); }
53
+ .hx-ctl-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--corn-space-2); color: var(--corn-text-2); }
54
+ .hx-check { display: inline-flex; align-items: center; gap: var(--corn-space-1); margin-right: var(--corn-space-3); cursor: pointer; }
55
+ .hx-chip { padding: calc(var(--corn-space-1) / 2) var(--corn-space-3); border: 0; border-radius: var(--corn-radius-xs); font-size: var(--corn-text-xs); font-weight: 500; color: var(--corn-text-on-accent); }
56
+ .hx-chip--ghost { background: var(--corn-surface-2); color: var(--corn-text-2); }
57
+ .hx-chip--outline { background: var(--corn-surface-2); color: var(--corn-accent-text); }
58
+ .hx-chip--primary { background: var(--corn-accent); }
59
+ .hx-chip--danger { background: var(--corn-bad); }
60
+ .hx-chip--success { background: var(--corn-ok); }
61
+ .hx-chip--warning { background: var(--corn-warn); }
62
+ .hx-chip--danger, .hx-chip--success, .hx-chip--warning { color: var(--corn-ground); }
63
+ .hx-drawer-foot { display: flex; align-items: stretch; gap: var(--corn-space-3); flex: none; padding: var(--corn-space-4) var(--corn-space-5) calc(var(--corn-space-4) + env(safe-area-inset-bottom, 0px)); border-top: var(--corn-border) solid var(--corn-line-soft); }
64
+ .hx-open { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; gap: var(--corn-space-2); min-height: var(--hx-control-h); padding: 0 var(--corn-space-4); border-radius: var(--corn-radius-sm); background: var(--corn-accent); color: var(--corn-text-on-accent); font-size: var(--corn-text-sm); font-weight: 600; text-align: center; text-decoration: none; transition: background 0.15s; }
65
+ .hx-open:hover { background: var(--corn-accent-hover); }
66
+ /* The panel's proposal block: why, and what changes */
67
+ .hx-proposal-sec { padding: var(--corn-space-3) var(--corn-space-3); border: var(--corn-border) solid var(--corn-line); border-left-width: var(--corn-border-strong); border-radius: var(--corn-radius-sm); background: color-mix(in srgb, var(--corn-ground) 55%, transparent); margin: 0 0 var(--corn-space-2); font-family: var(--corn-font); }
68
+ .hx-proposal-sec--added { border-left-color: var(--corn-added); }
69
+ .hx-proposal-sec--changed { border-left-color: var(--corn-changed); }
70
+ .hx-proposal-sec--removed { border-left-color: var(--corn-removed); }
71
+ .hx-proposal-sec--edit { border-left-color: var(--corn-edit); }
72
+ .hx-why { margin: var(--corn-space-1) 0 var(--corn-space-2); color: var(--corn-text-2); font-size: var(--corn-text-sm); line-height: 1.5; }
73
+ .hx-change { display: flex; flex-wrap: wrap; align-items: baseline; gap: calc(var(--corn-space-1) / 2) var(--corn-space-3); padding: var(--corn-space-1) 0; border-top: var(--corn-border) solid var(--corn-line-soft); font-family: var(--corn-mono); font-size: var(--corn-text-xs); }
74
+ .hx-change-field { flex: none; min-width: 64px; color: var(--corn-text-3); }
75
+ .hx-change-before { color: var(--corn-bad); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--corn-bad) 50%, transparent); overflow-wrap: anywhere; }
76
+ .hx-change-arrow { color: var(--corn-text-3); }
77
+ .hx-change-after { color: var(--corn-ok); overflow-wrap: anywhere; }
78
+ .hx-change em { color: var(--corn-text-3); text-decoration: none; }
79
+ /* A proposal's mockups (mockups.js): the buttons in a node's panel and the window one opens in. A mockup is untrusted content, shown in an <img> or a sandboxed <iframe>. */
80
+ .hx-mockup-list { list-style: none; margin: var(--corn-space-1) 0 0; padding: 0; display: flex; flex-direction: column; gap: var(--corn-space-2); }
81
+ .hx-mockup-item { display: flex; flex-wrap: wrap; align-items: center; gap: var(--corn-space-1) var(--corn-space-3); }
82
+ .hx-mockup-open { max-width: 100%; white-space: normal; text-align: left; }
83
+ .hx-mockup-state { margin: 0; font-size: var(--corn-text-xs); color: var(--corn-text-2); }
84
+ .hx-mockup-state--approved { color: var(--corn-added-text); }
85
+ .hx-mockup-state--changed { color: var(--corn-warn); font-weight: 600; }
86
+ .hx-mockup-state--missing { color: var(--corn-bad); }
87
+ @container corn-box (max-width: 767px) {
88
+ .hx-backdrop { display: none; }
89
+ /* The node panel: its title and type until expanded */
90
+ .hx-drawer { max-height: 60cqh; }
91
+ }
92
+ /* ---- cloud nodes (spec 0031, CLOUD-06): the panel's badges, plan and Used by; the `when` line styles -- */
93
+ .hx-cloud-browser { color: var(--corn-text-3); font-size: var(--corn-text-sm); }
94
+ .hx-drawer-title:focus { outline: none; }
95
+ .hx-drawer-title:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: var(--corn-focus-offset); }
96
+ .hx-drawer-id { flex: 1; min-width: 0; }
97
+ .hx-kicker { display: flex; flex-wrap: wrap; align-items: center; margin: 0 0 var(--corn-space-2); font-size: var(--corn-text-sm); color: var(--corn-text-3); }
98
+ /* The badge carries a project's own kind ("Service · timer", spec 0009): a long one wraps inside the panel, never past it */
99
+ .hx-kicker [data-corn="badge"] { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
100
+ #drawer-host { white-space: pre; } /* the kicker is a flex row, which drops a leading space: keep " · host" */
101
+ .hx-diffpill { margin-left: var(--corn-space-3); padding: 0 var(--corn-space-3); border-radius: var(--corn-radius-pill); border: var(--corn-border) dashed var(--corn-added); color: var(--corn-added-text); font-size: var(--corn-text-xs); }
102
+ .hx-drawer-id .hx-drawer-title.hx-mono { font-family: var(--corn-mono); }
103
+ .hx-facts { display: flex; flex-direction: column; gap: var(--corn-space-2); }
104
+ .hx-fact { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: var(--corn-space-4); }
105
+ .hx-fact-k { color: var(--corn-text-3); }
106
+ .hx-fact-v { min-width: 0; color: var(--corn-text); }
107
+ .hx-fact-v .hx-line { padding: 0; }
108
+ .hx-fact-v .hx-name { color: var(--corn-text); }
109
+ .hx-fact-v .hx-code { color: var(--corn-text-2); font-size: var(--corn-text-sm); }
110
+ .hx-fact-v .hx-chips { padding-top: 0; }
111
+ .hx-sec-block { display: flex; flex-direction: column; gap: var(--corn-space-3); }
112
+ .hx-sec-title { margin: 0; font-size: var(--corn-text-sm); font-weight: 600; color: var(--corn-text-3); }
113
+ .hx-drawer .hx-mockups { margin: 0; padding: 0; border: 0; }
114
+ .hx-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--corn-space-2); }
115
+ .hx-row { display: flex; align-items: center; gap: var(--corn-space-4); width: 100%; min-height: 36px; padding: var(--corn-space-3) var(--corn-space-4); border: var(--corn-border) solid var(--corn-line); border-radius: var(--corn-radius-sm); background: var(--corn-surface-2); color: var(--corn-text); font: inherit; text-align: left; }
116
+ .hx-row:hover { background: var(--corn-accent-soft); }
117
+ .hx-row:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: var(--corn-focus-offset); }
118
+ .hx-row-title { flex: 1; min-width: 0; overflow-wrap: anywhere; }
119
+ .hx-row-meta { flex: none; font-size: var(--corn-text-sm); color: var(--corn-text-3); font-variant-numeric: tabular-nums; }
120
+ .hx-drawer .hx-mockup-list { margin: var(--corn-space-3) 0 0; }
121
+ .hx-drawer .hx-mockup-item { flex-wrap: nowrap; gap: var(--corn-space-4); padding: var(--corn-space-1) var(--corn-space-1) var(--corn-space-1) 0; border: var(--corn-border) solid var(--corn-line); border-radius: var(--corn-radius-sm); background: var(--corn-surface-2); }
122
+ .hx-drawer .hx-mockup-open { flex: 1; min-width: 0; min-height: 36px; border: 0; background: none; color: var(--corn-text); font-weight: 400; }
123
+ .hx-drawer .hx-mockup-state { flex: none; padding-right: var(--corn-space-3); color: var(--corn-text-3); }
124
+ .hx-drawer .hx-mockup-state--approved { color: var(--corn-added-text); }
125
+ .hx-drawer .hx-mockup-state--changed { color: var(--corn-warn); }
126
+ .hx-drawer .hx-mockup-state--missing { color: var(--corn-bad); }
127
+ .hx-textact { align-self: flex-start; background: none; border: 0; padding-left: 0; }
128
+ .hx-diff { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: var(--corn-space-1) var(--corn-space-4); padding: var(--corn-space-1) 0 var(--corn-space-1) var(--corn-space-4); border-left: var(--corn-border-strong) solid var(--corn-changed); font-family: var(--corn-mono); font-size: var(--corn-text-sm); color: var(--corn-text-2); }
129
+ .hx-diff--added { border-left-color: var(--corn-added); }
130
+ .hx-diff--removed { border-left-color: var(--corn-removed); }
131
+ .hx-diff--edit { border-left-color: var(--corn-edit); }
132
+ .hx-diff-k { color: var(--corn-text-3); }
133
+ .hx-diff-v { min-width: 0; overflow-wrap: anywhere; }
134
+ .hx-drawer .hx-why { margin: 0; }
135
+ .hx-drawer-foot .hx-open[hidden], .hx-drawer-foot .hx-foot-btn[hidden] { display: none; }
136
+ .hx-foot-btn { min-height: var(--hx-control-h); padding: 0 var(--corn-space-4); justify-content: center; }
137
+ @container corn-box (max-width: 767px) {
138
+ /* a phone: the sheet's actions are full width at the foot, each a 44px target */
139
+ .hx-drawer-foot { flex-direction: column; }
140
+ .hx-drawer-foot .hx-open, .hx-foot-btn { min-height: 44px; }
141
+ .hx-drawer .hx-row, .hx-drawer .hx-mockup-open, .hx-textact, .hx-drawer .hx-whatif-drawer .hx-btn, .hx-cloud-play { min-height: 44px; }
142
+ .hx-drawer .hx-close { width: 44px; height: 44px; }
143
+ }
144
+ .hx-cloud-play { align-self: flex-start; } /* the cloud panel's "Play: X is down", a quiet button under the facts (spec 0031 section 8) */
145
+ .hx-drawer-foot .hx-btn--quiet { border-color: transparent; background: none; text-decoration: none; }
146
+ .hx-more { display: contents; }
147
+ .hx-more[hidden] { display: none; }
148
+ .hx-more-btn { display: block; margin-top: var(--corn-space-1); min-height: 0; padding: 0; font-size: var(--corn-text-sm); }
149
+ @container corn-box (max-width: 767px) {
150
+ .hx-more-btn { min-height: 44px; }
151
+ }
152
+ .hx-drawer-body { scroll-padding-block: calc(var(--corn-focus-width) + var(--corn-focus-offset) + var(--corn-space-1)); }
153
+ .hx-ms, .hx-row-meta { font-family: var(--corn-font-num); font-variant-numeric: tabular-nums; }
154
+ @media (prefers-reduced-motion: reduce) {
155
+ /* No panel, sheet or menu slides, and nothing fades or grows, for a viewer who asked for less motion */
156
+ .hx-drawer { transition: none; animation: none; }
157
+ }
158
+ /* The node panel's facts break at word boundaries only (F60): "hook" is never "hoo / k". A long path or name still wraps, at its slashes and dashes, and only as a last resort anywhere. */
159
+ .hx-fact-v { overflow-wrap: break-word; word-break: normal; }
160
+ .hx-drawer-foot .hx-forge-result { flex-basis: 100%; }
161
+ /* ---------------------------------------------------------------------------
162
+ The node panel's lines (spec 0008 D5 and D6): the lit lines by kind, the switch, and Frame them
163
+ --------------------------------------------------------------------------- */
164
+ .hx-lines { display: flex; flex-direction: column; gap: var(--corn-space-2); }
165
+ .hx-lines .hx-chips { padding-top: 0; }
166
+ .hx-lines-kind { display: inline-flex; align-items: baseline; gap: var(--corn-space-1); min-height: 28px; padding: 0 var(--corn-space-3); border: var(--corn-border) solid var(--corn-line); border-radius: var(--corn-radius-pill); background: none; color: var(--corn-text-2); font: inherit; font-size: var(--corn-text-xs); font-weight: 600; cursor: pointer; }
167
+ .hx-lines-kind:hover { background: var(--corn-surface-3); color: var(--corn-text); }
168
+ .hx-lines-kind[aria-pressed="true"] { border-color: var(--corn-accent); background: var(--corn-accent-soft); color: var(--corn-accent-text); }
169
+ .hx-lines-kind:focus-visible, .hx-lines-switch input:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: var(--corn-focus-offset); }
170
+ .hx-lines-count { font-variant-numeric: tabular-nums; color: var(--corn-text-3); }
171
+ .hx-lines-list { display: flex; flex-direction: column; align-items: flex-start; gap: calc(var(--corn-space-1) / 2); }
172
+ .hx-lines-list .hx-linkbtn { margin-left: 0; text-align: left; overflow-wrap: anywhere; }
173
+ .hx-lines-switch { display: flex; align-items: center; gap: var(--corn-space-2); min-height: 28px; font-size: var(--corn-text-sm); color: var(--corn-text-2); cursor: pointer; }
174
+ .hx-lines-reach { display: flex; flex-wrap: wrap; align-items: center; gap: var(--corn-space-3); font-size: var(--corn-text-sm); color: var(--corn-text-2); font-variant-numeric: tabular-nums; }
175
+ @container corn-box (max-width: 767px) {
176
+ .hx-lines-kind, .hx-lines-switch, .hx-lines-list .hx-linkbtn, .hx-lines-reach .hx-btn { min-height: 44px; }
177
+ .hx-lines-kind { align-items: center; } /* in a 44px chip the words sit in the middle, not at the top */
178
+ .hx-lines-switch input { width: 24px; height: 24px; }
179
+ }
180
+ @media (pointer: coarse) {
181
+ .hx-lines-kind, .hx-lines-switch, .hx-lines-list .hx-linkbtn, .hx-lines-reach .hx-btn { min-height: 44px; }
182
+ .hx-lines-kind { align-items: center; } /* in a 44px chip the words sit in the middle, not at the top */
183
+ .hx-lines-switch input { width: 24px; height: 24px; }
184
+ }
185
+ /* The title of a panel: the Work panel, the node panel, the proposal bar, a detail in the Work panel and a dialog are one style. A node's name is long and
186
+ often a path, so it wraps (overflow-wrap) in this size rather than being set larger than the panel's own words. */
187
+ .hx-drawer-title { font-size: var(--corn-text-lg); font-weight: 700; line-height: 1.25; letter-spacing: normal; }
188
+ .hx-drawer-head { min-height: var(--corn-panel-head-height); }
@@ -0,0 +1,83 @@
1
+ /*
2
+ * page.css: the rules only cornfield's own page loads (spec 0011 D8). A piece in another app gets base.css and its own file, never this one.
3
+ * What is here is what asks the document something or sizes from the window: the rules on `body` and `:root`, the page's own layout (the
4
+ * header above the stage, the stage filling the rest), the stage-wide properties the slide-over panels read (`--hx-forge-w`, `--hx-col-w`),
5
+ * and the two overlays that belong to the page, not to a piece (the offline notice, the bench readout). The page is the one place a width rule
6
+ * stays a media query: the stage is as wide as the window here.
7
+ *
8
+ * One element is the query container the pieces' container queries ask, and only the body: `container: corn-page corn-box / size`.
9
+ * corn-box the piece's own box, for a width rule. The body is as wide as the window, and everything on the page is in it (the header, the
10
+ * search bar, the stage with the map, the panels and the sheets, the dialogs), so every width rule falls where the window's did.
11
+ * corn-page the same box, with its height, for the few rules that ask the height of the screen (a sheet's cap, a short window).
12
+ * The stage is NOT a container, on purpose. Browsers from before mid-2024 (Chrome and Edge before 129, Safari and Firefox of that time)
13
+ * gave a query container layout containment as well: it became the containing block of its `position: fixed` descendants and a stacking
14
+ * context. The stage holds two fixed boxes, the offline notice and a phone's tap-away backdrop: in the stage they would move down by the
15
+ * header's height, and the backdrop would leave the header live under an open sheet. The body is the size of the window at its top left, and
16
+ * everything is in it, so the same containment on the body moves nothing on the page (spec 0011 D8; docs/theming.md says which browsers).
17
+ *
18
+ * `--hx-vh` is the window's 1vh, handed to the pieces: a piece reads `calc(40 * var(--hx-vh, 1cqh))` where explorer.css said `40vh`, so the page
19
+ * is exactly as it was on a phone whose toolbar comes and goes (vh is the tallest window there, cqh the body's 100dvh), and a piece in another
20
+ * app, where nothing sets it, falls back to its own box.
21
+ */
22
+ body {
23
+ margin: 0;
24
+ display: flex;
25
+ flex-direction: column;
26
+ width: 100vw;
27
+ height: 100dvh;
28
+ overflow: hidden;
29
+ background-color: var(--corn-ground);
30
+ background-image: var(--corn-ground-image);
31
+ background-attachment: fixed;
32
+ color: var(--corn-text);
33
+ font-family: var(--corn-font);
34
+ -webkit-font-smoothing: antialiased;
35
+ user-select: none;
36
+ touch-action: none;
37
+ container: corn-page corn-box / size;
38
+ --hx-vh: 1vh;
39
+ }
40
+
41
+ /* theme.pixelated (docs/config.md#theme): <html data-pixelated> becomes a property that inherits, even into a shadow root (base.css reads it) */
42
+ :root[data-pixelated] { --hx-pixelated: pixelated; }
43
+
44
+ /* The stage: the map and what lies over it. Not a container (above): the pieces in it ask the body, which is as wide */
45
+ .hx-stage { position: relative; flex: 1; width: 100%; min-height: 0; overflow: hidden; }
46
+ @media (min-width: 768px) {
47
+ /* The panel's width is the stage's `--hx-forge-w`, so what makes room for it reads the same number (the Runs view's compare widens it, below) */
48
+ .hx-stage { --hx-forge-w: min(400px, calc(100% - 24px)); }
49
+ }
50
+ @media (min-width: 1100px) {
51
+ .hx-stage:has(.hx-forge .hx-run-compare) { --hx-forge-w: min(780px, calc(100% - 24px)); }
52
+ }
53
+ @media (min-width: 1100px) and (max-width: 1599px) {
54
+ /* With the node panel open as well, a 780px compare only fits beside it from 1600px: below that the panel keeps its width and the
55
+ profiles stack, so neither panel nor the proposal bar between them is covered */
56
+ .hx-stage:has(.hx-forge .hx-run-compare):has(.drawer-open) { --hx-forge-w: min(400px, calc(100% - 24px)); }
57
+ }
58
+ /* The scenario player is one bar under the map (spec 0006 D6). From 768px it sits at the foot of the map area, to the right of the review column;
59
+ the stage tells it how wide the column is */
60
+ @media (min-width: 768px) {
61
+ .hx-stage:has(.hx-review-column:not([hidden])) { --hx-col-w: 400px; }
62
+ .hx-stage:has(.forge-open):has(.hx-review-column:not([hidden])) { --hx-col-w: max(400px, var(--hx-forge-w)); }
63
+ }
64
+ @media (min-width: 1280px) {
65
+ .hx-stage:has(.forge-open):has(.hx-review-column:not([hidden])) { --hx-col-w: calc(400px + var(--hx-forge-w)); }
66
+ }
67
+ @media (min-width: 768px) and (max-width: 1023px) {
68
+ .hx-stage:has(.hx-review-column:not([hidden])) { --hx-col-w: 320px; }
69
+ .hx-stage:has(.forge-open):has(.hx-review-column:not([hidden])) { --hx-col-w: max(320px, var(--hx-forge-w)); }
70
+ }
71
+
72
+ /* /?bench=1: the run's numbers, bottom left (bench.js) */
73
+ .bench-readout {
74
+ position: fixed; left: 12px; bottom: 12px; z-index: 50; max-width: calc(100vw - 24px); padding: var(--corn-space-3) var(--corn-space-4); border-radius: var(--corn-radius-sm); border: var(--corn-border) solid var(--corn-line); background: color-mix(in srgb, var(--corn-ground) 88%, transparent); color: var(--corn-text-2); font-family: var(--corn-mono); font-size: var(--corn-text-xs); line-height: 1.5; pointer-events: none;
75
+ }
76
+ .bench-readout p { margin: 0; }
77
+
78
+ /* The page's one offline notice */
79
+ .hx-offline {
80
+ position: fixed; top: 64px; /* below the header */ left: 50%; transform: translateX(-50%); z-index: 70; max-width: min(560px, calc(100% - 32px)); margin: 0; padding: var(--corn-space-2) var(--corn-space-4); border: var(--corn-border-strong) solid var(--corn-warn); border-radius: var(--corn-radius); background: var(--corn-surface-1); color: var(--corn-text); box-shadow: var(--corn-shadow); line-height: 1.5;
81
+ }
82
+ .hx-offline[hidden] { display: none; }
83
+ .hx-offline[data-corn-state="success"] { border-color: var(--corn-ok); }
@@ -0,0 +1,151 @@
1
+ /*
2
+ * proposal.css: the proposal bar
3
+ * The proposals list, the bar of an open proposal (title, source, counts, Before / Diff / After, Edit, the More menu) and the line of a run
4
+ * that waits on it. Read by corn-proposal (D4).
5
+ * No rule here asks what the document says (`:root`, `html`, `body`, `[data-theme]`), sizes from the window (`vw`, `vh`) or is `position: fixed` unless it says why;
6
+ * a width rule is a container query on `corn-box` (page.css), a height rule on `corn-page`. base.css loads first.
7
+ */
8
+ .hx-menu--proposals { width: 360px; }
9
+ .hx-proposal-list { display: flex; flex-direction: column; gap: var(--corn-space-1); }
10
+ .hx-proposal-empty { padding: var(--corn-space-3) calc(var(--corn-space-1) / 2); font-size: var(--corn-text-sm); }
11
+ .hx-proposal-item { display: flex; flex-direction: column; align-items: flex-start; gap: var(--corn-space-1); width: 100%; padding: var(--corn-space-3) var(--corn-space-3); border-radius: var(--corn-radius); border: var(--corn-border) solid var(--corn-line); background: var(--corn-surface-2); color: var(--corn-text); text-align: left; font-size: var(--corn-text-xs); }
12
+ button.hx-proposal-item:hover { background: var(--corn-surface-3); }
13
+ button.hx-proposal-item:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: var(--corn-focus-offset); }
14
+ .hx-proposal-item.is-current { border-color: var(--corn-added-text); background: color-mix(in srgb, var(--corn-added) 12%, transparent); }
15
+ .hx-proposal-item.is-broken { opacity: 0.8; cursor: default; }
16
+ .hx-proposal-title { font-size: var(--corn-text-sm); font-weight: 600; color: var(--corn-text); overflow-wrap: anywhere; }
17
+ .hx-proposal-sum { color: var(--corn-text-2); line-height: 1.4; }
18
+ .hx-proposal-meta { display: flex; flex-wrap: wrap; gap: calc(var(--corn-space-1) / 2) var(--corn-space-3); color: var(--corn-text-3); font-size: var(--corn-text-2xs); }
19
+ .hx-proposal-where { color: var(--corn-added-text); }
20
+ .hx-proposal-bar { position: absolute; top: 48px; left: 12px; width: min(960px, calc(100% - 24px)); padding: var(--corn-space-3) var(--corn-space-3); border-radius: var(--corn-radius-lg); font-size: var(--corn-text-sm); z-index: 15; user-select: text; }
21
+ .hx-proposal-bar.is-error { border-color: color-mix(in srgb, var(--corn-removed) 50%, transparent); }
22
+ .hx-proposal-message { color: var(--corn-text-2); }
23
+ .hx-proposal-bar.is-error .hx-proposal-message { color: var(--corn-bad); }
24
+ .hx-proposal-count:focus-visible, .hx-proposal-mode:focus-visible, .hx-seg-btn:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: var(--corn-focus-offset); }
25
+ .hx-proposal-summary { margin-top: var(--corn-space-2); color: var(--corn-text-2); line-height: 1.5; }
26
+ /* Before / Diff / After */
27
+ .hx-seg { display: inline-flex; padding: calc(var(--corn-space-1) / 2); border-radius: var(--corn-radius-sm); border: var(--corn-border) solid var(--corn-line); background: color-mix(in srgb, var(--corn-ground) 55%, transparent); }
28
+ .hx-seg-btn { height: var(--hx-seg-inner); padding: 0 var(--corn-space-4); border: 0; border-radius: var(--corn-radius-sm); background: none; color: var(--corn-text-3); font-size: var(--corn-text-sm); font-weight: 500; }
29
+ .hx-seg-btn:hover { color: var(--corn-text); }
30
+ .hx-seg-btn.is-on, .hx-seg-btn[aria-pressed="true"] { background: var(--corn-accent); color: var(--corn-text-on-accent); } /* the weight does not change: a heavier word is wider, and Edit and the rest of the bar would move */
31
+ .hx-proposal-errors { margin-top: var(--corn-space-2); padding: var(--corn-space-2) var(--corn-space-3); border-radius: var(--corn-radius-sm); background: color-mix(in srgb, var(--corn-removed) 10%, transparent); border: var(--corn-border) solid color-mix(in srgb, var(--corn-removed) 30%, transparent); color: var(--corn-text-2); }
32
+ .hx-proposal-errors summary { cursor: pointer; color: var(--corn-bad); font-weight: 600; }
33
+ .hx-proposal-errors ul { margin: var(--corn-space-2) 0 var(--corn-space-1); padding-left: var(--corn-space-5); line-height: 1.5; }
34
+ .hx-proposal-errors p { margin-top: var(--corn-space-1); font-size: var(--corn-text-xs); }
35
+ @container corn-box (min-width: 768px) {
36
+ /* The node panel is a 480px slide-over from 768px: the bar makes room for it */
37
+ .hx-stage:has(.drawer-open) .hx-proposal-bar { width: min(960px, calc(100% - 504px)); }
38
+ }
39
+ @container corn-box (max-width: 639px) {
40
+ /* fixed (spec 0011 D8): the proposals list in a phone's account menu spans the window */
41
+ .hx-menu--proposals { position: fixed; top: 60px; left: 12px; right: 12px; width: auto; max-width: none; }
42
+ }
43
+ .hx-proposal-reviewed { color: var(--corn-added-text); }
44
+ /* ---- The proposal toolbar (CF-43): proposal.js, review.js, whatif.js, scenario-ui.js ----------------
45
+ One row from 768px: title, counts (they open the change list), Before / Diff / After, Play, Edit, then Send back,
46
+ Approve (the primary) and a ⋯ menu with Close. The what-if controls sit behind Edit, the scenario list behind Play,
47
+ and the review note opens under the row on Send back. On a phone the row is a sheet: the title, the counts with
48
+ the current mode (a button that opens the switcher), the note when it is open, and Send back and Approve full
49
+ width, each 44px tall. */
50
+ .hx-proposal-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--corn-space-3) var(--corn-space-4); }
51
+ .hx-proposal-name { flex: 0 1 auto; min-width: 0; max-width: 28ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--corn-text); } /* its size and weight are the shared panel title's ("panel head" at the end of this file) */
52
+ .hx-proposal-counts { display: contents; }
53
+ .hx-proposal-chip { display: inline-flex; align-items: center; flex-wrap: wrap; color: var(--corn-text-2); font-size: var(--corn-text-sm); font-variant-numeric: tabular-nums; white-space: nowrap; }
54
+ .hx-proposal-count { display: inline-flex; align-items: center; min-height: var(--hx-control-h); padding: var(--corn-space-1) var(--corn-space-2); border: 0; border-radius: var(--corn-radius-sm); background: none; color: inherit; font: inherit; white-space: inherit; cursor: pointer; }
55
+ .hx-proposal-count:hover { color: var(--corn-text); text-decoration: underline; }
56
+ .hx-proposal-peek { display: none; margin: 0; }
57
+ .hx-proposal-chip .hx-mark-dot { margin: 0 var(--corn-space-2) 0 0; }
58
+ h2.hx-proposal-name { margin: 0; }
59
+ .hx-proposal-sep { margin: 0 var(--corn-space-2); color: var(--corn-text-3); }
60
+ .hx-proposal-mode { display: none; }
61
+ .hx-proposal-tools { display: flex; align-items: center; gap: var(--corn-space-3); }
62
+ .hx-proposal-tools .hx-btn { height: var(--hx-control-h); font-size: var(--corn-text-sm); font-weight: 500; }
63
+ #proposal-edit.hx-btn--active { background: var(--corn-edit-text); border-color: var(--corn-edit); color: var(--corn-ground); }
64
+ .hx-proposal-more { position: relative; }
65
+ .hx-proposal-more .hx-btn--icon { width: var(--hx-control-h); height: var(--hx-control-h); border-color: transparent; background: none; color: var(--corn-text-3); }
66
+ .hx-proposal-more .hx-btn--icon:hover, .hx-proposal-more .hx-btn--icon[aria-expanded="true"] { background: var(--corn-surface-3); color: var(--corn-text); }
67
+ .hx-proposal-more-menu { position: absolute; top: 100%; right: 0; z-index: 20; display: flex; flex-direction: column; min-width: 160px; margin-top: var(--corn-space-2); padding: var(--corn-space-2); border-radius: var(--corn-radius); border: var(--corn-border) solid var(--corn-line); box-shadow: var(--corn-shadow); }
68
+ .hx-proposal-more-menu[hidden] { display: none; }
69
+ .hx-proposal-more-menu .hx-btn { width: 100%; height: var(--hx-control-h); border-color: transparent; background: none; color: var(--corn-text-2); font-size: var(--corn-text-sm); }
70
+ .hx-proposal-more-menu .hx-btn:hover { background: var(--corn-surface-3); color: var(--corn-text); }
71
+ @container corn-box (max-width: 767px) {
72
+ .hx-proposal-head { display: grid; grid-template-columns: 1fr auto; gap: var(--corn-space-2) var(--corn-space-3); }
73
+ .hx-proposal-name { grid-column: 1 / -1; order: 1; max-width: none; }
74
+ .hx-proposal-counts { display: flex; grid-column: 1 / -1; order: 2; align-items: center; flex-wrap: wrap; column-gap: var(--corn-space-2); }
75
+ .hx-proposal-count, .hx-proposal-mode { min-height: 44px; }
76
+ .hx-proposal-mode { display: inline-flex; align-items: center; gap: var(--corn-space-2); padding: 0 var(--corn-space-3); border: var(--corn-border) solid var(--corn-line); border-radius: var(--corn-radius-sm); background: var(--corn-surface-2); color: var(--corn-text); font-size: var(--corn-text-sm); font-weight: 600; }
77
+ /* A chevron drawn from an image and the text colour: a thick --corn-border-strong cannot turn it into a heart (the borders it used to be drawn with) */
78
+ .hx-proposal-mode::after { content: ""; width: 10px; height: 10px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 3.5l3 3 3-3'/%3E%3C/svg%3E") no-repeat center / contain; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 3.5l3 3 3-3'/%3E%3C/svg%3E") no-repeat center / contain; }
79
+ .hx-proposal-mode[aria-expanded="true"]::after { transform: rotate(180deg); }
80
+ .hx-seg { grid-column: 1 / -1; order: 3; }
81
+ .hx-proposal-bar:not([data-mode-open="true"]) .hx-seg { display: none; }
82
+ .hx-seg-btn { flex: 1; height: var(--hx-seg-inner); font-size: var(--corn-text-md); }
83
+ .hx-proposal-tools { order: 5; }
84
+ .hx-proposal-tools .hx-btn { height: auto; min-height: 44px; padding: 0 var(--corn-space-5); font-size: var(--corn-text-md); }
85
+ .hx-proposal-more { display: contents; }
86
+ .hx-proposal-more .hx-btn--icon { order: 6; width: var(--hx-control-h); height: var(--hx-control-h); }
87
+ .hx-proposal-more-menu { position: static; grid-column: 1 / -1; order: 7; box-shadow: none; }
88
+ .hx-proposal-more-menu .hx-btn { height: auto; min-height: 44px; font-size: var(--corn-text-md); }
89
+ /* The proposal bar */
90
+ .hx-proposal-bar { max-height: 50cqh; overflow-y: auto; padding: 0 var(--corn-space-4) var(--corn-space-3); }
91
+ }
92
+ @container corn-box (min-width: 768px) {
93
+ /* The proposal bar and the player make room for it: 12px past its edge, and the node panel's 480px (+24) when that is open too */
94
+ .hx-stage:has(.forge-open) .hx-proposal-bar { left: calc(var(--hx-forge-w) + 12px); width: min(960px, calc(100% - var(--hx-forge-w) - 36px)); }
95
+ .hx-stage:has(.forge-open):has(.drawer-open) .hx-proposal-bar { width: min(960px, calc(100% - var(--hx-forge-w) - 540px)); }
96
+ }
97
+ .hx-proposal-bar { scroll-padding-block: calc(var(--corn-focus-width) + var(--corn-focus-offset) + var(--corn-space-1)); }
98
+ @media (forced-colors: active) {
99
+ .hx-proposal-mode::after { background: CanvasText; }
100
+ }
101
+ /* ---- the review flow, 0.34 design review (explorer/proposal.js, review.js, scenario-ui.js) -----------------------------
102
+ F08 the source chip on the bar; F11 the player's controls in a phone peek; F14 the note above the keyboard; F15 the reason
103
+ Approve is off in a peek; F16 the ways on from a bad link; F21 reflow at 400% zoom and with text spacing raised. */
104
+ .hx-proposal-source { display: inline-flex; align-items: center; min-width: 0; max-width: 100%; padding: calc(var(--corn-space-1) / 2) var(--corn-space-3); border: var(--corn-border) solid var(--corn-line); border-radius: var(--corn-radius-pill); background: var(--corn-surface-2); color: var(--corn-text-2); font-size: var(--corn-text-xs); line-height: 1.4; text-decoration: none; overflow-wrap: anywhere; }
105
+ .hx-proposal-source[hidden] { display: none; }
106
+ a.hx-proposal-source { min-height: 24px; } /* a link: at least the WCAG 2.5.8 target (44px on a phone, below) */
107
+ a.hx-proposal-source:hover { color: var(--corn-text); text-decoration: underline; }
108
+ a.hx-proposal-source:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: var(--corn-focus-offset); }
109
+ .hx-proposal-source[data-corn-state="draft"] { border-color: color-mix(in srgb, var(--corn-changed) 50%, transparent); }
110
+ .hx-proposal-ways { display: flex; flex-wrap: wrap; gap: var(--corn-space-2) var(--corn-space-3); margin-top: var(--corn-space-3); }
111
+ .hx-proposal-ways[hidden] { display: none; }
112
+ .hx-proposal-ways .hx-btn { height: auto; min-height: 32px; padding: var(--corn-space-1) var(--corn-space-4); white-space: normal; text-align: left; }
113
+ @container corn-box (max-width: 767px) {
114
+ .hx-proposal-source { grid-column: 1 / -1; order: 1; justify-self: start; }
115
+ .hx-proposal-ways .hx-btn, a.hx-proposal-source { min-height: 44px; } /* targets a thumb can hit */
116
+ .hx-proposal-source { padding: 0; border: 0; border-radius: 0; background: none; } /* a line of the sheet, not a pill 44px tall */
117
+ a.hx-proposal-source { text-decoration: underline; text-underline-offset: 3px; }
118
+ /* The note open: the field, Cancel and the send button are all there is, so all of them stay above the keyboard */
119
+ .hx-proposal-bar:has(.hx-review-form:not([hidden])) :is(.hx-proposal-name, .hx-proposal-source, .hx-proposal-counts, .hx-proposal-tools, .hx-proposal-more, .hx-review-status, .hx-review-line, .hx-rc-scroll, .hx-rc-tabs, .hx-proposal-peek) { display: none; } /* the review column's lists too: the sheet holds the note and its buttons */
120
+ /* Reflow: nothing is wider than the sheet, and long words and counts wrap instead of being cut */
121
+ .hx-proposal-bar { overflow-x: hidden; overflow-wrap: anywhere; }
122
+ .hx-proposal-head { grid-template-columns: minmax(0, 1fr) auto; }
123
+ .hx-proposal-chip { flex-wrap: wrap; max-width: 100%; white-space: normal; text-align: left; }
124
+ .hx-proposal-counts { min-width: 0; }
125
+ .hx-proposal-chip { flex-wrap: wrap; white-space: normal; text-align: left; }
126
+ .hx-proposal-count { white-space: normal; text-align: left; } /* the counts say what they count, so they are longer: they wrap rather than clip */
127
+ }
128
+ @media (pointer: coarse) {
129
+ .hx-proposal-chip { flex-wrap: wrap; white-space: normal; text-align: left; }
130
+ .hx-proposal-count { white-space: normal; text-align: left; } /* the counts say what they count, so they are longer: they wrap rather than clip */
131
+ }
132
+ .hx-proposal-summary { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; margin: 0; flex: none; }
133
+ @container corn-box (max-width: 767px) {
134
+ .hx-proposal-summary { display: none; }
135
+ }
136
+ /* The proposal bar's line when a run waits on the open proposal (spec 0010 D2): one line under the buttons, in the waiting colour's own mark (a left edge and its words), then Answer */
137
+ .hx-waiting-line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--corn-space-2) var(--corn-space-3); margin: var(--corn-space-2) 0 0; padding: var(--corn-space-1) var(--corn-space-3); border-left: calc(var(--corn-border-strong) * 2) solid var(--corn-run-waiting); border-radius: var(--corn-radius-sm); background: var(--corn-surface-2); color: var(--corn-text); line-height: 1.4; overflow-wrap: anywhere; }
138
+ .hx-waiting-line[hidden] { display: none; }
139
+ @container corn-box (max-width: 767px) {
140
+ .hx-waiting-line .hx-btn { min-height: 44px; min-width: 44px; }
141
+ }
142
+ .hx-proposal-yours { display: inline-flex; align-items: center; gap: var(--corn-space-1); color: var(--corn-text-2); }
143
+ .hx-proposal-tools [aria-pressed="false"]:not([data-corn="whole-map"]) { opacity: 0.8; } /* My edits off; "Whole map" off is the review's own view, not a faded choice */
144
+ .hx-proposal-name { font-size: var(--corn-text-lg); font-weight: 700; line-height: 1.25; letter-spacing: normal; }
145
+ @container corn-box (min-width: 768px) {
146
+ /* On a desk "Whole map" sits on the title's row, beside the source, so the row of counts, Compare, Edit and More keeps the one line it had: at the
147
+ control height, drawn over the row's own 24px (the source's; --corn-space-6) so the bar is no taller. On a phone it stays with Edit, 44px */
148
+ .hx-proposal-tools { display: contents; }
149
+ .hx-proposal-name, .hx-proposal-source { order: -2; }
150
+ :where(.hx-proposal-head) [data-corn="whole-map"] { order: -1; margin-block: calc((var(--corn-space-6) - var(--hx-control-h)) / 2); } /* the row is 24px (--corn-space-6 by default), the source's height */
151
+ }
@@ -0,0 +1,84 @@
1
+ /*
2
+ * search.css: search
3
+ * The search field (a desk's) and the phone's search bar, the count, the step buttons and the list of what was found. Read by corn-search
4
+ * (D4).
5
+ * No rule here asks what the document says (`:root`, `html`, `body`, `[data-theme]`), sizes from the window (`vw`, `vh`) or is `position: fixed` unless it says why;
6
+ * a width rule is a container query on `corn-box` (page.css), a height rule on `corn-page`. base.css loads first.
7
+ */
8
+ /* Search: the field with its key hint (a desktop's), an icon on a phone */
9
+ .hx-search { display: none; align-items: center; gap: var(--corn-space-3); width: 260px; min-width: 120px; height: var(--hx-control-h); padding: 0 var(--corn-space-3); border-radius: var(--corn-radius-sm); border: var(--corn-border) solid var(--corn-line); background: var(--corn-surface-2); color: var(--corn-text-3); }
10
+ .hx-search:focus-within { border-color: var(--corn-focus); outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: var(--corn-focus-offset); }
11
+ .hx-search-icon { flex: none; }
12
+ .hx-search-input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--corn-text); font: inherit; font-size: var(--corn-text-sm); outline: none; user-select: text; }
13
+ .hx-search-input::placeholder { color: var(--corn-text-3); }
14
+ .hx-kbd { flex: none; padding: 0 var(--corn-space-1); border-radius: var(--corn-radius-xs); border: var(--corn-border) solid var(--corn-line); font-family: var(--corn-mono); font-size: var(--corn-text-2xs); color: var(--corn-text-3); }
15
+ .hx-search:focus-within .hx-kbd { display: none; }
16
+ .hx-hdr-icon { align-items: center; justify-content: center; width: var(--hx-control-h); height: var(--hx-control-h); padding: 0; border: 0; border-radius: var(--corn-radius-sm); background: none; color: var(--corn-text-2); }
17
+ .hx-hdr-icon:hover { background: var(--corn-surface-3); color: var(--corn-text); }
18
+ @container corn-box (min-width: 768px) {
19
+ .hx-search { display: flex; flex: 0 1 260px; width: auto; }
20
+ }
21
+ .hx-mobile-search { position: absolute; top: 56px; left: 0; right: 0; display: flex; align-items: center; gap: var(--corn-space-3); padding: var(--corn-space-3); z-index: 30; }
22
+ .hx-mobile-search::before { content: ""; position: absolute; top: 50%; left: calc(var(--corn-space-3) + 8px); width: 14px; height: 14px; transform: translateY(-50%); background: var(--corn-text-3); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'/%3E%3C/svg%3E") no-repeat center / contain; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'/%3E%3C/svg%3E") no-repeat center / contain; pointer-events: none; z-index: 1; }
23
+ @media (forced-colors: active) {
24
+ /* Windows high contrast (forced colours) repaints backgrounds, which would leave a masked icon the colour of the page: draw it in the text colour */
25
+ .hx-mobile-search::before { background: CanvasText; }
26
+ }
27
+ /* Search status (F24, spec 0008): the polite live region by each search field. The count and the list say it on the screen (below), so
28
+ the region itself is only for a screen reader: it stays in the page, out of sight. */
29
+ .hx-search { position: relative; }
30
+ .hx-search-status { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
31
+ @container corn-box (max-width: 767px) {
32
+ .hx-mobile-search .hx-input { min-height: 44px; }
33
+ }
34
+ @media (pointer: coarse) {
35
+ .hx-mobile-search .hx-input { min-height: 44px; }
36
+ }
37
+ /* ---------------------------------------------------------------------------
38
+ Search: the count, the step buttons and the list of what was found (spec 0008 D4)
39
+ --------------------------------------------------------------------------- */
40
+ .hx-search-steps { display: flex; align-items: center; flex: none; gap: var(--corn-space-1); }
41
+ .hx-search-steps[hidden] { display: none; }
42
+ .hx-search-count { padding: 0 var(--corn-space-2); font-size: var(--corn-text-2xs); color: var(--corn-text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
43
+ .hx-search-count[data-empty="true"] { color: var(--corn-text); font-weight: 600; }
44
+ .hx-search-btn { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: var(--corn-radius-xs); background: none; color: var(--corn-text-3); }
45
+ .hx-search-btn:hover { background: var(--corn-surface-3); color: var(--corn-text); }
46
+ .hx-search-btn:focus-visible, .hx-search-row:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: calc(var(--corn-focus-offset) * -1); }
47
+ .hx-search:has(.hx-search-steps:not([hidden])) { flex-basis: 340px; }
48
+ @container corn-box (min-width: 768px) and (max-width: 959px) {
49
+ /* A narrow desktop leaves the field too little room for the count and three buttons: Previous and Next go (Enter and Shift+Enter, N and P
50
+ and the list's rows still step), the count and Clear stay */
51
+ .hx-search [data-action="search-prev"], .hx-search [data-action="search-next"] { display: none; }
52
+ }
53
+ .hx-search-results { position: absolute; top: calc(100% + var(--corn-space-2)); right: 0; z-index: 40; width: min(440px, 92cqw); max-height: min(calc(60 * var(--hx-vh, 1cqh)), 560px); overflow-y: auto; padding: var(--corn-space-1) 0; border-radius: var(--corn-radius-sm); border: var(--corn-border) solid var(--corn-line); background: var(--corn-ground); box-shadow: var(--corn-shadow); color: var(--corn-text); font-size: var(--corn-text-sm); } /* the ground itself, not a surface: a surface is see-through, and the panel under the list would show in it */
54
+ .hx-search-results[hidden] { display: none; }
55
+ /* The list is part of the header, which sits under the node panel (40): while the list is open the header is over it, so a row is never half under the panel */
56
+ .hx-header:has(.hx-search-results:not([hidden])) { z-index: 46; }
57
+ /* On a phone the list is in the search bar, under the sheets (the dock, 45): while it is open the bar is over them, so a proposal's or the
58
+ Work sheet never covers rows of it. Without :has() the list stays under the sheets, as the bar always was */
59
+ .hx-mobile-search:has(.hx-search-results:not([hidden])) { z-index: 46; }
60
+ .hx-search-group-title { position: sticky; top: 0; display: flex; justify-content: space-between; gap: var(--corn-space-3); padding: var(--corn-space-2) var(--corn-space-3) var(--corn-space-1); background: var(--corn-ground); color: var(--corn-text-3); font-size: var(--corn-text-2xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
61
+ .hx-search-row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--corn-space-3); width: 100%; min-height: 28px; padding: var(--corn-space-1) var(--corn-space-3); border: 0; border-left: var(--corn-border-strong) solid transparent; background: none; color: var(--corn-text); font: inherit; text-align: left; cursor: pointer; }
62
+ .hx-search-row:hover, .hx-search-row:focus-visible { background: var(--corn-surface-3); }
63
+ .hx-search-row[aria-current="true"] { border-left-color: var(--corn-accent); background: var(--corn-accent-soft); }
64
+ .hx-search-row-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
65
+ .hx-search-row-parent { flex: none; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--corn-text-3); font-size: var(--corn-text-xs); }
66
+ .hx-search-frame { font-weight: 600; color: var(--corn-text); }
67
+ .hx-search-empty, .hx-search-more { margin: 0; padding: var(--corn-space-2) var(--corn-space-3); color: var(--corn-text-2); overflow-wrap: anywhere; }
68
+ .hx-mobile-search { flex-wrap: wrap; }
69
+ .hx-mobile-search .hx-input { flex: 1 1 0; min-width: 0; }
70
+ .hx-mobile-search::before { top: calc(var(--corn-space-3) + 22px); } /* the magnifier stays by the field when the bar wraps to a second row of steps */
71
+ .hx-mobile-search .hx-search-steps { flex: 1 0 100%; justify-content: flex-end; gap: var(--corn-space-1); }
72
+ .hx-mobile-search .hx-search-count { margin-right: auto; font-size: var(--corn-text-xs); }
73
+ .hx-mobile-search .hx-search-results { top: 100%; left: 0; right: 0; width: auto; max-height: calc(50 * var(--hx-vh, 1cqh)); border-radius: 0; border-left: 0; border-right: 0; }
74
+ @container corn-box (max-width: 767px) {
75
+ .hx-search-btn { min-width: 44px; min-height: 44px; }
76
+ .hx-search-row { min-height: 44px; }
77
+ }
78
+ @media (pointer: coarse) {
79
+ .hx-search-btn { min-width: 44px; min-height: 44px; }
80
+ .hx-search-row { min-height: 44px; }
81
+ }
82
+ @media (forced-colors: active) {
83
+ .hx-search-row[aria-current="true"] { border-left-color: Highlight; }
84
+ }