cornfield 0.46.2 → 0.48.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 (42) hide show
  1. package/core/contrast.js +6 -6
  2. package/explorer/css/account.css +46 -0
  3. package/explorer/css/base.css +159 -0
  4. package/explorer/css/changes.css +160 -0
  5. package/explorer/css/decision.css +68 -0
  6. package/explorer/css/dialogs.css +50 -0
  7. package/explorer/css/header.css +75 -0
  8. package/explorer/css/layers.css +92 -0
  9. package/explorer/css/live.css +48 -0
  10. package/explorer/css/map.css +43 -0
  11. package/explorer/css/node-panel.css +188 -0
  12. package/explorer/css/page.css +83 -0
  13. package/explorer/css/proposal.css +151 -0
  14. package/explorer/css/search.css +84 -0
  15. package/explorer/css/sheets.css +134 -0
  16. package/explorer/css/whatif.css +55 -0
  17. package/explorer/css/work.css +288 -0
  18. package/explorer/engine/hint.js +1 -0
  19. package/explorer/engine/keyboard.js +2 -2
  20. package/explorer/engine/map-style.js +9 -4
  21. package/explorer/flow-build.js +88 -0
  22. package/explorer/flows.js +1 -81
  23. package/explorer/focus-room.js +1 -1
  24. package/explorer/header-fit.js +3 -3
  25. package/explorer/house.css +1 -1
  26. package/explorer/index.html +20 -10
  27. package/explorer/input.js +8 -1
  28. package/explorer/page-pieces.js +5 -0
  29. package/explorer/page.js +11 -20
  30. package/explorer/pieces/adopt-tokens.js +38 -0
  31. package/explorer/pieces/map-stage.css +14 -0
  32. package/explorer/pieces/map.js +332 -0
  33. package/explorer/renderer.js +1 -0
  34. package/explorer/review.js +1 -1
  35. package/explorer/theme-model.js +1 -1
  36. package/explorer/theme.js +1 -1
  37. package/explorer/tokens.css +2 -2
  38. package/package.json +1 -1
  39. package/server/components.js +144 -0
  40. package/server/embed.js +3 -1
  41. package/server/server.js +9 -1
  42. package/explorer/explorer.css +0 -1512
@@ -0,0 +1,92 @@
1
+ /*
2
+ * layers.css: the Layers menu
3
+ * The Layers chip and its menu: the layer rows and their counts, the legend, the kinds key, the dots. Read by corn-layers (D4).
4
+ * 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;
5
+ * a width rule is a container query on `corn-box` (page.css), a height rule on `corn-page`. base.css loads first.
6
+ */
7
+ .hx-menu-title { font-family: var(--corn-font-display); }
8
+ /* The Layers chip: "Layers · 13 of 20" */
9
+ .hx-layers-chip { display: inline-flex; align-items: center; gap: var(--corn-space-1); height: var(--hx-control-h); padding: 0 var(--corn-space-4); border-radius: var(--corn-radius-sm); border: var(--corn-border) solid var(--corn-line); background: var(--corn-surface-2); color: var(--corn-text-2); font-size: var(--corn-text-sm); white-space: nowrap; }
10
+ .hx-layers-chip:hover, .hx-layers-chip[aria-expanded="true"] { background: var(--corn-surface-3); color: var(--corn-text); }
11
+ .hx-layers-count { color: var(--corn-text-3); }
12
+ .hx-layers-chip--dim { border-color: var(--corn-line-soft); }
13
+ .hx-layers-chip--dim, .hx-layers-chip--dim .hx-layers-count { color: var(--corn-text-3); }
14
+ @container corn-box (max-width: 767px) {
15
+ .hx-header .hx-layers { position: absolute; top: calc(100% + var(--corn-space-4)); left: var(--corn-space-4); }
16
+ .hx-layers-chip { height: var(--hx-control-h); padding: 0 var(--corn-space-5); border-radius: var(--corn-radius-pill); background: var(--corn-surface-1); box-shadow: var(--corn-shadow); }
17
+ }
18
+ .hx-toggle-row:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: var(--corn-focus-offset); }
19
+ .hx-menu-title { display: flex; align-items: center; justify-content: space-between; padding-bottom: calc(var(--corn-space-1) / 2); font-size: var(--corn-text-2xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--corn-text-3); }
20
+ .hx-menu-head { padding-bottom: var(--corn-space-2); border-bottom: var(--corn-border) solid var(--corn-line); margin-bottom: var(--corn-space-3); }
21
+ .hx-menu-links { display: flex; align-items: center; gap: var(--corn-space-3); text-transform: none; letter-spacing: 0; }
22
+ .hx-menu-section { padding-top: var(--corn-space-3); margin-top: var(--corn-space-3); border-top: var(--corn-border) solid var(--corn-line); }
23
+ .hx-note { padding: var(--corn-space-2) var(--corn-space-3); margin-bottom: var(--corn-space-3); border-radius: var(--corn-radius-sm); background: var(--corn-hue-orange-soft); color: var(--corn-hue-orange-text); font-size: var(--corn-text-xs); line-height: 1.4; }
24
+ .hx-toggles { display: flex; flex-direction: column; gap: var(--corn-space-1); }
25
+ .hx-toggle-row { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: var(--corn-space-2) 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; transition: background 0.15s; }
26
+ .hx-toggle-row:hover { background: var(--corn-surface-3); }
27
+ .hx-toggle-row.is-off { background: color-mix(in srgb, var(--corn-ground) 40%, transparent); border-color: transparent; color: var(--corn-text-3); } /* off: dimmed by the fill, the text-3 colour and the dot, never by opacity on text */
28
+ .hx-toggle-label, .hx-toggle-meta { display: flex; align-items: center; gap: var(--corn-space-3); }
29
+ .hx-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; transition: transform 0.15s; }
30
+ .hx-toggle-row.is-off .hx-dot { transform: scale(0.75); opacity: 0.4; }
31
+ .hx-toggle-name { font-size: var(--corn-text-xs); font-weight: 500; color: var(--corn-text-2); }
32
+ .hx-toggle-row.is-off .hx-toggle-name { color: var(--corn-text-3); text-decoration: line-through; }
33
+ .hx-count { padding: calc(var(--corn-space-1) / 2) var(--corn-space-2); border-radius: var(--corn-radius-xs); background: var(--corn-surface-3); color: var(--corn-text-2); font-size: var(--corn-text-2xs); }
34
+ .hx-toggle-row.is-off .hx-count { background: color-mix(in srgb, var(--corn-ground) 40%, transparent); color: var(--corn-text-3); }
35
+ .hx-tick { font-size: var(--corn-text-sm); font-weight: 700; color: var(--corn-ok); }
36
+ .hx-toggle-row.is-off .hx-tick { color: var(--corn-text-3); }
37
+ .hx-legend-row { display: flex; align-items: center; gap: var(--corn-space-3); padding: calc(var(--corn-space-1) / 2) 0; color: var(--corn-text-2); }
38
+ .hx-legend-row--split { justify-content: space-between; }
39
+ .hx-legend-label { display: flex; align-items: center; gap: var(--corn-space-3); font-weight: 500; }
40
+ .hx-legend-swatch { width: 16px; flex: none; display: inline-flex; justify-content: center; }
41
+ .hx-swatch-line { display: inline-block; width: 16px; height: 2px; border-radius: var(--corn-radius-xs); }
42
+ .hx-swatch-indigo { border-top-color: var(--corn-accent-text); }
43
+ .hx-legend-row .hx-mark-dot { margin-right: 0; }
44
+ /* Numbers shown as data take the number face (a brand sets --corn-font-num; digits in a pixel face misread) */
45
+ .hx-count, .hx-layers-count { font-family: var(--corn-font-num); font-variant-numeric: tabular-nums; }
46
+ @media (prefers-reduced-motion: reduce) {
47
+ .hx-dot { transition: none; animation: none; }
48
+ }
49
+ @container corn-box (max-width: 767px) {
50
+ .hx-toggle-row { min-height: 44px; }
51
+ }
52
+ @media (pointer: coarse) {
53
+ .hx-toggle-row { min-height: 44px; }
54
+ }
55
+ /* ---------------------------------------------------------------------------
56
+ Project layers and finer kinds (spec 0009): the Layers menu holds its title (with All and None) while the rows scroll, the Overlays heading,
57
+ the "+N shown by the proposal" note and the kinds key under a row. Every colour is a token; a theme reaches each through its data-corn hook.
58
+ --------------------------------------------------------------------------- */
59
+ .hx-layers .hx-menu { display: flex; flex-direction: column; overflow: hidden; }
60
+ .hx-layers .hx-menu[hidden] { display: none; }
61
+ .hx-layers .hx-menu-head { flex: none; }
62
+ .hx-menu-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
63
+ .hx-overlays { margin-top: var(--corn-space-3); padding-top: var(--corn-space-3); border-top: var(--corn-border) solid var(--corn-line); }
64
+ .hx-layer-note { font-size: var(--corn-text-2xs); }
65
+ .hx-kinds { padding: 0 var(--corn-space-3) var(--corn-space-1) var(--corn-space-5); }
66
+ .hx-kinds-btn { display: inline-flex; align-items: center; gap: var(--corn-space-1); }
67
+ .hx-kind-keys { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: calc(var(--corn-space-1) / 2); }
68
+ .hx-kind-key { display: flex; align-items: center; gap: var(--corn-space-3); padding: calc(var(--corn-space-1) / 2) 0; color: var(--corn-text-2); font-size: var(--corn-text-xs); }
69
+ .hx-kind-letter { display: inline-flex; align-items: center; justify-content: center; min-width: 1.6em; padding: 0 var(--corn-space-1); border-radius: var(--corn-radius-xs); background: var(--corn-surface-3); color: var(--corn-text); font-family: var(--corn-mono); font-size: var(--corn-text-2xs); font-weight: 700; }
70
+ .hx-kind-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
71
+ @container corn-box (max-width: 767px) {
72
+ /* On a phone the menu spans the screen, at most 70% of its height */
73
+ /* fixed (spec 0011 D8): the menu spans the window under the chip, placed from the window's edges; its anchor is the header's corner, which is outside the piece's box */
74
+ .hx-layers .hx-menu { position: fixed; top: calc(56px + var(--corn-space-4) + 44px + var(--corn-space-2)); left: 12px; right: 12px; width: auto; max-width: none; max-height: 70cqh; }
75
+ /* An open menu is over the phone's sheets (the dock, z-index 45), not under them: else a proposal's sheet hides its last rows, which no scroll reaches */
76
+ .hx-header:has(.hx-layers .hx-menu:not([hidden])) { z-index: 46; }
77
+ .hx-kinds-btn { min-height: 44px; }
78
+ }
79
+ /* ---------------------------------------------------------------------------
80
+ The Key (spec 0008 D7, edge-key.js): each kind of line drawn with its real style and end mark. The map says the kind by line style
81
+ and mark, never by colour alone, so the swatches are one ink; a `when` is told by ticks (cloud-model.js WHEN_STYLES)
82
+ --------------------------------------------------------------------------- */
83
+ .hx-legend-swatch--wide { width: 44px; justify-content: flex-start; color: var(--corn-text-2); }
84
+ .hx-key-line { display: block; overflow: visible; }
85
+ .hx-key-note { margin: var(--corn-space-1) 0 0; font-size: var(--corn-text-xs); }
86
+ /* A fill under 3:1 on the menu keeps its colour and gets an outline: the map's own (--corn-map-stroke, set inline as --hx-dot-ring) when the theme sets one */
87
+ .hx-dot.is-ringed { outline: var(--corn-border) solid var(--hx-dot-ring, var(--corn-text-3)); outline-offset: 0; }
88
+ /* The swatch before a kind's letters: the theme's --corn-map-kind-<type>-<kind>; decoration, the letters and the name stay */
89
+ .hx-kind-swatch { margin-inline-end: calc(var(--corn-space-1) * -1); }
90
+ .hx-kind-swatch.is-blank { visibility: hidden; }
91
+ /* A Layers row the review hid: its name with "hidden while reviewing" under it */
92
+ .hx-toggle-text { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
@@ -0,0 +1,48 @@
1
+ /*
2
+ * live.css: the live layer
3
+ * The live chip in the toolbar and its menu (live.js, spec 0029). A part of cornfield's page shell for now: it is not one of D4's pieces,
4
+ * and its chip sits in the header.
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
+ @container corn-box (max-width: 767px) {
9
+ /* The live chip sits on the map too, left of Fit */
10
+ .hx-header .hx-live { position: absolute; top: calc(100% + var(--corn-space-4)); right: calc(var(--corn-space-4) + var(--corn-space-3) + var(--hx-control-h)); }
11
+ }
12
+ .hx-live-chip { max-width: 240px; min-width: 0; }
13
+ @container corn-box (min-width: 768px) {
14
+ .hx-live-chip-text { display: inline-block; min-width: 0; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
15
+ }
16
+ @container corn-box (min-width: 768px) and (max-width: 1023px) {
17
+ /* A narrow desktop (768 to 1023px): the header has no room for the chip's words beside a signed-in search, Work and account (a scenario's step
18
+ turns the live layer on, and the header ran 100px past the page). The chip is its dot, as on a phone; its line is in its menu and its name in aria-label */
19
+ .hx-live-chip-text { display: none; }
20
+ }
21
+ .hx-live-chip-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--corn-text-3); }
22
+ .hx-live[data-tone="ok"] .hx-live-chip-dot { background: var(--corn-ok); box-shadow: 0 0 calc(var(--corn-glow) * 0.75) color-mix(in srgb, var(--corn-ok) 70%, transparent); }
23
+ .hx-live[data-tone="stale"] .hx-live-chip-dot { background: var(--corn-changed); }
24
+ .hx-live[data-tone="error"] .hx-live-chip-dot { background: var(--corn-removed); box-shadow: 0 0 calc(var(--corn-glow) * 0.75) color-mix(in srgb, var(--corn-removed) 60%, transparent); }
25
+ .hx-live[data-tone="error"] .hx-live-chip { border-color: color-mix(in srgb, var(--corn-removed) 40%, transparent); }
26
+ .hx-menu--live { width: 320px; }
27
+ .hx-live-line { margin: 0 0 var(--corn-space-2); color: var(--corn-text-2); font-size: var(--corn-text-sm); line-height: 1.4; user-select: text; }
28
+ .hx-live-line--main { color: var(--corn-text); font-weight: 600; }
29
+ .hx-live-row { display: flex; align-items: center; justify-content: space-between; gap: var(--corn-space-3); margin-top: var(--corn-space-3); }
30
+ .hx-live-tag { margin-left: var(--corn-space-2); padding: 0 var(--corn-space-1); border-radius: var(--corn-radius-xs); background: var(--corn-ok-soft); color: var(--corn-ok); font-size: var(--corn-text-2xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
31
+ .hx-live-photo { display: block; max-width: 100%; max-height: 180px; margin: var(--corn-space-2) 0; border-radius: var(--corn-radius-sm); object-fit: cover; }
32
+ .hx-live-list { margin: var(--corn-space-1) 0 0; padding: 0 0 0 var(--corn-space-1); list-style: none; font-size: var(--corn-text-sm); line-height: 1.6; }
33
+ /* The token field (live.js): shown while the live layer is off for want of a token */
34
+ .hx-live-token { margin: var(--corn-space-3) 0 var(--corn-space-1); padding-top: var(--corn-space-3); border-top: var(--corn-border) solid var(--corn-line-soft); }
35
+ .hx-live-token-label { display: block; margin-bottom: var(--corn-space-1); color: var(--corn-text); font-size: var(--corn-text-sm); font-weight: 600; }
36
+ .hx-live-token-row { display: flex; gap: var(--corn-space-2); align-items: center; margin-bottom: var(--corn-space-2); }
37
+ .hx-live-token-input { flex: 1; min-width: 0; padding: var(--corn-space-2) var(--corn-space-3); font-size: var(--corn-text-sm); }
38
+ .hx-live-token-input:focus { outline: none; border-color: var(--corn-focus); }
39
+ .hx-live-help code { font-family: var(--corn-mono); font-size: var(--corn-text-2xs); color: var(--corn-text-2); overflow-wrap: anywhere; }
40
+ .hx-live-second { font-size: var(--corn-text-xs); }
41
+ .hx-live-buttons { display: inline-flex; gap: var(--corn-space-2); }
42
+ @container corn-box (max-width: 767px) {
43
+ /* On a phone the chip is its dot on the map (its line is in the menu), and the menu spans the screen under it */
44
+ .hx-live-chip { width: 44px; height: 44px; padding: 0; justify-content: center; border-radius: var(--corn-radius-pill); background: var(--corn-surface-1); box-shadow: var(--corn-shadow); }
45
+ /* fixed (spec 0011 D8): as the Layers menu: spans the window under the chip */
46
+ .hx-menu--live { position: fixed; top: calc(56px + var(--corn-space-4) + 44px); left: 12px; right: 12px; width: auto; max-width: none; }
47
+ }
48
+ :where(.hx-header) .hx-live-chip { height: var(--hx-control-h); }
@@ -0,0 +1,43 @@
1
+ /*
2
+ * map.css: the map
3
+ * The stage's contents: the map's canvases, the hint, the loading and error states, the marks of agent runs drawn over the map (runs-
4
+ * map.js). Read by corn-map (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
+ @container corn-box (max-width: 767px) {
9
+ .hx-stage .hx-hint { top: 68px; }
10
+ }
11
+ #graph-canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
12
+ #graph-canvas:active { cursor: grabbing; }
13
+ #label-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
14
+ /* The Canvas 2D that stands in for the map canvas when its WebGL2 shaders fail (renderer.js): same place, pointer goes through */
15
+ .hx-overlay { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; }
16
+ .hx-hint { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: var(--corn-space-2); max-width: 85cqw; padding: var(--corn-space-1) var(--corn-space-4); border-radius: var(--corn-radius-pill); font-size: var(--corn-text-2xs); color: var(--corn-text-2); pointer-events: none; z-index: 10; white-space: nowrap; }
17
+ .hx-hint span:last-child { overflow: hidden; text-overflow: ellipsis; }
18
+ @container corn-box (min-width: 640px) {
19
+ .hx-hint { font-size: var(--corn-text-xs); }
20
+ }
21
+ .hx-state { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: var(--corn-text-3); font-size: var(--corn-text-md); z-index: 5; text-align: center; }
22
+ .hx-state--error { display: flex; flex-direction: column; align-items: center; gap: var(--corn-space-3); width: min(440px, calc(100cqw - 32px)); padding: var(--corn-space-6); border-radius: var(--corn-radius-lg); color: var(--corn-text-2); user-select: text; }
23
+ .hx-state--error strong { color: var(--corn-bad); font-size: var(--corn-text-lg); }
24
+ .hx-state--error p { font-size: var(--corn-text-sm); line-height: 1.5; }
25
+ .hx-state--error #error-message { font-family: var(--corn-mono); color: var(--corn-warn); word-break: break-word; }
26
+ #graph-canvas.is-drawing-edge { touch-action: none; }
27
+ #graph-canvas:focus-visible { outline: var(--corn-focus-width) solid var(--corn-focus); outline-offset: calc(var(--corn-focus-width) * -1); }
28
+ .hx-run-overlay { position: absolute; inset: 0; z-index: 2; overflow: hidden; pointer-events: none; }
29
+ .hx-run-overlay[hidden] { display: none; }
30
+ .hx-run-mark { position: absolute; width: 0; height: 0; --r: 14px; }
31
+ .hx-run-ring { position: absolute; left: calc(var(--r) * -1); top: calc(var(--r) * -1); width: calc(var(--r) * 2); height: calc(var(--r) * 2); box-sizing: border-box; border-radius: 50%; border: var(--corn-border-strong) solid var(--corn-added); }
32
+ /* In flight: the ring pulses outward and fades; when motion is reduced it is a still, slightly thicker ring */
33
+ .hx-run-mark--flight .hx-run-ring { animation: hx-run-pulse 1.8s ease-out infinite; }
34
+ @keyframes hx-run-pulse { 0% { transform: scale(0.9); opacity: 1; } 100% { transform: scale(1.55); opacity: 0.1; } }
35
+ .hx-run-overlay.is-static .hx-run-ring { animation: none; transform: none; opacity: 1; border-width: calc(var(--corn-border-strong) + var(--corn-border)); }
36
+ @media (prefers-reduced-motion: reduce) {
37
+ .hx-run-ring { animation: none !important; transform: none; opacity: 1; border-width: calc(var(--corn-border-strong) + var(--corn-border)); }
38
+ }
39
+ /* Collision: dashed, a sign and words; the same ring whether or not colour is seen */
40
+ .hx-run-mark--collision .hx-run-ring { border: calc(var(--corn-border-strong) + var(--corn-border)) dashed var(--corn-map-collision); animation: none; }
41
+ .hx-run-tag { position: absolute; left: 0; top: calc(var(--r) + 4px); transform: translateX(-50%); white-space: nowrap; padding: calc(var(--corn-space-1) / 2) var(--corn-space-2); border-radius: var(--corn-radius-pill); border: var(--corn-border) solid var(--corn-map-collision); background: color-mix(in srgb, var(--corn-ground) 80%, transparent); color: var(--corn-map-collision); font-size: var(--corn-text-xs); font-weight: 700; }
42
+ .hx-run-swatch { display: inline-block; width: 14px; height: 14px; flex: none; box-sizing: border-box; border-radius: 50%; border: var(--corn-border-strong) solid var(--corn-added); }
43
+ .hx-run-swatch--collision { border: var(--corn-border-strong) dashed var(--corn-map-collision); }
@@ -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); }