bearminion 1.23.0 → 1.23.1
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.
- package/CHANGELOG.md +10 -0
- package/dist/hosted-overlay.js +1 -1
- package/dist/ui/mount.js +844 -606
- package/package.json +1 -1
- package/registry/default/registry.json +1 -1
package/dist/ui/mount.js
CHANGED
|
@@ -8,6 +8,217 @@ import { a as richLinkAt, c as updateRichLink, i as renderRichText, n as isSafeH
|
|
|
8
8
|
import { Component, Fragment, createContext, isValidElement, options, render } from "preact";
|
|
9
9
|
import { useContext, useEffect, useId, useLayoutEffect, useMemo, useRef, useState } from "preact/hooks";
|
|
10
10
|
import { Fragment as Fragment$1, jsx, jsxs } from "preact/jsx-runtime";
|
|
11
|
+
/** Below this window width the inspector starts closed, and closes itself once when the window shrinks past it. */
|
|
12
|
+
const INSPECTOR_CLOSE_BELOW = 1100;
|
|
13
|
+
const DEVICE_WIDTHS = {
|
|
14
|
+
tablet: 820,
|
|
15
|
+
mobile: 390
|
|
16
|
+
};
|
|
17
|
+
/** Whether the left navigation is open ('1') or a rail ('0'). Kept across visits. */
|
|
18
|
+
const NAV_OPEN_KEY = "bearminion:shell-nav-open";
|
|
19
|
+
const INSPECTOR_WIDTH_KEY = "bearminion:inspector-width";
|
|
20
|
+
/** Whether the inspector is open, kept for the browser session so a reload after a save looks the same. */
|
|
21
|
+
const INSPECTOR_OPEN_KEY = "bearminion:inspector-open";
|
|
22
|
+
/** The full-screen view that was up, so a reload after a save (which reloads the page) comes back to it. */
|
|
23
|
+
const VIEW_KEY = "bearminion:shell-view";
|
|
24
|
+
/** Settings screens. Most cover the canvas; the `SIDE_VIEWS` among them open beside it. */
|
|
25
|
+
const SETTINGS_VIEWS = [
|
|
26
|
+
"navigation",
|
|
27
|
+
"footer",
|
|
28
|
+
"site",
|
|
29
|
+
"design",
|
|
30
|
+
"seo"
|
|
31
|
+
];
|
|
32
|
+
/**
|
|
33
|
+
* Settings that open in the right-hand sidebar, in place of the inspector, with the page still on the canvas: their
|
|
34
|
+
* controls change what the header, the footer, the colours and the page show, so the result stays in view while they are edited.
|
|
35
|
+
*/
|
|
36
|
+
const SIDE_VIEWS = [
|
|
37
|
+
"navigation",
|
|
38
|
+
"footer",
|
|
39
|
+
"site",
|
|
40
|
+
"design"
|
|
41
|
+
];
|
|
42
|
+
function isSideView(view) {
|
|
43
|
+
return SIDE_VIEWS.includes(view);
|
|
44
|
+
}
|
|
45
|
+
/** The page is on the canvas: no view, or a settings sidebar beside it. */
|
|
46
|
+
function showsPage(view) {
|
|
47
|
+
return view === "canvas" || isSideView(view);
|
|
48
|
+
}
|
|
49
|
+
function listingView(type) {
|
|
50
|
+
return `listing:${type}`;
|
|
51
|
+
}
|
|
52
|
+
/** The content type a listing view shows, or null when the view is not a listing. */
|
|
53
|
+
function listingType(view) {
|
|
54
|
+
return view.startsWith("listing:") ? view.slice(8) : null;
|
|
55
|
+
}
|
|
56
|
+
/** A view read back from storage, or `canvas` when it is not one. */
|
|
57
|
+
function parseView(value) {
|
|
58
|
+
if (value === null) return "canvas";
|
|
59
|
+
if (value === "canvas" || value === "media") return value;
|
|
60
|
+
if (SETTINGS_VIEWS.includes(value)) return value;
|
|
61
|
+
if (/^listing:[a-z0-9][a-z0-9-]*$/.test(value)) return value;
|
|
62
|
+
return "canvas";
|
|
63
|
+
}
|
|
64
|
+
function clampInspectorWidth(width) {
|
|
65
|
+
return Math.min(560, Math.max(280, Number.isFinite(width) ? Math.round(width) : 352));
|
|
66
|
+
}
|
|
67
|
+
/** Where the page sits: below the top bar, between the navigation and the inspector. */
|
|
68
|
+
function canvasRect({ windowWidth, windowHeight, nav, inspector }) {
|
|
69
|
+
const left = nav === "open" ? 248 : nav === "rail" ? 64 : 0;
|
|
70
|
+
return {
|
|
71
|
+
top: 56,
|
|
72
|
+
left,
|
|
73
|
+
width: Math.max(0, windowWidth - left - Math.max(0, inspector)),
|
|
74
|
+
height: Math.max(0, windowHeight - 56)
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
/** "20 min ago", "3 h ago", "Yesterday", then the date ("12 Nov 2026"). Empty for a missing or broken time. */
|
|
78
|
+
function relativeTime(iso, now = Date.now()) {
|
|
79
|
+
if (!iso) return "";
|
|
80
|
+
const then = new Date(iso);
|
|
81
|
+
const time = then.getTime();
|
|
82
|
+
if (Number.isNaN(time)) return "";
|
|
83
|
+
const minutes = Math.max(0, Math.round((now - time) / 6e4));
|
|
84
|
+
if (minutes < 1) return "Just now";
|
|
85
|
+
if (minutes < 60) return `${minutes} min ago`;
|
|
86
|
+
const hours = Math.round(minutes / 60);
|
|
87
|
+
if (hours < 24) return `${hours} h ago`;
|
|
88
|
+
const today = new Date(now);
|
|
89
|
+
const yesterday = new Date(today.getFullYear(), today.getMonth(), today.getDate() - 1);
|
|
90
|
+
if (then.getFullYear() === yesterday.getFullYear() && then.getMonth() === yesterday.getMonth() && then.getDate() === yesterday.getDate()) return "Yesterday";
|
|
91
|
+
return then.toLocaleDateString("en-GB", {
|
|
92
|
+
day: "numeric",
|
|
93
|
+
month: "short",
|
|
94
|
+
year: "numeric"
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
const DEFAULT_LISTING_SORT = {
|
|
98
|
+
key: "updatedAt",
|
|
99
|
+
dir: "desc"
|
|
100
|
+
};
|
|
101
|
+
/** The home and 404 pages, singles and listing pages are never deleted from a listing. */
|
|
102
|
+
function canDeleteRow(row) {
|
|
103
|
+
return !row.home && !row.system && !row.fixed;
|
|
104
|
+
}
|
|
105
|
+
function statusCounts(rows) {
|
|
106
|
+
const counts = {
|
|
107
|
+
all: rows.length,
|
|
108
|
+
published: 0,
|
|
109
|
+
draft: 0,
|
|
110
|
+
unsaved: 0
|
|
111
|
+
};
|
|
112
|
+
for (const row of rows) counts[row.status] += 1;
|
|
113
|
+
return counts;
|
|
114
|
+
}
|
|
115
|
+
/** Rows whose title or slug holds the query (case and accents ignored), with the given status. */
|
|
116
|
+
function filterRows(rows, query, filter) {
|
|
117
|
+
const fold = (value) => value.normalize("NFD").replace(/[̀-ͯ]/g, "").toLowerCase();
|
|
118
|
+
const needle = fold(query.trim());
|
|
119
|
+
return rows.filter((row) => (filter === "all" || row.status === filter) && (needle === "" || fold(row.title).includes(needle) || fold(row.slug).includes(needle)));
|
|
120
|
+
}
|
|
121
|
+
const STATUS_ORDER = {
|
|
122
|
+
unsaved: 0,
|
|
123
|
+
draft: 1,
|
|
124
|
+
published: 2
|
|
125
|
+
};
|
|
126
|
+
/** A stable sort: rows that compare equal keep their order. A row with no update time sorts last either way. */
|
|
127
|
+
function sortRows(rows, sort, locale = "en") {
|
|
128
|
+
const collator = new Intl.Collator(locale, {
|
|
129
|
+
sensitivity: "base",
|
|
130
|
+
numeric: true
|
|
131
|
+
});
|
|
132
|
+
const sign = sort.dir === "asc" ? 1 : -1;
|
|
133
|
+
return rows.map((row, index) => ({
|
|
134
|
+
row,
|
|
135
|
+
index
|
|
136
|
+
})).sort((a, b) => {
|
|
137
|
+
let order = 0;
|
|
138
|
+
switch (sort.key) {
|
|
139
|
+
case "title":
|
|
140
|
+
order = collator.compare(a.row.title, b.row.title) * sign;
|
|
141
|
+
break;
|
|
142
|
+
case "path":
|
|
143
|
+
order = collator.compare(a.row.path, b.row.path) * sign;
|
|
144
|
+
break;
|
|
145
|
+
case "status":
|
|
146
|
+
order = (STATUS_ORDER[a.row.status] - STATUS_ORDER[b.row.status]) * sign;
|
|
147
|
+
break;
|
|
148
|
+
case "indexed":
|
|
149
|
+
order = (Number(a.row.indexed) - Number(b.row.indexed)) * sign;
|
|
150
|
+
break;
|
|
151
|
+
case "updatedAt": {
|
|
152
|
+
const x = a.row.updatedAt ? Date.parse(a.row.updatedAt) : NaN;
|
|
153
|
+
const y = b.row.updatedAt ? Date.parse(b.row.updatedAt) : NaN;
|
|
154
|
+
if (Number.isNaN(x) || Number.isNaN(y)) order = Number(Number.isNaN(x)) - Number(Number.isNaN(y));
|
|
155
|
+
else order = (x - y) * sign;
|
|
156
|
+
break;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
return order === 0 ? a.index - b.index : order;
|
|
160
|
+
}).map(({ row }) => row);
|
|
161
|
+
}
|
|
162
|
+
function paginate(rows, page, size = 10) {
|
|
163
|
+
const pages = Math.max(1, Math.ceil(rows.length / size));
|
|
164
|
+
const current = Math.min(pages, Math.max(1, Math.floor(page) || 1));
|
|
165
|
+
const start = (current - 1) * size;
|
|
166
|
+
const slice = rows.slice(start, start + size);
|
|
167
|
+
return {
|
|
168
|
+
rows: slice,
|
|
169
|
+
page: current,
|
|
170
|
+
pages,
|
|
171
|
+
range: rows.length === 0 ? "0 of 0" : `${start + 1}–${start + slice.length} of ${rows.length}`
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
/** "about-copy", then "about-copy-2", … : the first slug for a duplicate that is not taken yet. */
|
|
175
|
+
function copySlug(slug, taken) {
|
|
176
|
+
const base = `${slug}-copy`;
|
|
177
|
+
if (!taken.has(base)) return base;
|
|
178
|
+
for (let n = 2;; n += 1) if (!taken.has(`${base}-${n}`)) return `${base}-${n}`;
|
|
179
|
+
}
|
|
180
|
+
const JSON_LD_MAX_BYTES = 5e4;
|
|
181
|
+
/** What one card's text holds. An array or a pasted script tag is fine: Format splits it into one card per block. */
|
|
182
|
+
function checkBlockText(text) {
|
|
183
|
+
const parsed = parseJsonLdInput(text);
|
|
184
|
+
if (!parsed.ok) return {
|
|
185
|
+
state: "error",
|
|
186
|
+
message: parsed.error
|
|
187
|
+
};
|
|
188
|
+
if (parsed.value.length === 0) return {
|
|
189
|
+
state: "error",
|
|
190
|
+
message: "Empty. Paste a JSON-LD object or remove the block."
|
|
191
|
+
};
|
|
192
|
+
if (jsonLdWarnings(parsed.value).length > 0) return {
|
|
193
|
+
state: "warning",
|
|
194
|
+
message: "Missing @context or @type.",
|
|
195
|
+
blocks: parsed.value
|
|
196
|
+
};
|
|
197
|
+
return {
|
|
198
|
+
state: "valid",
|
|
199
|
+
message: "Valid JSON-LD.",
|
|
200
|
+
blocks: parsed.value
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
/** The `@type` and `@id` a card's header shows. */
|
|
204
|
+
function blockLabel(text) {
|
|
205
|
+
const parsed = parseJsonLdInput(text);
|
|
206
|
+
const first = parsed.ok ? parsed.value[0] : void 0;
|
|
207
|
+
const type = first?.["@type"];
|
|
208
|
+
const id = first?.["@id"];
|
|
209
|
+
return {
|
|
210
|
+
type: typeof type === "string" ? type : Array.isArray(type) ? type.join(", ") : first && "@graph" in first ? "@graph" : "Block",
|
|
211
|
+
id: typeof id === "string" ? id : ""
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
/** Each stored block as the text of its own card. */
|
|
215
|
+
function blockTexts(blocks) {
|
|
216
|
+
return (blocks ?? []).map((block) => formatJsonLd([block]));
|
|
217
|
+
}
|
|
218
|
+
/** Byte size of the blocks as `site.json` stores them, which is what the 50 KB limit counts. */
|
|
219
|
+
function jsonLdBytes(blocks) {
|
|
220
|
+
return JSON.stringify(blocks).length;
|
|
221
|
+
}
|
|
11
222
|
//#endregion
|
|
12
223
|
//#region ../../node_modules/.pnpm/@preact+signals-core@1.14.4/node_modules/@preact/signals-core/dist/signals-core.mjs
|
|
13
224
|
const i$1 = Symbol.for("preact-signals");
|
|
@@ -14392,7 +14603,7 @@ function attachReloadGuard({ doc, ui, session }) {
|
|
|
14392
14603
|
const id = doc.projectId.peek();
|
|
14393
14604
|
if (!id || !event.key) return;
|
|
14394
14605
|
if (!savedNoticeFor(event.key, id, doc.draftId.peek())) return;
|
|
14395
|
-
if (isForeignSave(event.newValue, tabId(), Date.now())) ui.
|
|
14606
|
+
if (isForeignSave(event.newValue, tabId(), Date.now())) ui.toasts.warning("Another tab saved this page.", { key: "foreign-save" });
|
|
14396
14607
|
};
|
|
14397
14608
|
const onBeforeUnload = (event) => {
|
|
14398
14609
|
if (!doc.dirty.peek() || session.isLeaving()) return;
|
|
@@ -14415,231 +14626,37 @@ function attachReloadGuard({ doc, ui, session }) {
|
|
|
14415
14626
|
} catch {}
|
|
14416
14627
|
};
|
|
14417
14628
|
}
|
|
14418
|
-
|
|
14419
|
-
|
|
14420
|
-
const
|
|
14421
|
-
|
|
14422
|
-
|
|
14423
|
-
|
|
14424
|
-
|
|
14425
|
-
|
|
14426
|
-
const
|
|
14427
|
-
|
|
14428
|
-
const
|
|
14429
|
-
/**
|
|
14430
|
-
|
|
14431
|
-
|
|
14432
|
-
|
|
14433
|
-
|
|
14434
|
-
|
|
14435
|
-
|
|
14436
|
-
|
|
14437
|
-
|
|
14438
|
-
]
|
|
14439
|
-
|
|
14440
|
-
|
|
14629
|
+
//#endregion
|
|
14630
|
+
//#region src/ui/page-frame.ts
|
|
14631
|
+
const FRAME_STYLE_ID = "bearminion-shell-frame";
|
|
14632
|
+
/** On `<html>` while the page is framed inside the editor shell. */
|
|
14633
|
+
const FRAMED_ATTR = "data-bearminion-shell";
|
|
14634
|
+
/** On each of the site's `position: fixed` elements while the page is framed. */
|
|
14635
|
+
const PINNED_ATTR = "data-bearminion-pinned";
|
|
14636
|
+
/** How far `<body>` is scrolled, on `<html>`, so pinned elements can move back by as much. */
|
|
14637
|
+
const SCROLL_VAR = "--bearminion-page-scroll";
|
|
14638
|
+
const MARGIN_TOP_VAR = "--bearminion-pin-mt";
|
|
14639
|
+
const MARGIN_BOTTOM_VAR = "--bearminion-pin-mb";
|
|
14640
|
+
/**
|
|
14641
|
+
* The page's own CSS while it sits in the canvas. `<body>` becomes the scroll container at the canvas rectangle, and
|
|
14642
|
+
* its transform makes it the containing block of the site's `position: fixed` elements, so a fixed header or cookie bar
|
|
14643
|
+
* stays inside the canvas and a sticky header sticks to the canvas top. Sizes the site set on `<body>` are overridden.
|
|
14644
|
+
*
|
|
14645
|
+
* A containing block that scrolls takes its fixed elements along, so each one is moved back by the scroll distance:
|
|
14646
|
+
* down by its top margin and up by its bottom one, which holds whichever edge it is anchored to.
|
|
14647
|
+
*/
|
|
14648
|
+
function frameCss(rect) {
|
|
14649
|
+
const body = `html[${FRAMED_ATTR}] > body`;
|
|
14650
|
+
return [
|
|
14651
|
+
`html[${FRAMED_ATTR}] { overflow: hidden !important; }`,
|
|
14652
|
+
`html[${FRAMED_ATTR}]:has(dialog:modal) > body { overflow: hidden !important; }`,
|
|
14653
|
+
`${body} [${PINNED_ATTR}] { margin-top: calc(var(${MARGIN_TOP_VAR}, 0px) + var(${SCROLL_VAR}, 0px)) !important; margin-bottom: calc(var(${MARGIN_BOTTOM_VAR}, 0px) - var(${SCROLL_VAR}, 0px)) !important; }`,
|
|
14654
|
+
`${body} { position: fixed !important; inset: auto !important; top: ${rect.top}px !important; left: ${rect.left}px !important; width: ${rect.width}px !important; height: ${rect.height}px !important; min-width: 0 !important; max-width: none !important; min-height: 0 !important; max-height: none !important; margin: 0 !important; overflow: auto !important; overscroll-behavior: contain; transform: translateZ(0) !important; }`
|
|
14655
|
+
].join("\n");
|
|
14441
14656
|
}
|
|
14442
|
-
/** The
|
|
14443
|
-
function
|
|
14444
|
-
return
|
|
14445
|
-
}
|
|
14446
|
-
/** A view read back from storage, or `canvas` when it is not one. */
|
|
14447
|
-
function parseView(value) {
|
|
14448
|
-
if (value === null) return "canvas";
|
|
14449
|
-
if (value === "canvas" || value === "media") return value;
|
|
14450
|
-
if (SETTINGS_VIEWS.includes(value)) return value;
|
|
14451
|
-
if (/^listing:[a-z0-9][a-z0-9-]*$/.test(value)) return value;
|
|
14452
|
-
return "canvas";
|
|
14453
|
-
}
|
|
14454
|
-
function clampInspectorWidth(width) {
|
|
14455
|
-
return Math.min(560, Math.max(280, Number.isFinite(width) ? Math.round(width) : 352));
|
|
14456
|
-
}
|
|
14457
|
-
/** Where the page sits: below the top bar, between the navigation and the inspector. */
|
|
14458
|
-
function canvasRect({ windowWidth, windowHeight, nav, inspector }) {
|
|
14459
|
-
const left = nav === "open" ? 248 : nav === "rail" ? 64 : 0;
|
|
14460
|
-
return {
|
|
14461
|
-
top: 56,
|
|
14462
|
-
left,
|
|
14463
|
-
width: Math.max(0, windowWidth - left - Math.max(0, inspector)),
|
|
14464
|
-
height: Math.max(0, windowHeight - 56)
|
|
14465
|
-
};
|
|
14466
|
-
}
|
|
14467
|
-
/** "20 min ago", "3 h ago", "Yesterday", then the date ("12 Nov 2026"). Empty for a missing or broken time. */
|
|
14468
|
-
function relativeTime(iso, now = Date.now()) {
|
|
14469
|
-
if (!iso) return "";
|
|
14470
|
-
const then = new Date(iso);
|
|
14471
|
-
const time = then.getTime();
|
|
14472
|
-
if (Number.isNaN(time)) return "";
|
|
14473
|
-
const minutes = Math.max(0, Math.round((now - time) / 6e4));
|
|
14474
|
-
if (minutes < 1) return "Just now";
|
|
14475
|
-
if (minutes < 60) return `${minutes} min ago`;
|
|
14476
|
-
const hours = Math.round(minutes / 60);
|
|
14477
|
-
if (hours < 24) return `${hours} h ago`;
|
|
14478
|
-
const today = new Date(now);
|
|
14479
|
-
const yesterday = new Date(today.getFullYear(), today.getMonth(), today.getDate() - 1);
|
|
14480
|
-
if (then.getFullYear() === yesterday.getFullYear() && then.getMonth() === yesterday.getMonth() && then.getDate() === yesterday.getDate()) return "Yesterday";
|
|
14481
|
-
return then.toLocaleDateString("en-GB", {
|
|
14482
|
-
day: "numeric",
|
|
14483
|
-
month: "short",
|
|
14484
|
-
year: "numeric"
|
|
14485
|
-
});
|
|
14486
|
-
}
|
|
14487
|
-
const DEFAULT_LISTING_SORT = {
|
|
14488
|
-
key: "updatedAt",
|
|
14489
|
-
dir: "desc"
|
|
14490
|
-
};
|
|
14491
|
-
/** The home and 404 pages, singles and listing pages are never deleted from a listing. */
|
|
14492
|
-
function canDeleteRow(row) {
|
|
14493
|
-
return !row.home && !row.system && !row.fixed;
|
|
14494
|
-
}
|
|
14495
|
-
function statusCounts(rows) {
|
|
14496
|
-
const counts = {
|
|
14497
|
-
all: rows.length,
|
|
14498
|
-
published: 0,
|
|
14499
|
-
draft: 0,
|
|
14500
|
-
unsaved: 0
|
|
14501
|
-
};
|
|
14502
|
-
for (const row of rows) counts[row.status] += 1;
|
|
14503
|
-
return counts;
|
|
14504
|
-
}
|
|
14505
|
-
/** Rows whose title or slug holds the query (case and accents ignored), with the given status. */
|
|
14506
|
-
function filterRows(rows, query, filter) {
|
|
14507
|
-
const fold = (value) => value.normalize("NFD").replace(/[̀-ͯ]/g, "").toLowerCase();
|
|
14508
|
-
const needle = fold(query.trim());
|
|
14509
|
-
return rows.filter((row) => (filter === "all" || row.status === filter) && (needle === "" || fold(row.title).includes(needle) || fold(row.slug).includes(needle)));
|
|
14510
|
-
}
|
|
14511
|
-
const STATUS_ORDER = {
|
|
14512
|
-
unsaved: 0,
|
|
14513
|
-
draft: 1,
|
|
14514
|
-
published: 2
|
|
14515
|
-
};
|
|
14516
|
-
/** A stable sort: rows that compare equal keep their order. A row with no update time sorts last either way. */
|
|
14517
|
-
function sortRows(rows, sort, locale = "en") {
|
|
14518
|
-
const collator = new Intl.Collator(locale, {
|
|
14519
|
-
sensitivity: "base",
|
|
14520
|
-
numeric: true
|
|
14521
|
-
});
|
|
14522
|
-
const sign = sort.dir === "asc" ? 1 : -1;
|
|
14523
|
-
return rows.map((row, index) => ({
|
|
14524
|
-
row,
|
|
14525
|
-
index
|
|
14526
|
-
})).sort((a, b) => {
|
|
14527
|
-
let order = 0;
|
|
14528
|
-
switch (sort.key) {
|
|
14529
|
-
case "title":
|
|
14530
|
-
order = collator.compare(a.row.title, b.row.title) * sign;
|
|
14531
|
-
break;
|
|
14532
|
-
case "path":
|
|
14533
|
-
order = collator.compare(a.row.path, b.row.path) * sign;
|
|
14534
|
-
break;
|
|
14535
|
-
case "status":
|
|
14536
|
-
order = (STATUS_ORDER[a.row.status] - STATUS_ORDER[b.row.status]) * sign;
|
|
14537
|
-
break;
|
|
14538
|
-
case "indexed":
|
|
14539
|
-
order = (Number(a.row.indexed) - Number(b.row.indexed)) * sign;
|
|
14540
|
-
break;
|
|
14541
|
-
case "updatedAt": {
|
|
14542
|
-
const x = a.row.updatedAt ? Date.parse(a.row.updatedAt) : NaN;
|
|
14543
|
-
const y = b.row.updatedAt ? Date.parse(b.row.updatedAt) : NaN;
|
|
14544
|
-
if (Number.isNaN(x) || Number.isNaN(y)) order = Number(Number.isNaN(x)) - Number(Number.isNaN(y));
|
|
14545
|
-
else order = (x - y) * sign;
|
|
14546
|
-
break;
|
|
14547
|
-
}
|
|
14548
|
-
}
|
|
14549
|
-
return order === 0 ? a.index - b.index : order;
|
|
14550
|
-
}).map(({ row }) => row);
|
|
14551
|
-
}
|
|
14552
|
-
function paginate(rows, page, size = 10) {
|
|
14553
|
-
const pages = Math.max(1, Math.ceil(rows.length / size));
|
|
14554
|
-
const current = Math.min(pages, Math.max(1, Math.floor(page) || 1));
|
|
14555
|
-
const start = (current - 1) * size;
|
|
14556
|
-
const slice = rows.slice(start, start + size);
|
|
14557
|
-
return {
|
|
14558
|
-
rows: slice,
|
|
14559
|
-
page: current,
|
|
14560
|
-
pages,
|
|
14561
|
-
range: rows.length === 0 ? "0 of 0" : `${start + 1}–${start + slice.length} of ${rows.length}`
|
|
14562
|
-
};
|
|
14563
|
-
}
|
|
14564
|
-
/** "about-copy", then "about-copy-2", … : the first slug for a duplicate that is not taken yet. */
|
|
14565
|
-
function copySlug(slug, taken) {
|
|
14566
|
-
const base = `${slug}-copy`;
|
|
14567
|
-
if (!taken.has(base)) return base;
|
|
14568
|
-
for (let n = 2;; n += 1) if (!taken.has(`${base}-${n}`)) return `${base}-${n}`;
|
|
14569
|
-
}
|
|
14570
|
-
const JSON_LD_MAX_BYTES = 5e4;
|
|
14571
|
-
/** What one card's text holds. An array or a pasted script tag is fine: Format splits it into one card per block. */
|
|
14572
|
-
function checkBlockText(text) {
|
|
14573
|
-
const parsed = parseJsonLdInput(text);
|
|
14574
|
-
if (!parsed.ok) return {
|
|
14575
|
-
state: "error",
|
|
14576
|
-
message: parsed.error
|
|
14577
|
-
};
|
|
14578
|
-
if (parsed.value.length === 0) return {
|
|
14579
|
-
state: "error",
|
|
14580
|
-
message: "Empty. Paste a JSON-LD object or remove the block."
|
|
14581
|
-
};
|
|
14582
|
-
if (jsonLdWarnings(parsed.value).length > 0) return {
|
|
14583
|
-
state: "warning",
|
|
14584
|
-
message: "Missing @context or @type.",
|
|
14585
|
-
blocks: parsed.value
|
|
14586
|
-
};
|
|
14587
|
-
return {
|
|
14588
|
-
state: "valid",
|
|
14589
|
-
message: "Valid JSON-LD.",
|
|
14590
|
-
blocks: parsed.value
|
|
14591
|
-
};
|
|
14592
|
-
}
|
|
14593
|
-
/** The `@type` and `@id` a card's header shows. */
|
|
14594
|
-
function blockLabel(text) {
|
|
14595
|
-
const parsed = parseJsonLdInput(text);
|
|
14596
|
-
const first = parsed.ok ? parsed.value[0] : void 0;
|
|
14597
|
-
const type = first?.["@type"];
|
|
14598
|
-
const id = first?.["@id"];
|
|
14599
|
-
return {
|
|
14600
|
-
type: typeof type === "string" ? type : Array.isArray(type) ? type.join(", ") : first && "@graph" in first ? "@graph" : "Block",
|
|
14601
|
-
id: typeof id === "string" ? id : ""
|
|
14602
|
-
};
|
|
14603
|
-
}
|
|
14604
|
-
/** Each stored block as the text of its own card. */
|
|
14605
|
-
function blockTexts(blocks) {
|
|
14606
|
-
return (blocks ?? []).map((block) => formatJsonLd([block]));
|
|
14607
|
-
}
|
|
14608
|
-
/** Byte size of the blocks as `site.json` stores them, which is what the 50 KB limit counts. */
|
|
14609
|
-
function jsonLdBytes(blocks) {
|
|
14610
|
-
return JSON.stringify(blocks).length;
|
|
14611
|
-
}
|
|
14612
|
-
//#endregion
|
|
14613
|
-
//#region src/ui/page-frame.ts
|
|
14614
|
-
const FRAME_STYLE_ID = "bearminion-shell-frame";
|
|
14615
|
-
/** On `<html>` while the page is framed inside the editor shell. */
|
|
14616
|
-
const FRAMED_ATTR = "data-bearminion-shell";
|
|
14617
|
-
/** On each of the site's `position: fixed` elements while the page is framed. */
|
|
14618
|
-
const PINNED_ATTR = "data-bearminion-pinned";
|
|
14619
|
-
/** How far `<body>` is scrolled, on `<html>`, so pinned elements can move back by as much. */
|
|
14620
|
-
const SCROLL_VAR = "--bearminion-page-scroll";
|
|
14621
|
-
const MARGIN_TOP_VAR = "--bearminion-pin-mt";
|
|
14622
|
-
const MARGIN_BOTTOM_VAR = "--bearminion-pin-mb";
|
|
14623
|
-
/**
|
|
14624
|
-
* The page's own CSS while it sits in the canvas. `<body>` becomes the scroll container at the canvas rectangle, and
|
|
14625
|
-
* its transform makes it the containing block of the site's `position: fixed` elements, so a fixed header or cookie bar
|
|
14626
|
-
* stays inside the canvas and a sticky header sticks to the canvas top. Sizes the site set on `<body>` are overridden.
|
|
14627
|
-
*
|
|
14628
|
-
* A containing block that scrolls takes its fixed elements along, so each one is moved back by the scroll distance:
|
|
14629
|
-
* down by its top margin and up by its bottom one, which holds whichever edge it is anchored to.
|
|
14630
|
-
*/
|
|
14631
|
-
function frameCss(rect) {
|
|
14632
|
-
const body = `html[${FRAMED_ATTR}] > body`;
|
|
14633
|
-
return [
|
|
14634
|
-
`html[${FRAMED_ATTR}] { overflow: hidden !important; }`,
|
|
14635
|
-
`html[${FRAMED_ATTR}]:has(dialog:modal) > body { overflow: hidden !important; }`,
|
|
14636
|
-
`${body} [${PINNED_ATTR}] { margin-top: calc(var(${MARGIN_TOP_VAR}, 0px) + var(${SCROLL_VAR}, 0px)) !important; margin-bottom: calc(var(${MARGIN_BOTTOM_VAR}, 0px) - var(${SCROLL_VAR}, 0px)) !important; }`,
|
|
14637
|
-
`${body} { position: fixed !important; inset: auto !important; top: ${rect.top}px !important; left: ${rect.left}px !important; width: ${rect.width}px !important; height: ${rect.height}px !important; min-width: 0 !important; max-width: none !important; min-height: 0 !important; max-height: none !important; margin: 0 !important; overflow: auto !important; overscroll-behavior: contain; transform: translateZ(0) !important; }`
|
|
14638
|
-
].join("\n");
|
|
14639
|
-
}
|
|
14640
|
-
/** The element that scrolls the page: `<body>` while framed, the document otherwise. */
|
|
14641
|
-
function pageScroller() {
|
|
14642
|
-
return document.documentElement.hasAttribute("data-bearminion-shell") ? document.body : document.scrollingElement ?? document.documentElement;
|
|
14657
|
+
/** The element that scrolls the page: `<body>` while framed, the document otherwise. */
|
|
14658
|
+
function pageScroller() {
|
|
14659
|
+
return document.documentElement.hasAttribute("data-bearminion-shell") ? document.body : document.scrollingElement ?? document.documentElement;
|
|
14643
14660
|
}
|
|
14644
14661
|
/**
|
|
14645
14662
|
* Put the page in the canvas, or move it there again after the shell changed size. `null` gives the page the window
|
|
@@ -14757,7 +14774,8 @@ function writeScroll(top) {
|
|
|
14757
14774
|
} catch {}
|
|
14758
14775
|
}
|
|
14759
14776
|
/**
|
|
14760
|
-
* Frames the page inside the shell: below the top bar, between the navigation and the inspector
|
|
14777
|
+
* Frames the page inside the shell: below the top bar, between the navigation and the inspector (or a settings
|
|
14778
|
+
* sidebar). The canvas follows
|
|
14761
14779
|
* the window size, the navigation (open, rail, or hidden in preview) and the inspector.
|
|
14762
14780
|
*/
|
|
14763
14781
|
function attachShell({ ui, chrome }) {
|
|
@@ -14776,7 +14794,8 @@ function attachShell({ ui, chrome }) {
|
|
|
14776
14794
|
let restored = false;
|
|
14777
14795
|
const stop = j(() => {
|
|
14778
14796
|
const previewing = ui.previewing.value;
|
|
14779
|
-
const
|
|
14797
|
+
const view = ui.view.value;
|
|
14798
|
+
const inspector = !previewing && (view === "canvas" && ui.open.value || isSideView(view));
|
|
14780
14799
|
framePage(canvasRect({
|
|
14781
14800
|
windowWidth: size.value.width,
|
|
14782
14801
|
windowHeight: size.value.height,
|
|
@@ -15394,14 +15413,18 @@ function createEdits(doc, preview) {
|
|
|
15394
15413
|
if (isPagePath(path)) updatePage(next, true);
|
|
15395
15414
|
else doc.setDoc(path, next);
|
|
15396
15415
|
}
|
|
15397
|
-
/**
|
|
15416
|
+
/**
|
|
15417
|
+
* Swap the image at `path`, keeping alt, fit and position of the one being replaced. Every image the page and site
|
|
15418
|
+
* schemas hold is an `{ src, alt }` record, so an empty slot (or a bare path left by an older editor) gets one too.
|
|
15419
|
+
*/
|
|
15398
15420
|
function replaceImage(path, src) {
|
|
15399
15421
|
const existing = getAt(doc.docFor(path), path);
|
|
15400
|
-
|
|
15401
|
-
|
|
15422
|
+
const kept = isRecord$2(existing) ? existing : {};
|
|
15423
|
+
writeField(path, {
|
|
15424
|
+
...kept,
|
|
15402
15425
|
src,
|
|
15403
|
-
alt: typeof
|
|
15404
|
-
}
|
|
15426
|
+
alt: typeof kept.alt === "string" && kept.alt || "Image"
|
|
15427
|
+
});
|
|
15405
15428
|
if (isPagePath(path)) preview.schedulePage();
|
|
15406
15429
|
}
|
|
15407
15430
|
function takePending() {
|
|
@@ -16058,6 +16081,198 @@ const browserCodec = { async toWebp(file, { maxWidth, quality }) {
|
|
|
16058
16081
|
}
|
|
16059
16082
|
} };
|
|
16060
16083
|
//#endregion
|
|
16084
|
+
//#region src/ui/state/toasts.ts
|
|
16085
|
+
/**
|
|
16086
|
+
* Errors and warnings shown over the editor, newest in front, older ones stacked behind. They stay until the user
|
|
16087
|
+
* dismisses them; the editor only removes one itself when what it reported no longer holds (a later save succeeded).
|
|
16088
|
+
*/
|
|
16089
|
+
function createToasts() {
|
|
16090
|
+
/** Oldest first. */
|
|
16091
|
+
const list = y$1([]);
|
|
16092
|
+
let nextId = 1;
|
|
16093
|
+
function show(tone, title, options = {}) {
|
|
16094
|
+
const id = nextId;
|
|
16095
|
+
nextId += 1;
|
|
16096
|
+
const toast = {
|
|
16097
|
+
id,
|
|
16098
|
+
tone,
|
|
16099
|
+
title,
|
|
16100
|
+
lines: options.lines ?? [],
|
|
16101
|
+
...options.key ? { key: options.key } : {}
|
|
16102
|
+
};
|
|
16103
|
+
const kept = options.key ? list.peek().filter((item) => item.key !== options.key) : list.peek();
|
|
16104
|
+
list.value = [...kept, toast].slice(-12);
|
|
16105
|
+
return id;
|
|
16106
|
+
}
|
|
16107
|
+
function dismiss(id) {
|
|
16108
|
+
const next = list.peek().filter((item) => item.id !== id);
|
|
16109
|
+
if (next.length !== list.peek().length) list.value = next;
|
|
16110
|
+
}
|
|
16111
|
+
function dismissKey(key) {
|
|
16112
|
+
const next = list.peek().filter((item) => item.key !== key);
|
|
16113
|
+
if (next.length !== list.peek().length) list.value = next;
|
|
16114
|
+
}
|
|
16115
|
+
function clear() {
|
|
16116
|
+
if (list.peek().length > 0) list.value = [];
|
|
16117
|
+
}
|
|
16118
|
+
return {
|
|
16119
|
+
list,
|
|
16120
|
+
show,
|
|
16121
|
+
error: (title, options) => show("error", title, options),
|
|
16122
|
+
warning: (title, options) => show("warning", title, options),
|
|
16123
|
+
info: (title, options) => show("info", title, options),
|
|
16124
|
+
dismiss,
|
|
16125
|
+
dismissKey,
|
|
16126
|
+
clear
|
|
16127
|
+
};
|
|
16128
|
+
}
|
|
16129
|
+
//#endregion
|
|
16130
|
+
//#region src/ui/state/ui.ts
|
|
16131
|
+
/** Key of the toast a failed save shows. A later failure replaces it; a successful save removes it. */
|
|
16132
|
+
const SAVE_TOAST = "save";
|
|
16133
|
+
const FILE_LABELS = {
|
|
16134
|
+
page: "Page",
|
|
16135
|
+
site: "Site settings"
|
|
16136
|
+
};
|
|
16137
|
+
function issueLine(issue) {
|
|
16138
|
+
return `${issue.file ? `${FILE_LABELS[issue.file]} › ` : ""}${issue.path}: ${issue.message}`;
|
|
16139
|
+
}
|
|
16140
|
+
function createUiState() {
|
|
16141
|
+
/** Whether the inspector (Page and Section tabs) is open beside the canvas. */
|
|
16142
|
+
const open = y$1(true);
|
|
16143
|
+
const inspectorTab = y$1("page");
|
|
16144
|
+
const inspectorWidth = y$1(352);
|
|
16145
|
+
/** The left navigation: open with labels, or an icon rail. */
|
|
16146
|
+
const navOpen = y$1(true);
|
|
16147
|
+
/** What covers the canvas: nothing, a content listing, Media or a settings screen. */
|
|
16148
|
+
const view = y$1("canvas");
|
|
16149
|
+
/** Desktop edits the page itself; tablet and mobile show it in a device frame. */
|
|
16150
|
+
const viewport = y$1("desktop");
|
|
16151
|
+
const previewing = y$1(false);
|
|
16152
|
+
const status = y$1("Loading the page.");
|
|
16153
|
+
/** Where a save is: writing the files, then waiting for the page to reload with them. */
|
|
16154
|
+
const saveStage = y$1("idle");
|
|
16155
|
+
const issues = y$1([]);
|
|
16156
|
+
const selectedId = y$1(null);
|
|
16157
|
+
const hoverId = y$1(null);
|
|
16158
|
+
/** `data-editor-field` of the sidebar control to scroll to and focus. */
|
|
16159
|
+
const focusField = y$1(null);
|
|
16160
|
+
const picker = y$1(null);
|
|
16161
|
+
const addMenu = y$1(null);
|
|
16162
|
+
const confirm = y$1(null);
|
|
16163
|
+
const linkEdit = y$1(null);
|
|
16164
|
+
const headingBar = y$1(null);
|
|
16165
|
+
/** Where the rich-text bar sits, under the rich field being edited. */
|
|
16166
|
+
const rich = y$1(null);
|
|
16167
|
+
/** Which rich-text bar buttons are on at the caret or selection. */
|
|
16168
|
+
const richActive = y$1(null);
|
|
16169
|
+
const linkUrl = y$1("https://");
|
|
16170
|
+
/** Object path of the image whose picker is open over the page. */
|
|
16171
|
+
const pagePick = y$1(null);
|
|
16172
|
+
const dialog = y$1(null);
|
|
16173
|
+
const draftOffer = y$1(null);
|
|
16174
|
+
const gitState = y$1(null);
|
|
16175
|
+
/** Errors and warnings over the editor. They stay until dismissed, on every screen. */
|
|
16176
|
+
const toasts = createToasts();
|
|
16177
|
+
function selectSection(id) {
|
|
16178
|
+
n(() => {
|
|
16179
|
+
selectedId.value = id;
|
|
16180
|
+
hoverId.value = id;
|
|
16181
|
+
});
|
|
16182
|
+
}
|
|
16183
|
+
/** Back to the page with the Section tab of `id` open in the inspector. */
|
|
16184
|
+
function showSection(id) {
|
|
16185
|
+
n(() => {
|
|
16186
|
+
selectSection(id);
|
|
16187
|
+
inspectorTab.value = "section";
|
|
16188
|
+
open.value = true;
|
|
16189
|
+
view.value = "canvas";
|
|
16190
|
+
});
|
|
16191
|
+
}
|
|
16192
|
+
/** Cover the canvas with a listing, Media or a settings screen; `canvas` goes back to the page. */
|
|
16193
|
+
function openView(next) {
|
|
16194
|
+
n(() => {
|
|
16195
|
+
view.value = next;
|
|
16196
|
+
closePopovers();
|
|
16197
|
+
if (dialog.peek()?.kind === "history" || dialog.peek()?.kind === "changes") dialog.value = null;
|
|
16198
|
+
});
|
|
16199
|
+
}
|
|
16200
|
+
/** Close the link editor, the format bar, the add menu, the picker and the confirm. False when none was open. */
|
|
16201
|
+
function closePopovers() {
|
|
16202
|
+
if (!linkEdit.peek() && !headingBar.peek() && !addMenu.peek() && !picker.peek() && !confirm.peek()) return false;
|
|
16203
|
+
n(() => {
|
|
16204
|
+
linkEdit.value = null;
|
|
16205
|
+
headingBar.value = null;
|
|
16206
|
+
addMenu.value = null;
|
|
16207
|
+
picker.value = null;
|
|
16208
|
+
confirm.value = null;
|
|
16209
|
+
});
|
|
16210
|
+
return true;
|
|
16211
|
+
}
|
|
16212
|
+
/** Escape closes the top dialog first, then the section confirm. */
|
|
16213
|
+
function dismissDialog() {
|
|
16214
|
+
if (dialog.peek()) {
|
|
16215
|
+
dialog.value = null;
|
|
16216
|
+
return true;
|
|
16217
|
+
}
|
|
16218
|
+
if (confirm.peek()) {
|
|
16219
|
+
confirm.value = null;
|
|
16220
|
+
return true;
|
|
16221
|
+
}
|
|
16222
|
+
return false;
|
|
16223
|
+
}
|
|
16224
|
+
/**
|
|
16225
|
+
* A failed save: one toast that lists every issue (it replaces the previous save's), and the issues kept for the
|
|
16226
|
+
* fields they name, which mark themselves inline.
|
|
16227
|
+
*/
|
|
16228
|
+
function fail(message, problems = issues.peek()) {
|
|
16229
|
+
n(() => {
|
|
16230
|
+
issues.value = problems;
|
|
16231
|
+
status.value = message;
|
|
16232
|
+
toasts.error(problems.length > 0 ? `${message} Nothing was written.` : message, {
|
|
16233
|
+
key: SAVE_TOAST,
|
|
16234
|
+
lines: problems.map(issueLine)
|
|
16235
|
+
});
|
|
16236
|
+
open.value = true;
|
|
16237
|
+
if (view.peek() === "canvas") inspectorTab.value = "page";
|
|
16238
|
+
});
|
|
16239
|
+
}
|
|
16240
|
+
return {
|
|
16241
|
+
open,
|
|
16242
|
+
inspectorTab,
|
|
16243
|
+
inspectorWidth,
|
|
16244
|
+
navOpen,
|
|
16245
|
+
view,
|
|
16246
|
+
viewport,
|
|
16247
|
+
previewing,
|
|
16248
|
+
status,
|
|
16249
|
+
saveStage,
|
|
16250
|
+
issues,
|
|
16251
|
+
selectedId,
|
|
16252
|
+
hoverId,
|
|
16253
|
+
focusField,
|
|
16254
|
+
picker,
|
|
16255
|
+
addMenu,
|
|
16256
|
+
confirm,
|
|
16257
|
+
linkEdit,
|
|
16258
|
+
headingBar,
|
|
16259
|
+
rich,
|
|
16260
|
+
richActive,
|
|
16261
|
+
linkUrl,
|
|
16262
|
+
pagePick,
|
|
16263
|
+
dialog,
|
|
16264
|
+
draftOffer,
|
|
16265
|
+
toasts,
|
|
16266
|
+
gitState,
|
|
16267
|
+
selectSection,
|
|
16268
|
+
showSection,
|
|
16269
|
+
openView,
|
|
16270
|
+
closePopovers,
|
|
16271
|
+
dismissDialog,
|
|
16272
|
+
fail
|
|
16273
|
+
};
|
|
16274
|
+
}
|
|
16275
|
+
//#endregion
|
|
16061
16276
|
//#region src/ui/state/session.ts
|
|
16062
16277
|
/** How long a save waits for the first load before giving up. */
|
|
16063
16278
|
const READY_TIMEOUT_MS = 8e3;
|
|
@@ -16200,7 +16415,7 @@ function createSession(doc, ui, edits, drafts) {
|
|
|
16200
16415
|
ui.status.value = "Edits stay in the browser until you save.";
|
|
16201
16416
|
} else ui.status.value = "This route is not a content page. Site settings are still editable.";
|
|
16202
16417
|
ui.draftOffer.value = queued.length > 0 ? null : drafts.readOffer(doc.draftId.peek(), nextPage ? savedPageJson : "", savedSiteJson);
|
|
16203
|
-
if (drafts.foreignSave(doc.draftId.peek())) ui.
|
|
16418
|
+
if (drafts.foreignSave(doc.draftId.peek())) ui.toasts.warning("Another tab saved this page.", { key: "foreign-save" });
|
|
16204
16419
|
});
|
|
16205
16420
|
ready = true;
|
|
16206
16421
|
markReady();
|
|
@@ -16258,6 +16473,7 @@ function createSession(doc, ui, edits, drafts) {
|
|
|
16258
16473
|
ui.draftOffer.value = null;
|
|
16259
16474
|
if (ui.dialog.peek()?.kind === "changes") ui.dialog.value = null;
|
|
16260
16475
|
ui.status.value = "Saved. The page reloads from disk.";
|
|
16476
|
+
ui.toasts.dismissKey(SAVE_TOAST);
|
|
16261
16477
|
});
|
|
16262
16478
|
return "saved";
|
|
16263
16479
|
}
|
|
@@ -16395,150 +16611,21 @@ function createSession(doc, ui, edits, drafts) {
|
|
|
16395
16611
|
const result = await getGit();
|
|
16396
16612
|
ui.gitState.value = result.ok ? result.value : null;
|
|
16397
16613
|
}
|
|
16398
|
-
return {
|
|
16399
|
-
start,
|
|
16400
|
-
load,
|
|
16401
|
-
save,
|
|
16402
|
-
saveAndGo,
|
|
16403
|
-
requestLeave,
|
|
16404
|
-
onContentReload,
|
|
16405
|
-
discardAndGo,
|
|
16406
|
-
loadGit,
|
|
16407
|
-
/** Autosave and the leave prompt apply only while the editor owns the page. */
|
|
16408
|
-
isActive: () => ready && !leaving,
|
|
16409
|
-
isLeaving: () => leaving,
|
|
16410
|
-
setNativeReload: (reload) => {
|
|
16411
|
-
nativeReload = reload;
|
|
16412
|
-
}
|
|
16413
|
-
};
|
|
16414
|
-
}
|
|
16415
|
-
//#endregion
|
|
16416
|
-
//#region src/ui/state/ui.ts
|
|
16417
|
-
function createUiState() {
|
|
16418
|
-
/** Whether the inspector (Page and Section tabs) is open beside the canvas. */
|
|
16419
|
-
const open = y$1(true);
|
|
16420
|
-
const inspectorTab = y$1("page");
|
|
16421
|
-
const inspectorWidth = y$1(352);
|
|
16422
|
-
/** The left navigation: open with labels, or an icon rail. */
|
|
16423
|
-
const navOpen = y$1(true);
|
|
16424
|
-
/** What covers the canvas: nothing, a content listing, Media or a settings screen. */
|
|
16425
|
-
const view = y$1("canvas");
|
|
16426
|
-
/** Desktop edits the page itself; tablet and mobile show it in a device frame. */
|
|
16427
|
-
const viewport = y$1("desktop");
|
|
16428
|
-
const previewing = y$1(false);
|
|
16429
|
-
const status = y$1("Loading the page.");
|
|
16430
|
-
/** Where a save is: writing the files, then waiting for the page to reload with them. */
|
|
16431
|
-
const saveStage = y$1("idle");
|
|
16432
|
-
const issues = y$1([]);
|
|
16433
|
-
const selectedId = y$1(null);
|
|
16434
|
-
const hoverId = y$1(null);
|
|
16435
|
-
/** `data-editor-field` of the sidebar control to scroll to and focus. */
|
|
16436
|
-
const focusField = y$1(null);
|
|
16437
|
-
const picker = y$1(null);
|
|
16438
|
-
const addMenu = y$1(null);
|
|
16439
|
-
const confirm = y$1(null);
|
|
16440
|
-
const linkEdit = y$1(null);
|
|
16441
|
-
const headingBar = y$1(null);
|
|
16442
|
-
/** Where the rich-text bar sits, under the rich field being edited. */
|
|
16443
|
-
const rich = y$1(null);
|
|
16444
|
-
/** Which rich-text bar buttons are on at the caret or selection. */
|
|
16445
|
-
const richActive = y$1(null);
|
|
16446
|
-
const linkUrl = y$1("https://");
|
|
16447
|
-
/** Object path of the image whose picker is open over the page. */
|
|
16448
|
-
const pagePick = y$1(null);
|
|
16449
|
-
const dialog = y$1(null);
|
|
16450
|
-
const draftOffer = y$1(null);
|
|
16451
|
-
const tabNotice = y$1(null);
|
|
16452
|
-
const gitState = y$1(null);
|
|
16453
|
-
function selectSection(id) {
|
|
16454
|
-
n(() => {
|
|
16455
|
-
selectedId.value = id;
|
|
16456
|
-
hoverId.value = id;
|
|
16457
|
-
});
|
|
16458
|
-
}
|
|
16459
|
-
/** Back to the page with the Section tab of `id` open in the inspector. */
|
|
16460
|
-
function showSection(id) {
|
|
16461
|
-
n(() => {
|
|
16462
|
-
selectSection(id);
|
|
16463
|
-
inspectorTab.value = "section";
|
|
16464
|
-
open.value = true;
|
|
16465
|
-
view.value = "canvas";
|
|
16466
|
-
});
|
|
16467
|
-
}
|
|
16468
|
-
/** Cover the canvas with a listing, Media or a settings screen; `canvas` goes back to the page. */
|
|
16469
|
-
function openView(next) {
|
|
16470
|
-
n(() => {
|
|
16471
|
-
view.value = next;
|
|
16472
|
-
closePopovers();
|
|
16473
|
-
if (dialog.peek()?.kind === "history" || dialog.peek()?.kind === "changes") dialog.value = null;
|
|
16474
|
-
});
|
|
16475
|
-
}
|
|
16476
|
-
/** Close the link editor, the format bar, the add menu, the picker and the confirm. False when none was open. */
|
|
16477
|
-
function closePopovers() {
|
|
16478
|
-
if (!linkEdit.peek() && !headingBar.peek() && !addMenu.peek() && !picker.peek() && !confirm.peek()) return false;
|
|
16479
|
-
n(() => {
|
|
16480
|
-
linkEdit.value = null;
|
|
16481
|
-
headingBar.value = null;
|
|
16482
|
-
addMenu.value = null;
|
|
16483
|
-
picker.value = null;
|
|
16484
|
-
confirm.value = null;
|
|
16485
|
-
});
|
|
16486
|
-
return true;
|
|
16487
|
-
}
|
|
16488
|
-
/** Escape closes the top dialog first, then the section confirm. */
|
|
16489
|
-
function dismissDialog() {
|
|
16490
|
-
if (dialog.peek()) {
|
|
16491
|
-
dialog.value = null;
|
|
16492
|
-
return true;
|
|
16493
|
-
}
|
|
16494
|
-
if (confirm.peek()) {
|
|
16495
|
-
confirm.value = null;
|
|
16496
|
-
return true;
|
|
16497
|
-
}
|
|
16498
|
-
return false;
|
|
16499
|
-
}
|
|
16500
|
-
/** Errors from a failed save, shown at the top of the inspector and of every full-screen view. */
|
|
16501
|
-
function fail(message, problems = issues.peek()) {
|
|
16502
|
-
n(() => {
|
|
16503
|
-
issues.value = problems;
|
|
16504
|
-
status.value = message;
|
|
16505
|
-
open.value = true;
|
|
16506
|
-
if (view.peek() === "canvas") inspectorTab.value = "page";
|
|
16507
|
-
});
|
|
16508
|
-
}
|
|
16509
|
-
return {
|
|
16510
|
-
open,
|
|
16511
|
-
inspectorTab,
|
|
16512
|
-
inspectorWidth,
|
|
16513
|
-
navOpen,
|
|
16514
|
-
view,
|
|
16515
|
-
viewport,
|
|
16516
|
-
previewing,
|
|
16517
|
-
status,
|
|
16518
|
-
saveStage,
|
|
16519
|
-
issues,
|
|
16520
|
-
selectedId,
|
|
16521
|
-
hoverId,
|
|
16522
|
-
focusField,
|
|
16523
|
-
picker,
|
|
16524
|
-
addMenu,
|
|
16525
|
-
confirm,
|
|
16526
|
-
linkEdit,
|
|
16527
|
-
headingBar,
|
|
16528
|
-
rich,
|
|
16529
|
-
richActive,
|
|
16530
|
-
linkUrl,
|
|
16531
|
-
pagePick,
|
|
16532
|
-
dialog,
|
|
16533
|
-
draftOffer,
|
|
16534
|
-
tabNotice,
|
|
16535
|
-
gitState,
|
|
16536
|
-
selectSection,
|
|
16537
|
-
showSection,
|
|
16538
|
-
openView,
|
|
16539
|
-
closePopovers,
|
|
16540
|
-
dismissDialog,
|
|
16541
|
-
fail
|
|
16614
|
+
return {
|
|
16615
|
+
start,
|
|
16616
|
+
load,
|
|
16617
|
+
save,
|
|
16618
|
+
saveAndGo,
|
|
16619
|
+
requestLeave,
|
|
16620
|
+
onContentReload,
|
|
16621
|
+
discardAndGo,
|
|
16622
|
+
loadGit,
|
|
16623
|
+
/** Autosave and the leave prompt apply only while the editor owns the page. */
|
|
16624
|
+
isActive: () => ready && !leaving,
|
|
16625
|
+
isLeaving: () => leaving,
|
|
16626
|
+
setNativeReload: (reload) => {
|
|
16627
|
+
nativeReload = reload;
|
|
16628
|
+
}
|
|
16542
16629
|
};
|
|
16543
16630
|
}
|
|
16544
16631
|
//#endregion
|
|
@@ -17357,7 +17444,7 @@ const FieldsContext = createContext({
|
|
|
17357
17444
|
});
|
|
17358
17445
|
//#endregion
|
|
17359
17446
|
//#region src/ui/info.tsx
|
|
17360
|
-
const GAP = 6;
|
|
17447
|
+
const GAP$1 = 6;
|
|
17361
17448
|
const MARGIN = 8;
|
|
17362
17449
|
/**
|
|
17363
17450
|
* Help for a field, kept out of the way: an info icon that shows the text in a tooltip on hover or focus, and pins it on
|
|
@@ -17384,7 +17471,7 @@ function Info({ text, label = "More info", id }) {
|
|
|
17384
17471
|
const width = Math.min(260, window.innerWidth - 16);
|
|
17385
17472
|
const height = bubble.offsetHeight;
|
|
17386
17473
|
const left = Math.max(MARGIN, Math.min(a.left + a.width / 2 - width / 2, window.innerWidth - width - MARGIN));
|
|
17387
|
-
const top = a.bottom + GAP + height <= window.innerHeight - MARGIN ? a.bottom + GAP : Math.max(MARGIN, a.top - GAP - height);
|
|
17474
|
+
const top = a.bottom + GAP$1 + height <= window.innerHeight - MARGIN ? a.bottom + GAP$1 : Math.max(MARGIN, a.top - GAP$1 - height);
|
|
17388
17475
|
setStyle(`left:${left}px;top:${top}px;width:${width}px;`);
|
|
17389
17476
|
};
|
|
17390
17477
|
place();
|
|
@@ -19933,24 +20020,6 @@ function DraftBanner() {
|
|
|
19933
20020
|
]
|
|
19934
20021
|
});
|
|
19935
20022
|
}
|
|
19936
|
-
function TabNotice() {
|
|
19937
|
-
const { ui } = useEditor();
|
|
19938
|
-
const notice = ui.tabNotice.value;
|
|
19939
|
-
if (!notice) return null;
|
|
19940
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
19941
|
-
class: "bm-banner bm-banner-light",
|
|
19942
|
-
role: "status",
|
|
19943
|
-
"aria-label": "Saved in another tab",
|
|
19944
|
-
style: "top:72px;right:16px;left:auto;transform:none;",
|
|
19945
|
-
children: [/* @__PURE__ */ jsx("span", { class: "bm-dot bm-dot-info" }), /* @__PURE__ */ jsx("div", {
|
|
19946
|
-
class: "bm-banner-text",
|
|
19947
|
-
children: /* @__PURE__ */ jsx("p", {
|
|
19948
|
-
class: "bm-banner-title",
|
|
19949
|
-
children: notice
|
|
19950
|
-
})
|
|
19951
|
-
})]
|
|
19952
|
-
});
|
|
19953
|
-
}
|
|
19954
20023
|
//#endregion
|
|
19955
20024
|
//#region src/ui/overlay/format-bars.tsx
|
|
19956
20025
|
/** Heading format bar: each button shows "Aa" in its own weight or font over a mono caption. */
|
|
@@ -21235,7 +21304,7 @@ function AdvancedLink({ edit }) {
|
|
|
21235
21304
|
}
|
|
21236
21305
|
//#endregion
|
|
21237
21306
|
//#region src/ui/editor.css?raw
|
|
21238
|
-
var editor_default = "/*\n * Editor styles. They live in a shadow root, so they never meet the site's Tailwind layer.\n * The editor is always light. Tokens and values follow the v4 editor design handoff.\n * The short names (--ink, --line, --accent ...) alias the --bm-* tokens so older rules read the same.\n */\n:host {\n all: initial;\n\n /* ---------- v4 tokens (editor-tokens.css) ---------- */\n --bm-font-ui: \"Bricolage Grotesque Variable\", \"Bricolage Grotesque\", ui-sans-serif, system-ui, sans-serif;\n --bm-font-mono: \"JetBrains Mono\", ui-monospace, SFMono-Regular, Menlo, monospace;\n --bm-font-serif: \"Instrument Serif\", Georgia, serif;\n\n --bm-ink: oklch(0.21 0.012 255);\n --bm-label: oklch(0.3 0.01 255);\n --bm-section: oklch(0.42 0.01 255);\n --bm-help: oklch(0.47 0.01 255);\n --bm-muted: oklch(0.5 0.01 255);\n --bm-icon: oklch(0.55 0.01 255);\n --bm-info: oklch(0.6 0.01 255);\n\n --bm-fill: oklch(0.955 0.003 250);\n --bm-fill-hover: oklch(0.93 0.004 250);\n --bm-fill-soft: oklch(0.965 0.003 250);\n --bm-fill-nested: oklch(0.97 0.003 250);\n --bm-border: oklch(0.88 0.005 250);\n --bm-divider: oklch(0.93 0.004 250);\n --bm-tab-rule: oklch(0.92 0.004 250);\n\n --bm-primary: oklch(0.46 0.13 145);\n --bm-primary-hover: oklch(0.4 0.12 145);\n --bm-primary-ring: oklch(0.46 0.13 145 / 0.15);\n --bm-link: oklch(0.4 0.12 145);\n\n --bm-saved-bg: oklch(0.94 0.045 145);\n --bm-saved-fg: oklch(0.36 0.1 145);\n --bm-unsaved-bg: oklch(0.95 0.05 80);\n --bm-unsaved-fg: oklch(0.48 0.1 60);\n --bm-unsaved-dot: oklch(0.75 0.15 70);\n --bm-badge-green-bg: oklch(0.93 0.06 145);\n --bm-badge-green-fg: oklch(0.38 0.1 145);\n --bm-badge-amber-bg: oklch(0.95 0.04 75);\n --bm-badge-amber-fg: oklch(0.45 0.09 60);\n\n --bm-danger: oklch(0.55 0.19 25);\n --bm-danger-text: oklch(0.52 0.17 25);\n --bm-danger-icon: oklch(0.58 0.18 25);\n --bm-danger-soft: oklch(0.96 0.025 20);\n\n --bm-diff-del-bg: oklch(0.97 0.02 20);\n --bm-diff-del-fg: oklch(0.45 0.13 25);\n --bm-diff-add-bg: oklch(0.96 0.04 145);\n --bm-diff-add-fg: oklch(0.34 0.1 145);\n\n --bm-switch-off: oklch(0.82 0.005 250);\n\n --bm-shadow-pop: 0 0 0 1px oklch(0.9 0.005 250), 0 16px 36px -16px oklch(0.2 0.02 255 / 0.35);\n --bm-shadow-dialog: 0 0 0 1px oklch(0.9 0.005 250), 0 24px 48px -24px oklch(0.2 0.02 255 / 0.35);\n --bm-shadow-segment-on: 0 1px 2px oklch(0 0 0 / 0.08), 0 0 0 1px oklch(0.9 0.005 250);\n\n /* ---------- aliases used by the rules below ---------- */\n --ink: var(--bm-ink);\n --ink-2: var(--bm-label);\n --muted: var(--bm-muted);\n --line: var(--bm-border);\n --line-soft: var(--bm-divider);\n --fill: var(--bm-fill);\n --fill-hover: var(--bm-fill-hover);\n --fill-soft: var(--bm-fill-soft);\n --accent: var(--bm-primary);\n --accent-hover: var(--bm-primary-hover);\n --accent-tint: oklch(0.96 0.03 145);\n --accent-ring: var(--bm-primary-ring);\n --warn-tint: var(--bm-unsaved-bg);\n --warn-ink: var(--bm-unsaved-fg);\n --warn-dot: var(--bm-unsaved-dot);\n --danger-hover: oklch(0.48 0.18 25);\n --danger-tint: var(--bm-danger-soft);\n --danger-ink: var(--bm-danger-text);\n --info-dot: oklch(0.6 0.15 255);\n --sans: var(--bm-font-ui);\n --mono: var(--bm-font-mono);\n --serif: var(--bm-font-serif);\n --shadow-pop: var(--bm-shadow-pop);\n}\n* {\n box-sizing: border-box;\n}\nbutton,\ninput,\nselect,\ntextarea {\n font: inherit;\n color: inherit;\n}\nbutton {\n cursor: pointer;\n}\n:focus-visible {\n outline: 2px solid var(--accent);\n outline-offset: 2px;\n}\n\n/* On-page outlines */\n.bm-outline {\n position: fixed;\n pointer-events: none;\n border-radius: 6px;\n z-index: 1;\n}\n.bm-outline-section {\n border: 2px solid var(--accent);\n}\n.bm-outline-field {\n border: 2px solid var(--accent);\n background: oklch(0.46 0.13 145 / 0.08);\n}\n.bm-image-bar {\n flex-wrap: nowrap;\n left: auto;\n white-space: nowrap;\n}\n.bm-image-bar-group {\n display: flex;\n gap: 2px;\n}\n.bm-image-bar button[aria-pressed=\"true\"] {\n background: var(--bm-saved-bg);\n color: var(--bm-saved-fg);\n}\n.bm-image-bar-grid {\n display: grid;\n grid-template-columns: repeat(3, 9px);\n grid-template-rows: repeat(3, 9px);\n gap: 2px;\n align-self: center;\n padding: 0 4px;\n}\n.bm-image-bar .bm-pos-cell {\n width: 9px;\n height: 9px;\n /* `.bm-rich button` sets a 32px minimum for the bar's text buttons; the cells stay 9px. */\n min-width: 0;\n min-height: 0;\n padding: 0;\n border-radius: 2px;\n background: var(--line);\n}\n.bm-image-bar .bm-pos-cell:hover:not(:disabled) {\n background: var(--muted);\n}\n.bm-image-bar .bm-pos-cell[aria-pressed=\"true\"] {\n background: var(--accent);\n}\n.bm-image-bar .bm-pos-cell:disabled {\n opacity: 0.3;\n cursor: default;\n}\n.bm-outline-image {\n background: oklch(0.46 0.13 145 / 0.12);\n}\n.bm-outline-image::after {\n content: \"Change image\";\n position: absolute;\n top: 8px;\n left: 8px;\n padding: 4px 9px;\n border-radius: 6px;\n background: var(--accent);\n color: #fff;\n font: 500 11px / 1.3 var(--sans, system-ui, sans-serif);\n}\n\n.bm-toolbar,\n.bm-chrome,\n.bm-popover,\n.bm-dialog,\n.bm-rich,\n.bm-banner,\n.bm-scrim {\n pointer-events: auto;\n font-family: var(--sans);\n font-size: 13px;\n color: var(--ink);\n -webkit-font-smoothing: antialiased;\n}\n\n/*\n * Insert between sections. Three states:\n * idle / hover a solid line and a 28px circle; hover changes nothing.\n * open the picker is open: the line stays and a \"between A and B\" chip replaces the circle.\n */\n.bm-gap {\n position: fixed;\n z-index: 2;\n height: 0;\n pointer-events: none;\n}\n.bm-gap::before {\n content: \"\";\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n height: 0;\n border-top: 2px solid var(--bm-primary);\n transform: translateY(-50%);\n}\n.bm-gap-add {\n position: absolute;\n left: 50%;\n top: 0;\n transform: translate(-50%, -50%);\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 6px;\n width: 28px;\n height: 28px;\n padding: 0;\n border: 0;\n border-radius: 999px;\n pointer-events: auto;\n cursor: pointer;\n white-space: nowrap;\n background: var(--bm-primary);\n color: #fff;\n box-shadow: 0 0 0 2px #fff;\n}\n.bm-gap-add .bm-icon {\n width: 14px;\n height: 14px;\n stroke-width: 2.4;\n}\n.bm-gap-add:focus-visible {\n outline: 2px solid var(--ink);\n outline-offset: 3px;\n}\n.bm-gap-chip {\n position: absolute;\n left: 50%;\n top: 0;\n transform: translate(-50%, -50%);\n padding: 4px 10px;\n border-radius: 999px;\n background: #fff;\n color: var(--bm-ink);\n box-shadow: 0 0 0 1.5px var(--bm-primary);\n white-space: nowrap;\n pointer-events: none;\n font-size: 12px;\n font-weight: 500;\n}\n\n/* Light floating bars: section toolbar, rich text bar, heading format bar */\n.bm-toolbar,\n.bm-rich {\n position: fixed;\n z-index: 7;\n display: flex;\n gap: 2px;\n padding: 4px;\n border-radius: 12px;\n background: #fff;\n color: var(--ink);\n box-shadow: var(--bm-shadow-pop);\n}\n.bm-toolbar button,\n.bm-rich button {\n border: 0;\n border-radius: 7px;\n background: transparent;\n color: inherit;\n min-height: 32px;\n padding: 0 10px;\n font-size: 12px;\n font-weight: 500;\n}\n.bm-toolbar button:hover:not(:disabled),\n.bm-rich button:hover {\n background: var(--fill);\n}\n.bm-rich button[aria-pressed=\"true\"] {\n background: var(--bm-saved-bg);\n box-shadow: inset 0 0 0 1px oklch(0.46 0.13 145 / 0.4);\n}\n.bm-toolbar :focus-visible,\n.bm-rich :focus-visible {\n outline-color: var(--accent);\n}\n.bm-toolbar {\n align-items: center;\n max-width: calc(100vw - 16px);\n padding: 5px;\n}\n.bm-toolbar button {\n width: 34px;\n min-height: 34px;\n height: 34px;\n padding: 0;\n border-radius: 8px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n color: oklch(0.4 0.01 255);\n}\n.bm-toolbar button:hover:not(:disabled) {\n background: var(--bm-fill);\n color: var(--bm-ink);\n}\n.bm-toolbar button:disabled {\n opacity: 0.35;\n cursor: default;\n}\n.bm-toolbar .bm-danger {\n color: var(--bm-danger-icon);\n}\n.bm-toolbar .bm-danger:hover:not(:disabled) {\n background: var(--bm-danger-soft);\n color: var(--bm-danger-icon);\n}\n.bm-toolbar-active {\n box-shadow:\n 0 0 0 2px var(--bm-primary),\n 0 10px 24px -12px oklch(0.2 0.02 255 / 0.35);\n}\n.bm-toolbar-name {\n display: block;\n max-width: 16rem;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n padding: 0 12px 0 10px;\n}\n.bm-toolbar-title {\n font-size: 14px;\n font-weight: 600;\n color: var(--bm-ink);\n}\n.bm-toolbar-anchor {\n font-family: var(--mono);\n font-size: 12px;\n font-weight: 400;\n color: var(--bm-muted);\n}\n.bm-sep {\n width: 1px;\n align-self: stretch;\n margin: 4px 2px;\n background: var(--line);\n}\n.bm-toolbar .bm-sep {\n align-self: center;\n height: 20px;\n margin: 0 4px;\n background: oklch(0.9 0.005 250);\n}\n.bm-icon {\n width: 16px;\n height: 16px;\n display: block;\n}\n.bm-rich {\n align-items: center;\n flex-wrap: wrap;\n max-width: calc(100vw - 16px);\n}\n.bm-rich button {\n min-height: 32px;\n min-width: 32px;\n}\n.bm-rich input {\n width: 168px;\n min-height: 30px;\n padding: 0 8px;\n border: 0;\n border-radius: 7px;\n background: var(--fill);\n color: var(--ink);\n font-size: 12px;\n}\n.bm-rich input:focus {\n outline: none;\n box-shadow: 0 0 0 2px var(--accent);\n}\n\n/* Heading format bar: each button shows \"Aa\" in its own weight or font over a mono caption. */\n.bm-rich.bm-format-bar {\n flex-wrap: nowrap;\n}\n.bm-rich.bm-format-bar button.bm-fmt {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 2px;\n min-width: 42px;\n height: 48px;\n min-height: 48px;\n padding: 0 8px;\n border-radius: 8px;\n}\n.bm-fmt-sample {\n font-size: 15px;\n line-height: 1;\n color: var(--bm-ink);\n}\n.bm-fmt-caption {\n font-family: var(--mono);\n font-size: 9px;\n letter-spacing: 0.02em;\n color: var(--bm-muted);\n}\n.bm-rich.bm-format-bar button.bm-fmt[aria-pressed=\"true\"] {\n background: var(--bm-saved-bg);\n box-shadow: inset 0 0 0 1px oklch(0.46 0.13 145 / 0.4);\n}\n.bm-format-bar .bm-sep {\n align-self: stretch;\n margin: 6px 4px;\n}\n\n/* Light popovers: add menu, section picker, edit link */\n.bm-popover {\n position: fixed;\n z-index: 7;\n display: flex;\n flex-direction: column;\n gap: 2px;\n min-width: 180px;\n max-height: min(420px, calc(100vh - 16px));\n overflow: auto;\n padding: 6px;\n border-radius: 12px;\n background: #fff;\n box-shadow: var(--bm-shadow-pop);\n}\n.bm-popover > button {\n display: flex;\n align-items: center;\n gap: 8px;\n min-height: 34px;\n padding: 0 10px;\n border: 0;\n border-radius: 7px;\n background: transparent;\n text-align: left;\n font-size: 13px;\n font-weight: 500;\n}\n.bm-popover > button:hover {\n background: var(--fill);\n}\n\n/* Add section picker: wireframe cards */\n.bm-popover[aria-label=\"Add section\"][role=\"listbox\"] {\n gap: 14px;\n width: 640px;\n max-width: calc(100vw - 16px);\n max-height: calc(100vh - 16px);\n padding: 16px;\n border-radius: 14px;\n overflow: visible;\n box-shadow: var(--bm-shadow-dialog);\n}\n.bm-picker-head {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n.bm-picker-title {\n font-size: 17px;\n font-weight: 600;\n letter-spacing: -0.01em;\n}\n.bm-picker-where {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 13px;\n color: var(--bm-muted);\n}\n.bm-picker-grid {\n display: grid;\n grid-template-columns: repeat(3, minmax(0, 1fr));\n gap: 10px;\n max-height: 26rem;\n overflow-y: auto;\n padding: 2px 6px 2px 2px;\n margin-right: -6px;\n scrollbar-gutter: stable;\n}\n.bm-popover .bm-picker-grid > button {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n justify-content: flex-start;\n gap: 6px;\n min-height: 0;\n padding: 8px 8px 10px;\n border: 1px solid oklch(0.9 0.005 250);\n border-radius: 10px;\n background: #fff;\n text-align: left;\n font-weight: 400;\n}\n.bm-popover .bm-picker-grid > button:hover {\n background: #fff;\n border-color: var(--bm-primary);\n box-shadow: 0 0 0 3px oklch(0.46 0.13 145 / 0.12);\n}\n.bm-wire {\n position: relative;\n display: block;\n width: 100%;\n height: 76px;\n border-radius: 7px;\n background: oklch(0.97 0 0);\n overflow: hidden;\n}\n.bm-wire > span {\n position: absolute;\n display: block;\n}\n.bm-type-text {\n display: flex;\n flex-direction: column;\n gap: 2px;\n padding: 0 2px;\n}\n.bm-type-name {\n font-size: 14px;\n font-weight: 600;\n line-height: 1.25;\n color: var(--bm-ink);\n}\n.bm-type-variants {\n font-family: var(--mono);\n font-size: 10px;\n font-weight: 400;\n line-height: 1.35;\n white-space: nowrap;\n color: var(--muted);\n}\n.bm-type-desc {\n padding: 0 2px;\n font-size: 12px;\n line-height: 1.4;\n color: var(--bm-help);\n}\n.bm-picker-note {\n margin: 0;\n font-size: 12px;\n color: var(--bm-muted);\n}\n\n.bm-popover[aria-label=\"Edit link\"] {\n gap: 14px;\n padding: 16px;\n max-height: calc(100vh - 16px);\n}\n\n/* Dialogs and banners */\n.bm-dialog {\n position: fixed;\n z-index: 6;\n display: flex;\n flex-direction: column;\n gap: 16px;\n width: min(400px, calc(100vw - 32px));\n padding: 20px;\n border-radius: 14px;\n background: #fff;\n box-shadow: var(--bm-shadow-dialog);\n}\n.bm-dialog-head {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: 12px;\n}\n.bm-dialog-heading {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n.bm-dialog-sub {\n margin: 0;\n font-size: 13px;\n line-height: 1.4;\n color: var(--bm-help);\n}\n.bm-dialog .bm-dialog-x,\n.bm-popover .bm-dialog-x,\n.bm-modal .bm-dialog-x {\n flex: none;\n width: 32px;\n height: 32px;\n margin: -6px -8px -6px 0;\n background: transparent;\n color: var(--bm-icon);\n}\n.bm-dialog-title {\n margin: 0;\n font-size: 17px;\n font-weight: 600;\n letter-spacing: -0.01em;\n color: var(--bm-ink);\n}\n.bm-popover .bm-dialog-title {\n font-size: 16px;\n}\n.bm-dialog .bm-note {\n color: var(--bm-label);\n font-size: 14px;\n line-height: 1.5;\n}\n.bm-dialog button,\n.bm-popover .bm-actions button,\n.bm-banner button {\n min-height: 38px;\n padding: 0 16px;\n border: 0;\n border-radius: 8px;\n background: var(--fill);\n font-size: 14px;\n font-weight: 400;\n}\n.bm-dialog button:hover:not(:disabled),\n.bm-popover .bm-actions button:hover:not(:disabled) {\n background: var(--fill-hover);\n}\n/* The primary action comes first in the DOM (focus lands on it); row-reverse shows it last, on the right. */\n.bm-actions {\n display: flex;\n flex-direction: row-reverse;\n justify-content: flex-start;\n align-items: center;\n gap: 8px;\n}\n.bm-dialog > .bm-actions,\n.bm-popover[aria-label=\"Edit link\"] > .bm-actions {\n padding-top: 12px;\n border-top: 1px solid var(--bm-divider);\n}\n.bm-dialog-foot {\n display: flex;\n align-items: center;\n gap: 8px;\n padding-top: 12px;\n border-top: 1px solid var(--bm-divider);\n}\n.bm-dialog-foot > .bm-hint {\n flex: 1;\n min-width: 0;\n margin: 0;\n}\n.bm-dialog-foot .bm-actions {\n flex: none;\n}\n\n/* Alert dialogs: [icon tile] [title / body / note] [x] */\n.bm-alert-main {\n display: flex;\n align-items: flex-start;\n gap: 12px;\n}\n.bm-alert-copy {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n.bm-alert-body {\n margin: 0;\n font-size: 14px;\n line-height: 1.5;\n color: var(--bm-label);\n overflow-wrap: anywhere;\n}\n.bm-alert-body strong {\n font-weight: 600;\n color: var(--bm-ink);\n}\n.bm-alert-note {\n margin: 0;\n font-size: 12px;\n line-height: 1.45;\n color: var(--bm-muted);\n}\n.bm-tile {\n flex: none;\n display: grid;\n place-items: center;\n width: 36px;\n height: 36px;\n border-radius: 9px;\n}\n.bm-tile .bm-icon {\n width: 18px;\n height: 18px;\n}\n.bm-tile-warn {\n background: var(--bm-unsaved-bg);\n color: var(--bm-unsaved-fg);\n}\n.bm-tile-danger {\n background: var(--bm-danger-soft);\n color: var(--bm-danger-icon);\n}\n.bm-tile-neutral {\n background: var(--bm-fill);\n color: var(--bm-label);\n}\n\n.bm-banner {\n position: fixed;\n z-index: 6;\n display: flex;\n align-items: center;\n gap: 12px;\n width: min(440px, calc(100vw - 32px));\n padding: 12px 14px;\n border-radius: 12px;\n box-shadow: 0 14px 34px -10px oklch(0.2 0.02 255 / 0.4);\n}\n.bm-banner button {\n min-height: 34px;\n padding: 0 14px;\n font-size: 13px;\n font-weight: 500;\n}\n.bm-banner-ink {\n background: var(--ink);\n color: #fff;\n}\n.bm-banner-light {\n background: #fff;\n box-shadow: var(--shadow-pop);\n}\n.bm-banner-text {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n.bm-banner-title {\n margin: 0;\n font-size: 13px;\n font-weight: 500;\n line-height: 1.35;\n}\n.bm-banner-sub {\n margin: 0;\n font-size: 12px;\n line-height: 1.4;\n opacity: 0.7;\n}\n.bm-banner .bm-actions {\n flex: none;\n gap: 6px;\n}\n.bm-banner-ink button {\n min-height: 30px;\n padding: 0 12px;\n font-size: 12px;\n background: oklch(1 0 0 / 0.12);\n color: #fff;\n}\n.bm-banner-ink button:hover {\n background: oklch(1 0 0 / 0.2);\n}\n.bm-banner-ink .bm-primary {\n background: #fff;\n color: var(--ink);\n}\n.bm-banner-ink .bm-primary:hover {\n background: oklch(0.94 0.003 250);\n}\n.bm-banner-ink :focus-visible {\n outline-color: oklch(0.82 0.14 145);\n}\n.bm-dot-stale {\n background: oklch(0.7 0.18 25) !important;\n}\n.bm-dot-info {\n background: var(--info-dot) !important;\n}\n\n/* Closed editor. The dock sits where the sidebar header's controls sit: header padding (top 14, right 14) minus the dock's 7px padding. */\n\n.bm-dot {\n flex: none;\n width: 8px;\n height: 8px;\n border-radius: 99px;\n background: oklch(0.72 0.17 145);\n}\n.bm-dot-dirty {\n background: var(--warn-dot);\n}\n\n/* Sidebar shell */\n\n/* Bear, name and slogan. Takes the space the controls leave; the text fades out when it no longer fits. */\n\n/* The same two lines, in a card left of the sidebar (over the page), level with the header, while the pointer is on\n the brand. 16px is the header's left padding: the card clears the sidebar edge by 10px. */\n\n/* A ring with one open quarter that turns while a save is written and the page reloads. */\n.bm-spin {\n flex: none;\n width: 14px;\n height: 14px;\n border: 2px solid currentColor;\n border-right-color: transparent;\n border-radius: 50%;\n animation: bm-spin 0.8s linear infinite;\n}\n@keyframes bm-spin {\n to {\n transform: rotate(360deg);\n }\n}\n@media (prefers-reduced-motion: reduce) {\n .bm-spin {\n animation: none;\n }\n}\n.bm-faces {\n display: grid;\n}\n.bm-face {\n grid-area: 1 / 1;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n white-space: nowrap;\n}\n.bm-face[hidden-face] {\n visibility: hidden;\n}\n.bm-save:disabled {\n opacity: 0.85;\n cursor: progress;\n}\n\n.bm-pill {\n flex: none;\n display: inline-flex;\n align-items: center;\n gap: 6px;\n height: 24px;\n padding: 0 10px;\n border-radius: 999px;\n background: var(--bm-saved-bg);\n color: var(--bm-saved-fg);\n font-size: 12px;\n font-weight: 500;\n}\n.bm-pill .bm-dot {\n width: 6px;\n height: 6px;\n background: var(--accent);\n}\n.bm-pill-dirty {\n background: var(--warn-tint);\n color: var(--warn-ink);\n}\n.bm-pill-dirty .bm-dot {\n background: var(--warn-dot);\n}\nbutton.bm-pill-btn {\n min-height: 0;\n padding: 0 10px;\n border: 0;\n border-radius: 999px;\n background: var(--warn-tint);\n color: var(--warn-ink);\n font-family: inherit;\n font-size: 12px;\n font-weight: 500;\n cursor: pointer;\n}\nbutton.bm-pill-btn:hover:not(:disabled) {\n background: oklch(0.93 0.06 75);\n color: var(--warn-ink);\n}\nbutton.bm-pill-btn:focus-visible {\n outline: 2px solid var(--accent);\n outline-offset: 2px;\n}\n.bm-dialog-wide {\n width: min(400px, calc(100vw - 32px));\n}\n.bm-dialog .bm-actions {\n flex-wrap: nowrap;\n}\n.bm-dialog .bm-actions button {\n flex: none;\n white-space: nowrap;\n}\n.bm-changes {\n width: min(540px, calc(100vw - 32px));\n}\n.bm-commit-files {\n list-style: none;\n margin: 0;\n padding: 0;\n display: flex;\n flex-direction: column;\n gap: 4px;\n max-height: min(34vh, 280px);\n overflow-y: auto;\n}\n.bm-commit-files label {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 13px;\n cursor: pointer;\n}\n.bm-commit-mark {\n font:\n 600 11px / 1 ui-monospace,\n monospace;\n width: 18px;\n text-align: center;\n opacity: 0.7;\n}\n.bm-commit-msg {\n width: 100%;\n box-sizing: border-box;\n resize: vertical;\n font: inherit;\n font-size: 14px;\n padding: 8px 12px;\n border: 1px solid var(--line);\n border-radius: 8px;\n background: transparent;\n color: inherit;\n}\n\n/* Unsaved changes review and version history: groups, rows, diff lines */\n.bm-changes-list {\n display: flex;\n flex-direction: column;\n gap: 16px;\n max-height: 22rem;\n overflow-y: auto;\n margin: 0 -4px;\n padding: 0 4px;\n}\n.bm-changes-group {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n.bm-changes-area {\n margin: 0;\n display: flex;\n align-items: baseline;\n gap: 8px;\n font-family: var(--mono);\n font-size: 11px;\n font-weight: 500;\n letter-spacing: 0.1em;\n text-transform: uppercase;\n color: var(--bm-section);\n}\n.bm-changes-file {\n font-weight: 400;\n letter-spacing: 0;\n text-transform: none;\n color: oklch(0.55 0.01 255);\n}\n.bm-changes-count {\n margin-left: auto;\n font-weight: 400;\n letter-spacing: 0;\n color: var(--bm-muted);\n}\n.bm-changes ul {\n display: flex;\n flex-direction: column;\n margin: 0;\n padding: 0;\n list-style: none;\n border: 1px solid var(--bm-border);\n border-radius: 10px;\n overflow: hidden;\n}\n.bm-change {\n display: flex;\n align-items: flex-start;\n gap: 10px;\n padding: 10px;\n font-size: 14px;\n line-height: 1.4;\n}\n.bm-change + .bm-change {\n border-top: 1px solid var(--bm-divider);\n}\n.bm-change-mark {\n flex: none;\n display: grid;\n place-items: center;\n width: 22px;\n height: 22px;\n border-radius: 6px;\n font-family: var(--mono);\n font-size: 13px;\n font-weight: 600;\n background: var(--bm-unsaved-bg);\n color: var(--bm-unsaved-fg);\n}\n.bm-change-added .bm-change-mark {\n background: var(--bm-badge-green-bg);\n color: var(--bm-badge-green-fg);\n}\n.bm-change-removed .bm-change-mark {\n background: var(--bm-danger-soft);\n color: var(--bm-danger-text);\n}\n.bm-change-body {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n.bm-change-field {\n font-weight: 500;\n color: var(--bm-ink);\n overflow-wrap: anywhere;\n}\n.bm-change-values {\n display: flex;\n flex-direction: column;\n gap: 3px;\n min-width: 0;\n}\n.bm-change-values del,\n.bm-change-values ins {\n display: flex;\n gap: 6px;\n min-width: 0;\n padding: 3px 7px;\n border-radius: 5px;\n text-decoration: none;\n font-size: 13px;\n}\n.bm-change-values del {\n background: var(--bm-diff-del-bg);\n color: var(--bm-diff-del-fg);\n}\n.bm-change-values ins {\n background: var(--bm-diff-add-bg);\n color: var(--bm-diff-add-fg);\n}\n.bm-change-values del::before {\n content: \"\\2212\";\n flex: none;\n font-family: var(--mono);\n}\n.bm-change-values ins::before {\n content: \"+\";\n flex: none;\n font-family: var(--mono);\n}\n.bm-change-values del > span,\n.bm-change-values ins > span {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.bm-change-values del > span {\n text-decoration: line-through;\n text-decoration-color: oklch(0.45 0.13 25 / 0.5);\n}\n.bm-changes-empty {\n margin: 0;\n padding: 24px 0;\n text-align: center;\n font-size: 14px;\n color: var(--bm-muted);\n}\n\n.bm-changes ul.bm-versions {\n gap: 0;\n}\n.bm-version {\n padding: 0;\n}\n.bm-version + .bm-version {\n border-top: 1px solid var(--bm-divider);\n}\n.bm-version-when strong {\n font-weight: 600;\n}\n.bm-tipped {\n position: relative;\n}\n.bm-tipped::after {\n content: attr(data-tip);\n position: absolute;\n right: calc(100% + 6px);\n top: 50%;\n transform: translateY(-50%);\n padding: 4px 8px;\n border-radius: 6px;\n background: var(--ink);\n color: #fff;\n font-size: 12px;\n font-weight: 500;\n line-height: 1.3;\n white-space: nowrap;\n pointer-events: none;\n visibility: hidden;\n z-index: 5;\n}\n.bm-version-row > .bm-tipped:first-child::after {\n right: auto;\n left: calc(100% + 6px);\n}\n.bm-tipped:hover::after,\n.bm-tipped:focus-visible::after {\n visibility: visible;\n}\n.bm-version-row {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 8px 8px 8px 10px;\n}\n.bm-version-when {\n flex: 1;\n min-width: 0;\n margin-right: auto;\n padding: 0 !important;\n min-height: 32px !important;\n font-weight: 500;\n display: flex !important;\n flex-direction: column;\n align-items: flex-start !important;\n justify-content: center;\n gap: 2px;\n text-align: left;\n}\n.bm-version-line {\n display: flex;\n align-items: baseline;\n gap: 8px;\n}\n.bm-version-sum {\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 12px;\n font-weight: 400;\n color: var(--bm-help);\n}\n.bm-version-row .bm-restore {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n flex: none;\n min-height: 32px;\n padding: 0 10px;\n border-radius: 7px;\n font-size: 13px;\n font-weight: 500;\n}\n.bm-version-rel {\n font-size: 14px;\n font-weight: 500;\n color: var(--bm-ink);\n}\n.bm-version-abs {\n font-family: var(--mono);\n font-size: 11px;\n color: var(--bm-muted);\n}\n.bm-version-diff {\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 4px 10px 12px 10px;\n border-top: 1px solid var(--bm-divider);\n margin-top: 0;\n}\n.bm-version-diff ul {\n margin: 0;\n}\n.bm-day {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n.bm-restored {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 8px 8px 8px 12px;\n border-radius: 9px;\n background: var(--bm-diff-add-bg);\n color: var(--bm-saved-fg);\n font-size: 13px;\n}\n.bm-restored > span {\n flex: 1;\n min-width: 0;\n}\n\n.bm-tabs {\n display: flex;\n gap: 0;\n padding: 0 12px;\n overflow-x: auto;\n border-bottom: 1px solid var(--bm-tab-rule);\n}\n.bm-tabs button {\n flex: 1 1 auto;\n height: 46px;\n padding: 0 6px;\n border: 0;\n border-radius: 0;\n background: transparent;\n color: oklch(0.48 0.01 255);\n font-size: 13px;\n font-weight: 400;\n}\n.bm-tabs button:hover {\n color: var(--ink);\n background: var(--fill-soft);\n}\n.bm-tabs button[aria-selected=\"true\"] {\n color: var(--ink);\n background: transparent;\n font-weight: 600;\n box-shadow: inset 0 -2px 0 var(--accent);\n}\n.bm-tabs button:focus-visible {\n outline-offset: -2px;\n}\n\n.bm-body {\n flex: 1;\n min-height: 0;\n overflow: auto;\n padding: 24px 24px 32px;\n display: flex;\n flex-direction: column;\n gap: 18px;\n}\n\n/* Group header: mono 11/500, then a 1px rule. With a right-hand item the rule sits on the flex wrapper. */\n.bm-group {\n margin: 18px 0 0;\n padding-bottom: 10px;\n border-bottom: 1px solid var(--bm-divider);\n font-family: var(--mono);\n font-size: 11px;\n font-weight: 500;\n letter-spacing: 0.1em;\n text-transform: uppercase;\n color: var(--bm-section);\n}\n.bm-group:first-child {\n margin-top: 0;\n}\n.bm-stack-tight > .bm-group {\n margin-bottom: 10px;\n}\n.bm-meta {\n margin: 0;\n font-family: var(--mono);\n font-size: 11px;\n color: var(--muted);\n}\n\n/* Fields */\n.bm-label {\n display: flex;\n flex-direction: column;\n gap: 8px;\n font-size: 13px;\n font-weight: 500;\n color: var(--bm-label);\n}\n.bm-field {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n.bm-hint {\n font-size: 12px;\n line-height: 1.45;\n font-weight: 400;\n color: var(--muted);\n}\n.bm-label-text {\n display: inline-flex;\n align-items: center;\n min-width: 0;\n}\n.bm-info {\n position: relative;\n display: inline-flex;\n align-items: center;\n vertical-align: middle;\n margin-left: 4px;\n}\n.bm-info-btn {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 20px;\n height: 20px;\n margin: -3px 0;\n border-radius: 999px;\n color: var(--bm-info);\n cursor: help;\n text-transform: none;\n letter-spacing: 0;\n}\n.bm-info-btn:hover,\n.bm-info-btn[aria-expanded=\"true\"] {\n color: var(--ink);\n}\n.bm-info-btn:focus-visible {\n outline: 2px solid var(--accent);\n outline-offset: 1px;\n}\n.bm-tip {\n position: fixed;\n z-index: 2147483647;\n visibility: hidden;\n pointer-events: none;\n padding: 8px 10px;\n border-radius: 8px;\n box-sizing: border-box;\n background: var(--ink);\n color: oklch(0.98 0.003 250);\n font-family: var(--sans, inherit);\n font-size: 12px;\n line-height: 1.45;\n font-weight: 400;\n text-transform: none;\n letter-spacing: 0;\n text-align: left;\n white-space: normal;\n box-shadow: 0 6px 20px rgb(0 0 0 / 0.25);\n}\n.bm-tip-open {\n visibility: visible;\n}\n:is(.bm-panel, .bm-popover, .bm-seo, .bm-consent) :where(input:not([type=\"checkbox\"]):not([type=\"file\"]), select, textarea) {\n width: 100%;\n min-height: 40px;\n padding: 0 12px;\n border: 1px solid var(--bm-border);\n border-radius: 8px;\n background: #fff;\n color: var(--ink);\n font-size: 14px;\n font-weight: 400;\n outline: none;\n}\n:is(.bm-panel, .bm-popover, .bm-seo, .bm-consent) textarea {\n padding: 8px 12px;\n min-height: 72px;\n line-height: 1.5;\n resize: vertical;\n}\n:is(.bm-panel, .bm-popover) select:not([size]) {\n appearance: none;\n padding-right: 32px;\n /* A caret made of gradients, not a `data:` image: a site's Content-Security-Policy can block those. */\n background-image: linear-gradient(45deg, transparent 50%, #777 50%), linear-gradient(135deg, #777 50%, transparent 50%);\n background-size: 6px 6px;\n background-repeat: no-repeat;\n background-position:\n right 17px center,\n right 12px center;\n}\n.bm-panel select[size],\n.bm-popover select[size] {\n padding: 4px;\n font-size: 12px;\n}\n.bm-panel select[size] option,\n.bm-panel select[size] optgroup,\n.bm-popover select[size] option,\n.bm-popover select[size] optgroup {\n padding: 3px 6px;\n}\n:is(.bm-panel, .bm-popover, .bm-seo, .bm-consent) :where(input:not([type=\"checkbox\"]):not([type=\"file\"]), select, textarea):focus {\n border-color: var(--bm-primary);\n box-shadow: 0 0 0 3px var(--bm-primary-ring);\n}\n:is(.bm-panel, .bm-popover, .bm-seo, .bm-consent) :where(input[aria-label=\"Link URL\"], .bm-mono) {\n font-family: var(--mono);\n font-size: 13px;\n}\n.bm-prefix-wrap {\n display: flex;\n align-items: center;\n min-height: 40px;\n border: 1px solid var(--bm-border);\n border-radius: 8px;\n background: #fff;\n overflow: hidden;\n}\n.bm-prefix-wrap:focus-within {\n border-color: var(--bm-primary);\n box-shadow: 0 0 0 3px var(--bm-primary-ring);\n}\n.bm-prefix {\n padding: 0 2px 0 12px;\n font-family: var(--mono);\n font-size: 13px;\n color: var(--muted);\n}\n.bm-prefix-wrap input {\n border: 0;\n box-shadow: none !important;\n min-height: 38px;\n padding-left: 2px;\n font-family: var(--mono);\n font-size: 13px;\n}\n.bm-stack {\n display: flex;\n flex-direction: column;\n gap: 18px;\n}\n.bm-stack-tight {\n gap: 8px;\n}\n.bm-groups {\n gap: 36px;\n}\n.bm-list {\n display: flex;\n flex-direction: column;\n border-radius: 10px;\n box-shadow: 0 0 0 1px var(--bm-border);\n overflow: hidden;\n}\n.bm-list-row {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 8px 10px 8px 12px;\n border-bottom: 1px solid var(--line-soft);\n}\n.bm-list-row:last-child {\n border-bottom: 0;\n}\n.bm-list-row-on {\n background: var(--accent-tint);\n}\n.bm-list-row a {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n color: var(--ink);\n text-decoration: none;\n}\n.bm-list-row a:hover .bm-list-title {\n text-decoration: underline;\n}\n.bm-list-title {\n font-size: 14px;\n font-weight: 500;\n}\n.bm-list-path {\n font-family: var(--mono);\n font-size: 11px;\n color: var(--muted);\n}\n.bm-badge-home {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n background: var(--bm-badge-green-bg);\n color: var(--bm-badge-green-fg);\n}\n.bm-badge {\n font-family: var(--mono);\n font-size: 11px;\n padding: 3px 7px;\n border-radius: 5px;\n background: var(--bm-badge-amber-bg);\n color: var(--bm-badge-amber-fg);\n}\n.bm-badge-system {\n background: var(--fill);\n color: var(--ink-2);\n}\n.bm-badge-on {\n background: var(--bm-badge-green-bg);\n color: var(--bm-badge-green-fg);\n}\n.bm-row {\n display: flex;\n gap: 6px;\n align-items: center;\n flex-wrap: wrap;\n}\n.bm-row-split {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 10px;\n}\n.bm-error {\n color: var(--danger-ink);\n font-size: 12px;\n font-weight: 400;\n margin: 0;\n}\n.bm-warn {\n color: var(--warn-ink);\n font-size: 12px;\n margin: 0;\n}\n.bm-note {\n margin: 0;\n color: var(--bm-help);\n font-size: 13px;\n line-height: 1.55;\n font-weight: 400;\n}\n.bm-group + .bm-note,\n.bm-group-split + .bm-note {\n margin-top: -4px;\n}\n\n/* Switch: 36 x 20, knob 16 inset 2 */\n.bm-check {\n flex-direction: row;\n align-items: center;\n gap: 10px;\n font-weight: 500;\n}\n:is(.bm-check, .bm-switch-row) input[type=\"checkbox\"] {\n appearance: none;\n position: relative;\n flex: none;\n width: 36px;\n height: 20px;\n margin: 0;\n border-radius: 999px;\n background: var(--bm-switch-off);\n cursor: pointer;\n transition: background 0.15s;\n}\n:is(.bm-check, .bm-switch-row) input[type=\"checkbox\"]::before {\n content: \"\";\n position: absolute;\n top: 2px;\n left: 2px;\n width: 16px;\n height: 16px;\n border-radius: 50%;\n background: #fff;\n box-shadow: 0 1px 2px oklch(0 0 0 / 0.2);\n transition: transform 0.15s;\n}\n:is(.bm-check, .bm-switch-row) input[type=\"checkbox\"]:checked {\n background: var(--bm-primary);\n}\n:is(.bm-check, .bm-switch-row) input[type=\"checkbox\"]:checked::before {\n transform: translateX(16px);\n}\n.bm-popover .bm-check {\n color: var(--bm-label);\n font-size: 14px;\n}\n\n/* Buttons inside the sidebar */\n.bm-panel :where(button:not([role=\"tab\"]):not([role=\"radio\"]):not(.bm-grip-handle)) {\n min-height: 32px;\n padding: 0 12px;\n border: 0;\n border-radius: 8px;\n background: var(--fill);\n color: var(--ink);\n font-size: 13px;\n font-weight: 500;\n}\n.bm-panel :where(button:not([role=\"tab\"]):not([role=\"radio\"]):not(.bm-grip-handle)):hover:not(:disabled) {\n background: var(--fill-hover);\n}\n.bm-panel button:disabled {\n opacity: 0.45;\n cursor: default;\n}\n/* Dashed \"Add ...\" buttons: Add link, Add button, Add column, Add item */\n.bm-panel .bm-add {\n min-height: 44px;\n background: oklch(0.985 0.002 250);\n color: var(--bm-link);\n border: 1px dashed oklch(0.85 0.005 250);\n border-radius: 8px;\n}\n.bm-panel .bm-add:hover:not(:disabled) {\n background: var(--accent-tint);\n}\n\n/* Cards, lists, images */\n.bm-card {\n position: relative;\n display: flex;\n flex-direction: column;\n gap: 10px;\n padding: 12px;\n border: 1px solid var(--bm-border);\n border-radius: 10px;\n background: #fff;\n}\n.bm-card .bm-card {\n background: var(--bm-fill-nested);\n border-color: var(--line-soft);\n}\n.bm-card > .bm-label:first-child:not(:only-child) {\n font-family: var(--mono);\n font-size: 11px;\n letter-spacing: 0.04em;\n font-weight: 500;\n color: var(--muted);\n}\n.bm-card[draggable=\"true\"] {\n cursor: grab;\n}\n/* Drag and drop: the target shows what a drop would do. */\n.bm-dragging {\n opacity: 0.4;\n}\n.bm-drop-before,\n.bm-drop-after,\n.bm-drop-child {\n --drop: var(--accent);\n}\n.bm-drop-before::before,\n.bm-drop-after::before {\n content: \"\";\n position: absolute;\n left: 0;\n right: 0;\n height: 3px;\n border-radius: 3px;\n background: var(--drop);\n box-shadow: 0 0 0 2px var(--accent-ring);\n pointer-events: none;\n z-index: 2;\n}\n.bm-drop-before::before {\n top: -6px;\n}\n.bm-drop-after::before {\n bottom: -6px;\n}\n.bm-drop-child {\n box-shadow: inset 0 0 0 2px var(--drop);\n background: var(--accent-tint);\n}\n.bm-drop-before::after,\n.bm-drop-after::after,\n.bm-drop-child::after,\n.bm-drop-files::after {\n content: attr(data-drop-hint);\n position: absolute;\n right: 8px;\n padding: 3px 8px;\n border-radius: 6px;\n background: var(--ink);\n color: #fff;\n font-size: 11px;\n font-weight: 500;\n line-height: 1.3;\n white-space: nowrap;\n pointer-events: none;\n z-index: 3;\n}\n.bm-drop-before::after {\n top: -22px;\n}\n.bm-drop-after::after {\n bottom: -22px;\n}\n.bm-drop-child::after {\n top: -11px;\n right: 12px;\n}\n.bm-drop-files {\n box-shadow: inset 0 0 0 2px var(--accent);\n background: var(--accent-tint);\n}\n.bm-drop-files::after {\n top: -11px;\n right: 12px;\n}\n.bm-thumb {\n width: 100%;\n height: 96px;\n object-fit: cover;\n border-radius: 7px;\n background: var(--fill);\n}\n.bm-drop {\n display: flex;\n flex-direction: column;\n gap: 8px;\n border: 1px dashed var(--line);\n border-radius: 10px;\n padding: 10px;\n background: var(--fill-soft);\n}\n.bm-drop input[type=\"file\"] {\n width: 100%;\n font-size: 12px;\n color: var(--muted);\n}\n.bm-drop input[type=\"file\"]::file-selector-button {\n height: 32px;\n margin-right: 10px;\n padding: 0 12px;\n border: 0;\n border-radius: 7px;\n background: var(--ink);\n color: #fff;\n font: inherit;\n font-size: 12px;\n font-weight: 500;\n cursor: pointer;\n}\n.bm-alert {\n display: flex;\n flex-direction: column;\n gap: 6px;\n padding: 12px 14px;\n border-radius: 12px;\n background: var(--danger-tint);\n box-shadow: 0 0 0 1px oklch(0.55 0.18 25 / 0.35);\n}\n.bm-alert-title {\n display: flex;\n align-items: center;\n gap: 8px;\n margin: 0;\n font-size: 13px;\n font-weight: 600;\n color: var(--danger-ink);\n}\n.bm-alert .bm-error {\n font-family: var(--mono);\n font-size: 11px;\n}\n.bm-alert-notice {\n background: var(--warn-tint);\n box-shadow: 0 0 0 1px oklch(0.45 0.09 65 / 0.2);\n}\n.bm-alert-notice .bm-note {\n color: var(--warn-ink);\n font-size: 12px;\n}\n\n/* Header actions */\n.bm-save {\n flex: none;\n display: inline-flex;\n align-items: center;\n gap: 8px;\n height: 34px;\n padding: 0 12px;\n border: 0;\n border-radius: 8px;\n background: var(--accent);\n color: #fff;\n font-size: 13px;\n font-weight: 600;\n}\n.bm-dialog .bm-primary kbd {\n font-family: var(--mono);\n font-size: 11px;\n font-weight: 400;\n margin-left: 8px;\n opacity: 0.8;\n}\n.bm-save kbd {\n font-family: var(--mono);\n font-size: 10px;\n font-weight: 400;\n opacity: 0.75;\n}\n/* Icon buttons: 32 x 32, transparent, grey icon, grey fill on hover. */\n.bm-icon-btn {\n flex: none;\n display: inline-grid;\n place-items: center;\n width: 32px;\n height: 32px;\n min-height: 0 !important;\n padding: 0 !important;\n border: 0;\n border-radius: 7px;\n background: transparent;\n color: var(--bm-icon);\n}\n.bm-icon-btn:hover:not(:disabled) {\n background: var(--bm-fill);\n color: var(--bm-ink);\n}\n.bm-icon-btn:disabled {\n opacity: 0.35;\n}\n.bm-close {\n width: 32px;\n height: 32px;\n background: transparent;\n color: var(--bm-icon);\n border-radius: 7px;\n}\n.bm-close:hover:not(:disabled) {\n background: var(--fill) !important;\n color: var(--ink);\n}\n\n.bm-panel .bm-icon-btn.bm-danger {\n color: var(--bm-danger-icon);\n}\n.bm-panel .bm-icon-btn.bm-danger:hover:not(:disabled) {\n background: var(--bm-danger-soft);\n color: var(--bm-danger-icon);\n}\n.bm-small {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n min-height: 28px !important;\n padding: 0 10px !important;\n font-family: var(--sans);\n font-size: 12px !important;\n letter-spacing: 0;\n text-transform: none;\n align-self: flex-start;\n}\n.bm-group-split {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n margin-top: 18px;\n margin-bottom: 0;\n padding-bottom: 10px;\n border-bottom: 1px solid var(--bm-divider);\n}\n.bm-group-split:first-child {\n margin-top: 0;\n}\n.bm-group-split > .bm-group {\n margin: 0;\n padding: 0;\n border: 0;\n}\n.bm-group-split .bm-small {\n text-transform: none;\n letter-spacing: 0;\n}\n.bm-group-split span.bm-small {\n font-family: var(--mono);\n font-size: 11px !important;\n font-weight: 400;\n color: var(--bm-muted);\n padding: 0 !important;\n min-height: 0 !important;\n}\n.bm-stack-tight > .bm-group-split {\n margin-bottom: 10px;\n}\n\n/* Labels with a right-hand tag */\n.bm-label.bm-label-row,\n.bm-label-row {\n flex-direction: row;\n display: flex;\n align-items: baseline;\n justify-content: space-between;\n gap: 8px;\n}\n.bm-meta-tag {\n font-family: var(--mono);\n font-size: 11px;\n font-weight: 400;\n letter-spacing: 0;\n color: var(--bm-muted);\n}\n\n/* Switch rows */\n.bm-switch-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 16px;\n cursor: pointer;\n}\n.bm-switch-text {\n display: flex;\n flex-direction: column;\n gap: 2px;\n min-width: 0;\n}\n.bm-switch-title {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n font-size: 14px;\n font-weight: 500;\n color: var(--bm-label);\n}\n\n/* Tone cards and segmented controls */\n.bm-tones {\n display: grid;\n grid-template-columns: repeat(4, 1fr);\n gap: 6px;\n}\n:is(.bm-panel, .bm-popover) .bm-tone {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n gap: 6px;\n min-height: 0;\n padding: 5px 5px 6px;\n border-radius: 9px;\n background: #fff;\n border: 0;\n box-shadow: inset 0 0 0 1px var(--bm-border);\n font-size: 12px;\n font-weight: 500;\n text-align: center;\n}\n:is(.bm-panel, .bm-popover) .bm-tone:hover {\n background: var(--fill-soft);\n}\n:is(.bm-panel, .bm-popover) .bm-tone[aria-checked=\"true\"] {\n box-shadow: inset 0 0 0 2px var(--accent);\n background: #fff;\n}\n.bm-tones-2 {\n grid-template-columns: repeat(2, 1fr);\n}\n.bm-tones-3 {\n grid-template-columns: repeat(3, 1fr);\n}\n/* A miniature of each button look, drawn with the editor's colours so it does not depend on the site theme. */\n.bm-btnsample {\n display: grid;\n place-items: center;\n height: 26px;\n border-radius: 6px;\n background: var(--fill-soft);\n}\n.bm-btnsample > span {\n display: block;\n font-size: 10px;\n font-weight: 600;\n line-height: 1;\n}\n.bm-btnsample-default > span {\n color: var(--ink-2);\n}\n.bm-btnsample-primary > span {\n padding: 5px 12px;\n border-radius: 999px;\n background: var(--accent);\n color: #fff;\n}\n.bm-btnsample-secondary > span {\n padding: 5px 12px;\n border-radius: 999px;\n color: var(--ink);\n box-shadow: inset 0 0 0 1px var(--ink-2);\n}\n.bm-btnsample-tertiary > span {\n color: var(--accent);\n text-decoration: underline;\n text-underline-offset: 3px;\n}\n.bm-swatch {\n display: inline-block;\n flex: none;\n width: 10px;\n height: 10px;\n border-radius: 3px;\n box-shadow: inset 0 0 0 1px oklch(0.2 0.02 255 / 0.15);\n}\n.bm-swatch-lg {\n display: block;\n width: auto;\n height: 22px;\n border-radius: 6px;\n}\n.bm-swatch-base {\n background: #fff;\n}\n.bm-swatch-subtle {\n background: oklch(0.96 0.005 250);\n}\n.bm-swatch-inverse {\n background: var(--ink);\n}\n.bm-swatch-brand {\n background: var(--accent);\n}\n.bm-segmented {\n display: flex;\n padding: 3px;\n border-radius: 9px;\n background: var(--bm-fill);\n}\n.bm-panel .bm-segmented button,\n.bm-dialog .bm-segmented button {\n flex: 1;\n min-height: 36px;\n height: 36px;\n padding: 0 8px;\n border: 0;\n border-radius: 7px;\n background: transparent;\n color: oklch(0.45 0.01 255);\n font-size: 13px;\n font-weight: 400;\n}\n.bm-panel .bm-segmented button:hover:not(:disabled),\n.bm-dialog .bm-segmented button:hover:not(:disabled) {\n background: oklch(1 0 0 / 0.5);\n}\n.bm-panel .bm-segmented button[aria-checked=\"true\"],\n.bm-dialog .bm-segmented button[aria-checked=\"true\"] {\n background: #fff;\n color: var(--ink);\n box-shadow: var(--bm-shadow-segment-on);\n}\n.bm-icon-picker {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));\n gap: 4px;\n padding: 3px;\n border-radius: 9px;\n background: var(--bm-fill);\n}\n.bm-panel .bm-icon-picker button {\n display: grid;\n place-items: center;\n min-height: 40px;\n height: 40px;\n padding: 0;\n border: 0;\n border-radius: 7px;\n background: transparent;\n color: oklch(0.45 0.01 255);\n}\n.bm-panel .bm-icon-picker button:hover {\n background: oklch(1 0 0 / 0.5);\n color: var(--ink);\n}\n.bm-panel .bm-icon-picker button[aria-checked=\"true\"] {\n background: #fff;\n color: var(--accent);\n box-shadow: var(--bm-shadow-segment-on);\n}\n.bm-icon-picker svg {\n width: 20px;\n height: 20px;\n}\n.bm-actions-split {\n display: flex;\n gap: 8px;\n padding-top: 4px;\n}\n.bm-actions-split button {\n flex: 1;\n min-height: 40px !important;\n font-size: 14px !important;\n}\n.bm-panel .bm-actions-split .bm-danger {\n background: var(--bm-danger-soft);\n}\n\n/* Arrays, links, images */\n.bm-array {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n.bm-array-row {\n position: relative;\n}\n.bm-array-grip {\n cursor: grab;\n}\n.bm-array-item {\n border: 1px solid var(--bm-border);\n border-radius: 10px;\n background: #fff;\n overflow: hidden;\n}\n.bm-array-item summary {\n display: flex;\n align-items: center;\n gap: 8px;\n min-height: 44px;\n padding: 0 8px 0 10px;\n font-size: 14px;\n font-weight: 500;\n color: var(--ink);\n cursor: pointer;\n list-style: none;\n}\n.bm-array-item summary::-webkit-details-marker {\n display: none;\n}\n.bm-array-item summary:hover {\n background: var(--fill-soft);\n}\n.bm-array-summary {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.bm-grip,\n.bm-chevron {\n display: inline-grid;\n place-items: center;\n color: oklch(0.65 0.01 255);\n}\n.bm-chevron {\n transition: transform 0.12s;\n}\ndetails[open] > summary .bm-chevron {\n transform: rotate(90deg);\n}\n.bm-array-body {\n display: flex;\n flex-direction: column;\n gap: 18px;\n padding: 12px;\n background: var(--bm-fill-nested);\n border-top: 1px solid var(--line-soft);\n}\n.bm-row-end {\n justify-content: flex-end;\n}\n.bm-panel .bm-add-row {\n width: 100%;\n}\n.bm-link-btn {\n display: flex;\n align-items: center;\n gap: 10px;\n width: 100%;\n min-height: 40px;\n padding: 0 12px;\n border: 1px solid var(--bm-border);\n border-radius: 8px;\n background: #fff;\n text-align: left;\n color: var(--ink-2);\n}\n.bm-panel .bm-link-btn {\n background: #fff;\n border: 1px solid var(--bm-border);\n font-size: 14px;\n padding: 0 12px;\n}\n.bm-panel .bm-link-btn:hover:not(:disabled) {\n background: #fff;\n border-color: oklch(0.8 0.005 250);\n}\n.bm-link-label {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: var(--ink);\n font-weight: 500;\n}\n.bm-link-href {\n font-family: var(--mono);\n font-size: 11px;\n color: var(--muted);\n max-width: 45%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.bm-stripes {\n background: repeating-linear-gradient(135deg, oklch(0.93 0.004 250) 0 6px, oklch(0.965 0.003 250) 6px 12px);\n}\n\n/* Image field: label above, compact 56px row, alt text under it */\n.bm-imagefield {\n position: relative;\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n.bm-image-row {\n display: flex;\n gap: 10px;\n align-items: center;\n}\n.bm-image-row .bm-thumb {\n flex: none;\n width: 56px;\n height: 56px;\n border-radius: 6px;\n}\n.bm-image-meta {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n gap: 6px;\n justify-content: center;\n}\n.bm-image-path {\n font-family: var(--mono);\n font-size: 12px;\n color: var(--bm-label);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.bm-panel .bm-alt {\n min-height: 40px;\n font-size: 14px;\n}\n.bm-image-actions {\n flex-wrap: nowrap;\n gap: 6px;\n}\n.bm-image-actions > button:not(.bm-icon-btn) {\n flex: 1;\n min-height: 36px;\n font-size: 13px;\n}\n.bm-layout {\n display: flex;\n flex-direction: column;\n gap: 10px;\n padding-top: 2px;\n}\n.bm-layout-row {\n display: grid;\n grid-template-columns: 56px 1fr;\n align-items: center;\n column-gap: 10px;\n row-gap: 4px;\n}\n.bm-layout-row .bm-label {\n margin: 0;\n}\n.bm-layout-row .bm-layout-hint {\n grid-column: 2;\n}\n.bm-position {\n display: grid;\n grid-template-columns: repeat(3, 20px);\n grid-template-rows: repeat(3, 20px);\n gap: 3px;\n padding: 4px;\n width: max-content;\n border-radius: 8px;\n background: var(--fill);\n}\n.bm-panel .bm-position-cell {\n width: 20px;\n height: 20px;\n min-height: 0;\n padding: 0;\n border: 0;\n border-radius: 5px;\n background: #fff;\n box-shadow: inset 0 0 0 1px var(--line);\n}\n.bm-panel .bm-position-cell:hover:not(:disabled) {\n background: var(--accent-tint);\n}\n.bm-panel .bm-position-cell[aria-checked=\"true\"],\n.bm-panel .bm-position-cell[aria-checked=\"true\"]:hover:not(:disabled) {\n background: var(--accent);\n box-shadow: none;\n}\n.bm-panel .bm-position-cell:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n}\n.bm-slot,\n.bm-dropzone {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 4px;\n width: 100%;\n min-height: 96px;\n padding: 14px;\n border: 1.5px dashed oklch(0.82 0.006 250);\n border-radius: 10px;\n background: var(--fill-soft);\n color: var(--ink-2);\n text-align: center;\n cursor: pointer;\n}\n.bm-panel .bm-slot:hover:not(:disabled),\n.bm-dropzone:hover {\n border-color: var(--accent);\n background: var(--accent-tint);\n}\n.bm-dropzone {\n min-height: 180px;\n position: relative;\n}\n.bm-dropzone:focus-within {\n outline: 2px solid var(--accent);\n outline-offset: 2px;\n}\n.bm-dropzone-over {\n border-color: var(--accent);\n background: var(--accent-tint);\n}\n.bm-slot-title {\n font-size: 13px;\n font-weight: 600;\n color: var(--ink);\n}\n.bm-slot-hint {\n font-size: 11px;\n color: var(--muted);\n}\n.bm-scrim {\n position: fixed;\n inset: 0;\n z-index: 7;\n display: flex;\n align-items: flex-start;\n justify-content: center;\n padding: 10vh 16px 16px;\n background: oklch(0.2 0.01 255 / 0.4);\n}\n.bm-modal {\n display: flex;\n flex-direction: column;\n width: min(480px, 100%);\n max-height: min(560px, 80vh);\n overflow: hidden;\n padding: 20px 0 0;\n border-radius: 14px;\n background: #fff;\n box-shadow: var(--bm-shadow-dialog);\n}\n.bm-modal-head {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 0 20px 12px;\n}\n.bm-modal-head .bm-dialog-title {\n flex: none;\n}\n.bm-modal-head .bm-meta-tag {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.bm-modal-head .bm-icon-btn {\n margin: -6px -8px -6px 0;\n}\n.bm-modal .bm-tabs {\n margin: 0 20px;\n padding: 3px;\n gap: 0;\n border: 0;\n border-radius: 9px;\n background: var(--bm-fill);\n overflow: visible;\n}\n.bm-modal .bm-tabs button {\n flex: 1;\n height: 36px;\n min-height: 36px;\n padding: 0 8px;\n border-radius: 7px;\n font-size: 13px;\n font-weight: 400;\n}\n.bm-modal .bm-tabs button:hover {\n background: oklch(1 0 0 / 0.5);\n}\n.bm-modal .bm-tabs button[aria-selected=\"true\"] {\n background: #fff;\n color: var(--ink);\n font-weight: 500;\n box-shadow: var(--bm-shadow-segment-on);\n}\n.bm-modal-body {\n flex: 1;\n min-height: 0;\n overflow: auto;\n padding: 16px 20px 20px;\n display: flex;\n flex-direction: column;\n gap: 10px;\n}\n.bm-library {\n display: grid;\n grid-template-columns: repeat(4, minmax(0, 1fr));\n gap: 10px;\n}\n.bm-library-item {\n position: relative;\n}\n.bm-library-pick {\n display: flex;\n flex-direction: column;\n gap: 4px;\n width: 100%;\n min-height: 0;\n padding: 4px;\n border: 0;\n border-radius: 9px;\n background: var(--fill-soft);\n text-align: left;\n font-family: var(--mono);\n font-size: 9px;\n font-weight: 400;\n color: var(--muted);\n word-break: break-all;\n cursor: pointer;\n}\n.bm-library-pick:hover {\n background: var(--fill-hover);\n}\n.bm-library-pick img {\n width: 100%;\n aspect-ratio: 1 / 1;\n object-fit: cover;\n border-radius: 6px;\n background: var(--fill);\n}\n.bm-library-pick[aria-pressed=\"true\"] {\n box-shadow: 0 0 0 2px var(--accent);\n background: var(--accent-tint);\n}\n.bm-library-delete {\n position: absolute;\n top: 8px;\n right: 8px;\n width: 24px;\n height: 24px;\n min-height: 0;\n background: #fff;\n box-shadow: 0 1px 3px oklch(0.2 0.01 255 / 0.25);\n opacity: 0;\n}\n.bm-library-item:hover .bm-library-delete,\n.bm-library-delete:focus-visible {\n opacity: 1;\n}\n.bm-library-empty {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 8px;\n}\n.bm-modal-confirm {\n display: flex;\n flex-direction: column;\n gap: 10px;\n padding: 14px 20px 16px;\n border-top: 1px solid var(--line-soft);\n background: var(--danger-tint);\n}\n.bm-modal-confirm .bm-note {\n color: var(--danger-ink);\n font-size: 13px;\n line-height: 1.5;\n}\n.bm-visually-hidden {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0 0 0 0);\n border: 0;\n white-space: nowrap;\n}\n.bm-popover-title {\n grid-column: 1 / -1;\n padding: 0;\n font-size: 16px;\n font-weight: 600;\n letter-spacing: -0.01em;\n color: var(--bm-ink);\n}\n.bm-popover-head {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0;\n}\n.bm-popover-head-wide {\n grid-column: 1 / -1;\n}\n.bm-popover[aria-label=\"Edit link\"],\n.bm-popover[aria-label=\"Add section\"][role=\"listbox\"] {\n z-index: 5;\n}\n.bm-popover :is(.bm-fmt-bold) {\n font-weight: 700;\n}\n.bm-fmt-bold {\n font-weight: 700;\n font-size: 13px;\n}\n.bm-fmt-heading {\n font-weight: 700;\n font-size: 12px;\n letter-spacing: -0.02em;\n}\n.bm-fmt-italic {\n font-family: var(--serif);\n font-style: italic;\n font-size: 15px;\n}\n\n/* Edit link: Advanced row */\n.bm-advanced {\n display: flex;\n flex-direction: column;\n gap: 14px;\n}\n.bm-popover button.bm-advanced-toggle {\n display: flex;\n align-items: center;\n gap: 6px;\n width: 100%;\n min-height: 32px;\n padding: 0 2px;\n border: 0;\n border-radius: 6px;\n background: transparent;\n color: var(--bm-label);\n font-size: 13px;\n font-weight: 500;\n text-align: left;\n}\n.bm-popover button.bm-advanced-toggle:hover {\n background: transparent;\n color: var(--bm-ink);\n}\n.bm-advanced-toggle .bm-chevron {\n transition: transform 0.12s;\n}\n.bm-advanced-toggle[aria-expanded=\"true\"] .bm-chevron {\n transform: rotate(90deg);\n}\n.bm-advanced-summary {\n margin-left: auto;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-family: var(--mono);\n font-size: 11px;\n font-weight: 400;\n color: var(--bm-muted);\n}\n\n/* SEO card and dialog */\n.bm-seo-card {\n display: flex;\n flex-direction: column;\n gap: 10px;\n}\n.bm-seo-badges {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n margin: 0;\n padding: 0;\n list-style: none;\n}\n.bm-seo-badge {\n padding: 2px 8px;\n border-radius: 999px;\n background: var(--fill-soft);\n color: var(--bm-label);\n font-family: var(--mono);\n font-size: 11px;\n}\n.bm-seo-edit,\n.bm-consent-edit {\n align-self: flex-start;\n display: inline-flex;\n align-items: center;\n gap: 6px;\n}\n.bm-dialog.bm-seo {\n position: relative;\n width: min(560px, 100%);\n max-height: calc(100vh - 10vh - 32px);\n min-height: 0;\n}\n.bm-seo-body {\n display: flex;\n flex-direction: column;\n gap: 20px;\n min-height: 0;\n overflow-y: auto;\n padding: 2px 4px 2px 2px;\n}\n.bm-seo-json {\n min-height: 220px;\n white-space: pre;\n overflow: auto;\n tab-size: 2;\n}\n.bm-seo-json[aria-invalid=\"true\"] {\n border-color: var(--bm-danger);\n}\n.bm-seo-format {\n align-self: flex-start;\n}\n\n/* Cookie banner dialog */\n.bm-dialog.bm-consent {\n position: relative;\n width: min(520px, 100%);\n max-height: calc(100vh - 10vh - 32px);\n min-height: 0;\n}\n.bm-consent-body {\n display: flex;\n flex-direction: column;\n gap: 20px;\n min-height: 0;\n overflow-y: auto;\n padding: 2px 4px 2px 2px;\n}\n.bm-consent-preview {\n display: flex;\n flex-direction: column;\n gap: 8px;\n padding: 14px 16px;\n border-radius: 12px;\n background: var(--fill-soft);\n}\n.bm-consent-preview-title {\n margin: 0;\n font-size: 15px;\n font-weight: 600;\n color: var(--bm-label);\n}\n.bm-consent-preview-text {\n margin: 0;\n font-size: 13px;\n line-height: 1.45;\n color: var(--bm-muted);\n overflow-wrap: anywhere;\n}\n.bm-consent-preview-link {\n text-decoration: underline;\n text-underline-offset: 3px;\n}\n.bm-consent-preview-buttons {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n}\n.bm-consent-preview-buttons > span {\n padding: 5px 14px;\n border-radius: 999px;\n box-shadow: inset 0 0 0 1px var(--bm-border);\n font-size: 13px;\n font-weight: 500;\n color: var(--bm-label);\n}\n\n/* SEO preview, OG row, outline */\n.bm-serp {\n display: flex;\n flex-direction: column;\n gap: 3px;\n padding: 12px 14px;\n border-radius: 10px;\n background: var(--fill-soft);\n}\n.bm-serp-image {\n flex-direction: row;\n align-items: flex-start;\n gap: 12px;\n}\n.bm-serp-text {\n display: flex;\n flex: 1;\n flex-direction: column;\n gap: 3px;\n min-width: 0;\n}\n.bm-serp-thumb {\n flex: none;\n width: 64px;\n height: 64px;\n border-radius: 8px;\n object-fit: cover;\n background: var(--fill);\n}\n.bm-serp-title {\n font-size: 15px;\n font-weight: 500;\n color: oklch(0.42 0.12 260);\n}\n.bm-serp-url {\n font-family: var(--mono);\n font-size: 11px;\n color: oklch(0.45 0.08 145);\n}\n.bm-serp-desc {\n font-size: 12px;\n line-height: 1.45;\n color: oklch(0.45 0.01 255);\n}\n.bm-outline-list {\n display: flex;\n flex-direction: column;\n gap: 8px;\n margin: 0;\n padding: 0;\n list-style: none;\n}\n.bm-panel .bm-outline-row {\n display: flex;\n align-items: center;\n gap: 10px;\n width: 100%;\n min-height: 40px;\n padding: 0 10px;\n border-radius: 8px;\n background: transparent;\n text-align: left;\n font-size: 14px;\n}\n.bm-panel .bm-outline-row:hover:not(:disabled) {\n background: var(--fill-soft);\n}\n\n/* Section rows (Pages tab): grip, tone swatch, name over #anchor and variant, then actions. */\n.bm-srow {\n position: relative;\n display: flex;\n align-items: center;\n gap: 4px;\n min-height: 52px;\n padding: 6px 6px 6px 8px;\n border: 1px solid var(--bm-border);\n border-radius: 10px;\n background: #fff;\n}\n.bm-srow:hover {\n border-color: oklch(0.8 0.008 250);\n}\n.bm-srow-grip {\n flex: none;\n width: 16px;\n height: 32px;\n display: inline-grid;\n place-items: center;\n cursor: grab;\n touch-action: none;\n}\n.bm-srow-grip:active {\n cursor: grabbing;\n}\n.bm-srow .bm-outline-row {\n flex: 1;\n min-width: 0;\n width: auto;\n padding: 0 8px 0 4px;\n gap: 10px;\n}\n.bm-srow .bm-swatch {\n width: 10px;\n height: 10px;\n border-radius: 2px;\n}\n.bm-srow-text {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n gap: 1px;\n}\n.bm-srow-name {\n font-size: 14px;\n font-weight: 500;\n color: var(--bm-ink);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.bm-srow-meta {\n font-family: var(--mono);\n font-size: 11px;\n font-weight: 400;\n color: var(--bm-muted);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.bm-srow .bm-outline-meta {\n flex: none;\n max-width: 40%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.bm-srow-btn {\n width: 32px;\n height: 32px;\n background: transparent;\n color: var(--bm-icon);\n border-radius: 7px;\n}\n.bm-srow-btn:disabled {\n opacity: 0.35;\n}\n.bm-panel .bm-srow-btn:hover:not(:disabled) {\n background: var(--bm-fill);\n color: var(--bm-ink);\n}\n.bm-panel .bm-srow-btn.bm-danger {\n color: var(--bm-danger-icon);\n}\n.bm-panel .bm-srow-btn.bm-danger:hover:not(:disabled) {\n background: var(--bm-danger-soft);\n}\n.bm-srow-sep {\n flex: none;\n width: 1px;\n height: 20px;\n margin: 0 2px;\n background: var(--bm-divider);\n}\n.bm-outline-n {\n width: 18px;\n font-family: var(--mono);\n font-size: 11px;\n color: oklch(0.55 0.01 255);\n}\n.bm-outline-label {\n flex: 1;\n min-width: 0;\n font-weight: 500;\n}\n.bm-outline-meta {\n font-family: var(--mono);\n font-size: 11px;\n font-weight: 400;\n color: var(--muted);\n}\n\n/* Navigation and footer link cards */\n.bm-nav-card {\n padding: 12px 12px 14px;\n gap: 10px;\n}\n.bm-nested {\n margin: 6px 0 0 16px;\n}\n.bm-nav-children {\n margin-top: -4px;\n}\n.bm-nav-head {\n display: flex;\n align-items: center;\n gap: 4px;\n}\n.bm-nav-head .bm-icon-btn,\n.bm-column-head .bm-icon-btn {\n background: var(--bm-fill);\n color: oklch(0.45 0.01 255);\n}\n.bm-nav-head .bm-icon-btn:hover:not(:disabled),\n.bm-column-head .bm-icon-btn:hover:not(:disabled) {\n background: var(--bm-fill-hover);\n color: var(--bm-ink);\n}\n.bm-panel .bm-nav-head .bm-icon-btn.bm-danger,\n.bm-panel .bm-column-head .bm-icon-btn.bm-danger {\n background: var(--bm-danger-soft);\n color: var(--bm-danger-icon);\n}\n.bm-panel .bm-nav-label {\n flex: 1;\n min-width: 0;\n min-height: 32px;\n padding: 0 8px;\n border-color: transparent;\n font-weight: 500;\n}\n.bm-panel .bm-nav-label:hover {\n border-color: var(--line);\n}\n.bm-column {\n padding: 0;\n gap: 0;\n}\n.bm-column-head {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 8px 10px;\n cursor: grab;\n}\n.bm-column-links > summary {\n display: flex;\n align-items: center;\n gap: 6px;\n min-height: 40px;\n padding: 0 12px;\n border-top: 1px solid var(--line-soft);\n font-size: 13px;\n font-weight: 500;\n color: var(--bm-label);\n cursor: pointer;\n list-style: none;\n}\n.bm-column-links > summary::-webkit-details-marker {\n display: none;\n}\n.bm-column-links > :not(summary) {\n margin: 10px 12px 0;\n}\n.bm-column-links > :last-child {\n margin-bottom: 12px;\n}\n\n/* Wordmark preview */\n.bm-card-head {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n}\n.bm-card-head .bm-label {\n flex: none;\n}\n.bm-combo {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n:is(.bm-panel, .bm-popover) .bm-combo-trigger {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 6px;\n width: auto;\n max-width: 140px;\n min-height: 38px;\n padding: 0 10px 0 12px;\n border: 0;\n border-left: 1px solid var(--bm-border);\n border-radius: 0;\n background: var(--fill-soft);\n color: var(--ink-2);\n font-family: var(--mono);\n font-size: 12px;\n font-weight: 400;\n text-align: left;\n}\n:is(.bm-panel, .bm-popover) .bm-combo-trigger:hover:not(:disabled) {\n background: var(--fill-hover);\n}\n:is(.bm-panel, .bm-popover) .bm-combo-trigger[aria-expanded=\"true\"] {\n background: var(--accent-tint);\n color: var(--accent-hover);\n}\n/* One URL field: the text input and the page picker share a single border. */\n.bm-linkfield {\n display: flex;\n align-items: stretch;\n min-height: 40px;\n border: 1px solid var(--bm-border);\n border-radius: 8px;\n background: #fff;\n overflow: hidden;\n}\n.bm-linkfield:focus-within {\n border-color: var(--bm-primary);\n box-shadow: 0 0 0 3px var(--bm-primary-ring);\n}\n.bm-linkfield > input {\n flex: 1;\n min-width: 0;\n border: 0 !important;\n box-shadow: none !important;\n border-radius: 0;\n min-height: 38px;\n background: transparent;\n}\n.bm-linkfield .bm-combo {\n flex: none;\n max-width: 45%;\n}\n.bm-linkfield .bm-combo-trigger {\n height: 100%;\n}\n.bm-linkfield .bm-combo-trigger:focus-visible {\n outline-offset: -2px;\n}\n.bm-combo-trigger > span {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.bm-combo-trigger .bm-combo-custom {\n color: var(--muted);\n}\n.bm-combo-panel {\n position: fixed;\n z-index: 6;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n gap: 6px;\n padding: 6px;\n border: 1px solid var(--bm-border);\n border-radius: 10px;\n background: #fff;\n box-shadow: 0 6px 18px oklch(0.2 0.02 255 / 0.1);\n}\n.bm-combo-list {\n max-height: 200px;\n overflow-y: auto;\n display: flex;\n flex-direction: column;\n}\n.bm-combo-group {\n margin: 6px 6px 2px;\n font-family: var(--mono);\n font-size: 10px;\n letter-spacing: 0.06em;\n text-transform: uppercase;\n color: var(--muted);\n}\n.bm-combo-option {\n display: flex;\n align-items: baseline;\n justify-content: space-between;\n gap: 10px;\n padding: 6px 8px;\n border-radius: 6px;\n font-size: 13px;\n color: var(--ink);\n cursor: pointer;\n}\n.bm-combo-option[aria-selected=\"true\"] {\n font-weight: 600;\n color: var(--accent-hover);\n}\n.bm-combo-active {\n background: var(--fill);\n}\n.bm-combo-value {\n flex: none;\n max-width: 50%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-family: var(--mono);\n font-size: 11px;\n color: var(--muted);\n}\n.bm-combo-empty {\n margin: 0;\n padding: 8px;\n font-size: 12px;\n color: var(--muted);\n}\n.bm-format {\n margin-top: -4px;\n}\n.bm-panel .bm-format button[aria-pressed=\"true\"] {\n background: #fff;\n color: var(--ink);\n box-shadow: var(--bm-shadow-segment-on);\n}\n.bm-wordmark {\n display: flex;\n align-items: baseline;\n justify-content: space-between;\n gap: 12px;\n padding: 12px 14px;\n border-radius: 10px;\n background: var(--bm-fill-soft);\n}\n.bm-wordmark-name {\n font-size: 24px;\n font-weight: 600;\n letter-spacing: -0.03em;\n}\n.bm-alert-notice {\n flex-direction: row;\n align-items: flex-start;\n gap: 8px;\n color: var(--warn-ink);\n}\n.bm-alert-notice .bm-icon {\n margin-top: 2px;\n flex: none;\n}\n\n/*\n * Button system. Three variants, one danger modifier, one rule set.\n * secondary (default): neutral fill, ink text.\n * .bm-primary: the one main action of a surface. Solid accent, white text (AA).\n * .bm-tertiary: low emphasis text button (Cancel, Reset). No fill, no underline, grey fill on hover.\n * .bm-danger: modifier. primary = solid red, secondary = red text, tertiary = red text.\n * The scope list gives every rule enough specificity to beat the per-surface defaults above,\n * so the hover state of one variant can never fall back to the secondary fill.\n */\n:is(.bm-dialog, .bm-popover, .bm-modal, .bm-panel) button:where(.bm-primary, .bm-tertiary, .bm-danger):not(.bm-icon-btn, .bm-save) {\n transition:\n background-color 0.12s,\n color 0.12s;\n}\n:is(.bm-dialog, .bm-popover, .bm-modal, .bm-panel) button.bm-primary {\n background: var(--bm-primary);\n color: #fff;\n box-shadow: none;\n font-weight: 600;\n}\n:is(.bm-dialog, .bm-popover, .bm-modal, .bm-panel) button.bm-primary:hover:not(:disabled) {\n background: var(--bm-primary-hover);\n color: #fff;\n}\n:is(.bm-dialog, .bm-popover, .bm-modal, .bm-panel) button.bm-primary.bm-danger {\n background: var(--bm-danger);\n color: #fff;\n}\n:is(.bm-dialog, .bm-popover, .bm-modal, .bm-panel) button.bm-primary.bm-danger:hover:not(:disabled) {\n background: var(--danger-hover);\n color: #fff;\n}\n:is(.bm-dialog, .bm-popover, .bm-modal, .bm-panel) button.bm-danger:not(.bm-primary, .bm-tertiary, .bm-icon-btn) {\n background: var(--bm-danger-soft);\n color: var(--bm-danger-text);\n}\n:is(.bm-dialog, .bm-popover, .bm-modal, .bm-panel) button.bm-danger:not(.bm-primary, .bm-tertiary, .bm-icon-btn):hover:not(:disabled) {\n background: oklch(0.93 0.04 25);\n color: var(--bm-danger-text);\n}\n:is(.bm-dialog, .bm-popover, .bm-modal, .bm-panel) button.bm-tertiary {\n min-height: 32px;\n padding: 0 10px;\n border-radius: 8px;\n background: transparent;\n color: var(--bm-label);\n font-weight: 400;\n box-shadow: none;\n text-decoration: none;\n}\n:is(.bm-dialog, .bm-popover, .bm-modal) button.bm-tertiary {\n min-height: 38px;\n font-size: 14px;\n}\n:is(.bm-dialog, .bm-popover, .bm-modal, .bm-panel) button.bm-tertiary:hover:not(:disabled) {\n background: var(--bm-fill);\n color: var(--bm-ink);\n}\n:is(.bm-dialog, .bm-popover, .bm-modal, .bm-panel) button.bm-tertiary.bm-danger {\n background: transparent;\n color: var(--bm-danger-text);\n}\n:is(.bm-dialog, .bm-popover, .bm-modal, .bm-panel) button.bm-tertiary.bm-danger:hover:not(:disabled) {\n background: var(--bm-danger-soft);\n color: var(--bm-danger-text);\n}\n:is(.bm-dialog, .bm-popover, .bm-modal, .bm-panel) button:disabled {\n opacity: 0.5;\n cursor: default;\n}\n.bm-save:hover:not(:disabled) {\n background: var(--accent-hover);\n color: #fff;\n}\n.bm-panel .bm-save:hover:not(:disabled) {\n background: var(--accent-hover);\n color: #fff;\n}\n.bm-popover .bm-actions-remove,\n.bm-dialog .bm-actions-remove {\n margin-right: auto;\n}\n.bm-modal :where(button:not([role=\"tab\"], .bm-library-pick, .bm-icon-btn, .bm-tertiary)) {\n min-height: 38px;\n padding: 0 16px;\n border: 0;\n border-radius: 8px;\n background: var(--fill);\n color: var(--ink);\n font-size: 14px;\n font-weight: 400;\n}\n.bm-modal :where(button:not([role=\"tab\"], .bm-library-pick, .bm-icon-btn, .bm-tertiary)):hover:not(:disabled) {\n background: var(--fill-hover);\n}\n.bm-modal .bm-dropzone {\n font-family: var(--sans);\n}\n\n/* Design tab */\n.bm-colorrow {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n.bm-colorpick {\n flex: none;\n width: 40px !important;\n height: 40px;\n min-height: 40px !important;\n padding: 2px !important;\n border: 1px solid var(--bm-border);\n border-radius: 8px;\n background: #fff;\n cursor: pointer;\n}\n.bm-colorhex {\n flex: 1;\n min-width: 0;\n font-family: var(--mono);\n font-size: 13px;\n text-transform: lowercase;\n}\n.bm-colorhex[aria-invalid=\"true\"] {\n border-color: var(--bm-danger);\n}\n.bm-overrides {\n display: flex;\n flex-direction: column;\n border: 1px solid var(--bm-border);\n border-radius: 10px;\n overflow: hidden;\n}\n.bm-override-row {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 8px 10px 8px 12px;\n}\n.bm-override-row + .bm-override-row {\n border-top: 1px solid var(--bm-divider);\n}\n.bm-override-label {\n flex: 1;\n min-width: 0;\n display: flex;\n align-items: baseline;\n gap: 6px;\n font-size: 13px;\n font-weight: 500;\n color: var(--bm-label);\n}\n.bm-override-label .bm-meta-tag {\n font-size: 10px;\n}\n.bm-override-row .bm-colorpick {\n width: 32px !important;\n height: 32px;\n min-height: 32px !important;\n padding: 1px !important;\n border-radius: 7px;\n}\n.bm-override-row .bm-colorhex {\n flex: none;\n width: 104px;\n min-height: 36px;\n padding: 0 10px;\n}\n.bm-tone-matrix {\n display: grid;\n grid-template-columns: 60px minmax(0, 1fr) minmax(0, 1fr);\n gap: 8px;\n align-items: stretch;\n}\n.bm-tone-pick {\n border: 0;\n text-align: left;\n font: inherit;\n cursor: pointer;\n}\n.bm-tone-cell[aria-pressed=\"true\"] {\n outline: 2px solid var(--bm-primary);\n outline-offset: 0;\n}\n.bm-tone-head {\n font-family: var(--mono);\n font-size: 10px;\n letter-spacing: 0.06em;\n text-transform: uppercase;\n color: var(--muted);\n}\n.bm-tone-name {\n align-self: center;\n font-size: 12px;\n font-weight: 500;\n color: var(--ink-2);\n}\n.bm-tone-cell {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 6px;\n min-width: 0;\n min-height: 46px;\n padding: 0 10px;\n border-radius: 8px;\n overflow: hidden;\n white-space: nowrap;\n}\n.bm-tone-aa {\n flex: none;\n font-size: 16px;\n font-weight: 600;\n}\n.bm-tone-muted {\n flex: 0 1 auto;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n font-size: 11px;\n}\n.bm-tone-chip {\n flex: none;\n padding: 2px 6px;\n border-radius: 5px;\n font-size: 10px;\n font-weight: 600;\n}\n.bm-tone-link {\n flex: none;\n font-size: 11px;\n text-decoration: underline;\n text-underline-offset: 2px;\n}\n.bm-contrast-list {\n margin: 6px 0 0;\n padding-left: 16px;\n font-family: var(--mono);\n font-size: 11px;\n color: var(--warn-ink);\n}\n.bm-range {\n flex: 1;\n min-width: 0;\n min-height: 28px;\n accent-color: var(--accent);\n cursor: pointer;\n}\n/* Preview: the only editor UI left on screen. */\n\n.bm-srow-add {\n display: flex;\n justify-content: flex-end;\n padding-top: 6px;\n}\n.bm-panel .bm-add-section {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n min-height: 32px;\n padding: 0 12px;\n border: 0;\n border-radius: 8px;\n background: var(--bm-primary);\n color: #fff;\n font-size: 13px;\n font-weight: 500;\n}\n.bm-panel .bm-add-section:hover {\n background: var(--bm-primary-hover);\n}\n\n/* ======================================================================\n * Editor shell: left navigation, top bar, inspector and full-screen views\n * around the page, which is framed into the canvas (see page-frame.ts).\n * Sizes are px, not rem: rem follows the site's root font size.\n * ====================================================================== */\n.bm-shell {\n display: contents;\n --bm-shell-line: oklch(0.9 0.005 250);\n --bm-shell-text: oklch(0.32 0.01 255);\n --bm-shell-hover: oklch(0.965 0.003 250);\n --bm-shell-on-bg: oklch(0.94 0.04 145);\n --bm-shell-on-fg: oklch(0.34 0.1 145);\n}\n.bm-canvas-layer {\n position: fixed;\n inset: 0;\n pointer-events: none;\n}\n\n/* ---------- left navigation ---------- */\n.bm-nav {\n position: fixed;\n z-index: 6;\n top: 0;\n left: 0;\n bottom: 0;\n width: var(--bm-nav-w);\n display: flex;\n flex-direction: column;\n background: #fff;\n border-right: 1px solid var(--bm-shell-line);\n transition: width 0.18s ease;\n}\n.bm-nav-brand {\n flex: none;\n display: flex;\n align-items: center;\n gap: 10px;\n height: 56px;\n padding: 0 16px;\n border-bottom: 1px solid var(--bm-divider);\n overflow: hidden;\n}\n.bm-nav-rail .bm-nav-brand {\n justify-content: center;\n padding: 0;\n}\n.bm-nav-mark {\n flex: none;\n display: block;\n width: 32px;\n height: auto;\n aspect-ratio: 21 / 19;\n image-rendering: pixelated;\n user-select: none;\n}\n.bm-nav-brand-text {\n display: flex;\n flex-direction: column;\n min-width: 0;\n white-space: nowrap;\n}\n.bm-nav-name {\n font-size: 16px;\n font-weight: 600;\n letter-spacing: -0.02em;\n line-height: 1.25;\n}\n.bm-nav-slogan {\n font-family: var(--mono);\n font-size: 11px;\n color: var(--muted);\n}\n.bm-nav-groups {\n flex: 1;\n min-height: 0;\n overflow-y: auto;\n padding: 4px 12px 12px;\n}\n.bm-nav-rail .bm-nav-groups {\n overflow: visible;\n}\n.bm-nav-group-label {\n margin: 0;\n padding: 12px 12px 6px;\n font-family: var(--mono);\n font-size: 11px;\n font-weight: 500;\n letter-spacing: 0.1em;\n text-transform: uppercase;\n color: var(--muted);\n}\n.bm-nav-divider {\n height: 1px;\n margin: 10px 12px;\n border: 0;\n background: oklch(0.92 0.004 250);\n}\n.bm-nav-item {\n position: relative;\n display: flex;\n align-items: center;\n gap: 12px;\n width: 100%;\n height: 40px;\n padding: 0 12px;\n border: 0;\n border-radius: 8px;\n background: transparent;\n color: var(--bm-shell-text);\n font-size: 15px;\n font-weight: 500;\n text-align: left;\n}\n.bm-nav-item .bm-icon {\n flex: none;\n}\n.bm-nav-rail .bm-nav-item {\n justify-content: center;\n padding: 0;\n}\n.bm-nav-item:hover {\n background: var(--bm-shell-hover);\n}\n.bm-nav-item-on,\n.bm-nav-item-on:hover {\n background: var(--bm-shell-on-bg);\n color: var(--bm-shell-on-fg);\n font-weight: 600;\n}\n.bm-nav-label-text {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.bm-nav-count {\n flex: none;\n font-family: var(--mono);\n font-size: 11px;\n font-weight: 400;\n color: var(--muted);\n}\n.bm-nav-tip {\n position: absolute;\n z-index: 10;\n top: 50%;\n left: calc(100% + 10px);\n padding: 6px 10px;\n border-radius: 6px;\n background: var(--ink);\n color: #fff;\n font-size: 13px;\n font-weight: 500;\n white-space: nowrap;\n opacity: 0;\n transform: translateY(-50%);\n pointer-events: none;\n transition: opacity 0.12s ease;\n}\n.bm-nav-item:hover .bm-nav-tip,\n.bm-nav-item:focus-visible .bm-nav-tip {\n opacity: 1;\n}\n.bm-nav-foot {\n flex: none;\n padding: 8px 12px 12px;\n border-top: 1px solid var(--bm-divider);\n}\n.bm-nav-rail .bm-nav-collapse .bm-icon {\n transform: scaleX(-1);\n}\n.bm-kbd {\n font-family: var(--mono);\n font-size: 11px;\n font-weight: 400;\n color: var(--muted);\n}\n\n/* ---------- top bar ---------- */\n.bm-topbar {\n position: fixed;\n z-index: 6;\n top: 0;\n left: var(--bm-nav-w);\n right: 0;\n height: 56px;\n display: flex;\n align-items: center;\n gap: 16px;\n padding: 0 12px 0 16px;\n background: #fff;\n border-bottom: 1px solid var(--bm-shell-line);\n font-size: 14px;\n transition: left 0.18s ease;\n}\n.bm-topbar-left {\n flex: 1 1 0;\n min-width: 0;\n display: flex;\n align-items: center;\n gap: 8px;\n overflow: hidden;\n}\n.bm-topbar-right {\n flex: 1 0 0;\n min-width: max-content;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n gap: 8px;\n}\n.bm-topbar-divider {\n flex: none;\n width: 1px;\n height: 24px;\n background: var(--bm-shell-line);\n}\n.bm-crumbs {\n flex: 0 1 auto;\n min-width: 0;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n.bm-crumb-type {\n flex: none;\n height: 30px;\n padding: 0 6px;\n border: 0;\n border-radius: 6px;\n background: transparent;\n color: var(--bm-help);\n font-size: 14px;\n font-weight: 500;\n}\n.bm-crumb-type:hover {\n background: var(--bm-shell-hover);\n color: var(--ink);\n}\n.bm-crumb-sep {\n flex: none;\n color: var(--bm-info);\n}\n.bm-crumb-title {\n flex: 0 0 auto;\n max-width: 256px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-weight: 600;\n}\n.bm-crumb-path {\n flex: 0 1 auto;\n min-width: 0;\n padding: 2px 6px;\n border-radius: 5px;\n background: oklch(0.96 0.003 250);\n color: var(--bm-help);\n font-family: var(--mono);\n font-size: 12px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.bm-topbar-btn {\n position: relative;\n flex: none;\n display: inline-grid;\n place-items: center;\n width: 36px;\n height: 36px;\n padding: 0;\n border: 0;\n border-radius: 8px;\n background: transparent;\n color: var(--bm-label);\n}\n.bm-topbar-btn:hover:not(:disabled) {\n background: var(--bm-shell-hover);\n color: var(--ink);\n}\n.bm-topbar-btn:disabled {\n color: oklch(0.78 0.005 250);\n cursor: default;\n}\n.bm-topbar-btn-on,\n.bm-topbar-btn-on:hover:not(:disabled) {\n background: var(--bm-shell-on-bg);\n color: var(--bm-shell-on-fg);\n}\n.bm-topbar-badge {\n position: absolute;\n top: 3px;\n right: 1px;\n min-width: 16px;\n height: 16px;\n padding: 0 4px;\n border-radius: 999px;\n background: var(--accent);\n color: #fff;\n font-family: var(--mono);\n font-size: 10px;\n line-height: 16px;\n}\n.bm-back {\n flex: none;\n display: inline-flex;\n align-items: center;\n gap: 4px;\n height: 36px;\n padding: 0 10px 0 6px;\n border: 0;\n border-radius: 8px;\n background: transparent;\n color: var(--bm-label);\n font-size: 14px;\n font-weight: 500;\n}\n.bm-back:hover {\n background: var(--bm-shell-hover);\n color: var(--ink);\n}\n.bm-back-text {\n max-width: 240px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.bm-view-crumb {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: var(--bm-help);\n}\n.bm-view-crumb strong {\n color: var(--ink);\n font-weight: 600;\n}\n.bm-preview-btn {\n flex: none;\n display: inline-flex;\n align-items: center;\n gap: 6px;\n height: 36px;\n padding: 0 12px;\n border: 1px solid oklch(0.88 0.005 250);\n border-radius: 8px;\n background: #fff;\n color: var(--bm-label);\n font-size: 14px;\n font-weight: 500;\n}\n.bm-preview-btn:hover {\n background: var(--bm-shell-hover);\n color: var(--ink);\n}\n.bm-topbar .bm-pill {\n height: 32px;\n padding: 0 10px;\n background: transparent;\n color: var(--bm-help);\n font-size: 13px;\n}\n.bm-topbar .bm-pill .bm-dot {\n background: oklch(0.55 0.14 145);\n}\n.bm-topbar .bm-pill-dirty,\n.bm-topbar button.bm-pill-btn {\n background: oklch(0.96 0.05 85);\n color: oklch(0.42 0.1 65);\n border-radius: 999px;\n}\n.bm-topbar .bm-pill-dirty .bm-dot {\n background: oklch(0.72 0.15 75);\n}\n.bm-topbar .bm-save {\n height: 36px;\n padding: 0 14px;\n font-size: 14px;\n font-family: var(--sans);\n}\n.bm-topbar .bm-save:hover:not(:disabled) {\n background: var(--accent-hover);\n}\n.bm-topbar .bm-save:disabled:not([aria-busy=\"true\"]) {\n background: oklch(0.92 0.005 250);\n color: var(--muted);\n opacity: 1;\n cursor: default;\n}\n.bm-exit-preview {\n flex: none;\n display: inline-flex;\n align-items: center;\n gap: 8px;\n height: 36px;\n padding: 0 14px;\n border: 0;\n border-radius: 8px;\n background: var(--ink);\n color: #fff;\n font-size: 14px;\n font-weight: 500;\n}\n.bm-exit-preview:hover {\n background: oklch(0.3 0.012 255);\n}\n.bm-topbar-preview-note {\n color: var(--bm-help);\n font-size: 13px;\n}\n.bm-topbar-pop {\n position: fixed;\n z-index: 9;\n top: 64px;\n right: 12px;\n pointer-events: auto;\n}\n.bm-topbar-pop > .bm-dialog {\n position: static !important;\n transform: none !important;\n width: min(380px, calc(100vw - 24px));\n max-height: calc(100vh - 88px);\n overflow: auto;\n border-radius: 12px;\n box-shadow:\n 0 0 0 1px oklch(0.9 0.005 250),\n 0 20px 40px -16px oklch(0.2 0.02 255 / 0.3);\n}\n@media (max-width: 1179px) {\n .bm-preview-text {\n display: none;\n }\n .bm-preview-btn {\n width: 36px;\n padding: 0;\n justify-content: center;\n }\n}\n@media (max-width: 999px) {\n .bm-crumb-type,\n .bm-crumb-sep,\n .bm-viewport {\n display: none;\n }\n}\n\n/* ---------- inspector ---------- */\n.bm-inspector {\n position: fixed;\n z-index: 5;\n top: 56px;\n right: 0;\n bottom: 0;\n display: flex;\n flex-direction: column;\n background: #fff;\n border-left: 1px solid var(--bm-shell-line);\n}\n.bm-inspector-resize {\n position: absolute;\n z-index: 2;\n top: 0;\n bottom: 0;\n left: -5px;\n width: 10px;\n cursor: col-resize;\n touch-action: none;\n}\n.bm-inspector-resize:focus-visible {\n outline: none;\n}\n.bm-inspector-grip {\n position: absolute;\n top: 50%;\n left: 3px;\n width: 4px;\n height: 40px;\n border-radius: 999px;\n background: oklch(0.82 0.006 250);\n box-shadow: 0 0 0 2px #fff;\n transform: translateY(-50%);\n}\n.bm-inspector-resize:hover .bm-inspector-grip,\n.bm-inspector-resize:active .bm-inspector-grip,\n.bm-inspector-resize:focus-visible .bm-inspector-grip {\n background: var(--accent);\n}\n.bm-inspector .bm-tabs {\n flex: none;\n}\n.bm-inspector .bm-tabs button {\n height: 44px;\n font-size: 14px;\n}\n\n/* ---------- full-screen views ---------- */\n.bm-view {\n position: fixed;\n z-index: 5;\n top: 56px;\n left: var(--bm-nav-w);\n right: 0;\n bottom: 0;\n overflow: auto;\n background: oklch(0.975 0.003 250);\n transition: left 0.18s ease;\n}\n.bm-screen {\n max-width: 736px;\n margin: 0 auto;\n padding: 40px 32px 64px;\n display: flex;\n flex-direction: column;\n gap: 24px;\n}\n.bm-screen-head {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n.bm-screen-title {\n margin: 0;\n font-size: 32px;\n font-weight: 600;\n letter-spacing: -0.04em;\n line-height: 1.15;\n color: var(--ink);\n}\n.bm-screen-file {\n margin: 0;\n font-family: var(--mono);\n font-size: 12px;\n color: var(--muted);\n}\n.bm-screen-cards > .bm-stack {\n gap: 24px;\n}\n/* Each group of a settings form is a card. A group inside a card stays a plain group. */\n.bm-screen-cards .bm-stack:is(:has(> .bm-group:first-child), :has(> .bm-group-split:first-child)) {\n padding: 20px 24px 24px;\n border-radius: 12px;\n background: #fff;\n box-shadow: 0 0 0 1px var(--bm-shell-line, oklch(0.9 0.005 250));\n}\n.bm-screen-cards\n .bm-stack:is(:has(> .bm-group:first-child), :has(> .bm-group-split:first-child))\n .bm-stack:is(:has(> .bm-group:first-child), :has(> .bm-group-split:first-child)) {\n padding: 0;\n border-radius: 0;\n background: none;\n box-shadow: none;\n}\n/* The inspector is narrow: a section row shows its name, and its buttons while it is hovered or focused. */\n.bm-inspector .bm-srow:not(:hover):not(:focus-within) .bm-srow-btn,\n.bm-inspector .bm-srow:not(:hover):not(:focus-within) .bm-srow-sep {\n display: none;\n}\n.bm-topbar-pop .bm-dialog-foot .bm-hint {\n display: none;\n}\n\n/* ---------- content listings ---------- */\n.bm-listing {\n padding: 32px 40px 48px;\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n.bm-listing-head {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: 24px;\n flex-wrap: wrap;\n}\n.bm-listing-title-row {\n display: flex;\n align-items: center;\n gap: 16px;\n}\n.bm-panel .bm-listing-new {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n height: 36px;\n min-height: 0;\n padding: 0 14px;\n border: 0;\n border-radius: 8px;\n background: var(--accent);\n color: #fff;\n font-size: 14px;\n font-weight: 600;\n}\n.bm-panel .bm-listing-new:hover:not(:disabled) {\n background: var(--accent-hover);\n}\n.bm-listing-heading .bm-screen-file {\n margin-top: 6px;\n}\n.bm-listing-search {\n display: flex;\n align-items: center;\n gap: 8px;\n width: 288px;\n height: 38px;\n padding: 0 12px;\n border: 1px solid var(--bm-border);\n border-radius: 8px;\n background: #fff;\n color: var(--bm-icon);\n}\n.bm-listing-search:focus-within {\n border-color: var(--accent);\n box-shadow: 0 0 0 3px var(--accent-ring);\n}\n.bm-listing-search input {\n flex: 1;\n min-width: 0;\n height: 100%;\n padding: 0;\n border: 0;\n outline: none;\n background: transparent;\n color: var(--ink);\n font-size: 14px;\n}\n.bm-new-document .bm-modal-body {\n padding-top: 4px;\n}\n.bm-new-document-form {\n display: flex;\n flex-direction: column;\n gap: 14px;\n}\n.bm-new-document-form > .bm-primary {\n align-self: flex-start;\n}\n.bm-listing-filters {\n display: flex;\n gap: 4px;\n flex-wrap: wrap;\n}\n.bm-panel .bm-filter {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n height: 32px;\n min-height: 0;\n padding: 0 12px;\n border: 0;\n border-radius: 8px;\n background: transparent;\n color: var(--bm-help);\n font-size: 14px;\n font-weight: 500;\n}\n.bm-panel .bm-filter:hover:not(:disabled) {\n background: oklch(0.95 0.003 250);\n color: var(--ink);\n}\n.bm-panel .bm-filter-on,\n.bm-panel .bm-filter-on:hover:not(:disabled) {\n background: #fff;\n color: var(--ink);\n font-weight: 600;\n box-shadow: 0 0 0 1px var(--bm-shell-line);\n}\n.bm-filter-count {\n font-family: var(--mono);\n font-size: 11px;\n font-weight: 400;\n color: var(--muted);\n}\n.bm-bulk {\n align-self: flex-start;\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 6px 6px 6px 16px;\n border-radius: 999px;\n background: var(--ink);\n color: #fff;\n font-size: 13px;\n font-weight: 500;\n}\n.bm-panel .bm-bulk button {\n min-height: 0;\n height: 30px;\n padding: 0 12px;\n border: 0;\n border-radius: 999px;\n background: oklch(1 0 0 / 0.12);\n color: #fff;\n font-size: 13px;\n font-weight: 500;\n display: inline-flex;\n align-items: center;\n gap: 6px;\n}\n.bm-panel .bm-bulk button:hover:not(:disabled) {\n background: oklch(1 0 0 / 0.2);\n color: #fff;\n}\n.bm-panel .bm-bulk .bm-bulk-delete,\n.bm-panel .bm-bulk .bm-bulk-delete:hover:not(:disabled) {\n background: oklch(0.58 0.18 25);\n}\n.bm-table-wrap {\n overflow-x: auto;\n border-radius: 12px;\n background: #fff;\n box-shadow: 0 0 0 1px var(--bm-shell-line);\n}\n.bm-table {\n width: 100%;\n min-width: 832px;\n border-collapse: collapse;\n table-layout: fixed;\n font-size: 14px;\n}\n.bm-col-check {\n width: 48px;\n}\n.bm-col-url {\n width: 30%;\n}\n.bm-col-status {\n width: 128px;\n}\n.bm-col-indexed {\n width: 112px;\n}\n.bm-col-time {\n width: 160px;\n}\n.bm-tr {\n border-top: 1px solid var(--bm-divider);\n}\n.bm-thead {\n height: 44px;\n border-top: 0;\n background: oklch(0.985 0.002 250);\n}\n.bm-td {\n padding: 10px 12px;\n text-align: left;\n vertical-align: middle;\n color: var(--bm-label);\n}\n.bm-thead .bm-td {\n padding: 0 12px;\n font-weight: 400;\n}\n.bm-td-check {\n padding-left: 16px;\n}\n.bm-td-check input {\n width: 16px;\n height: 16px;\n margin: 0;\n accent-color: var(--accent);\n}\n.bm-panel .bm-th {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n min-height: 0;\n padding: 0;\n border: 0;\n background: transparent;\n color: var(--muted);\n font-family: var(--mono);\n font-size: 11px;\n font-weight: 500;\n letter-spacing: 0.08em;\n text-transform: uppercase;\n}\n.bm-panel .bm-th:hover:not(:disabled),\n.bm-panel .bm-th-on {\n background: transparent;\n color: var(--ink);\n}\ntbody .bm-tr:hover {\n background: oklch(0.985 0.002 250);\n}\ntbody .bm-tr-on,\ntbody .bm-tr-on:hover {\n background: oklch(0.97 0.025 145);\n}\n.bm-td-title {\n min-width: 0;\n}\n.bm-row-title-line {\n display: flex;\n align-items: center;\n gap: 6px;\n min-width: 0;\n}\n.bm-panel .bm-row-title {\n min-width: 0;\n min-height: 0;\n padding: 0;\n border: 0;\n background: transparent;\n color: var(--ink);\n font-size: 15px;\n font-weight: 600;\n text-align: left;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.bm-panel .bm-row-title:hover:not(:disabled) {\n background: transparent;\n color: var(--accent);\n text-decoration: underline;\n}\n.bm-chip {\n flex: none;\n display: inline-flex;\n align-items: center;\n height: 20px;\n padding: 0 7px;\n border-radius: 5px;\n font-family: var(--mono);\n font-size: 11px;\n}\n.bm-chip-amber {\n background: var(--bm-badge-amber-bg);\n color: var(--bm-badge-amber-fg);\n}\n.bm-chip-grey {\n background: var(--bm-fill);\n color: var(--bm-help);\n}\n.bm-chip-green {\n background: var(--bm-badge-green-bg);\n color: var(--bm-badge-green-fg);\n}\n.bm-row-actions {\n display: flex;\n align-items: center;\n gap: 6px;\n margin-top: 4px;\n font-size: 13px;\n color: var(--bm-info);\n visibility: hidden;\n}\n.bm-tr:hover .bm-row-actions,\n.bm-tr:focus-within .bm-row-actions,\n.bm-tr-on .bm-row-actions {\n visibility: visible;\n}\n.bm-panel .bm-row-actions button,\n.bm-row-actions a {\n min-height: 0;\n padding: 0;\n border: 0;\n background: transparent;\n color: var(--bm-link);\n font-size: 13px;\n font-weight: 500;\n text-decoration: none;\n}\n.bm-panel .bm-row-actions button:hover:not(:disabled),\n.bm-row-actions a:hover {\n background: transparent;\n text-decoration: underline;\n}\n.bm-panel .bm-row-actions .bm-row-delete {\n color: var(--danger-ink);\n}\n.bm-td-url {\n font-family: var(--mono);\n font-size: 13px;\n color: var(--bm-help);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.bm-status {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n height: 24px;\n padding: 0 9px;\n border-radius: 999px;\n font-size: 12px;\n font-weight: 500;\n}\n.bm-status .bm-dot {\n width: 6px;\n height: 6px;\n}\n.bm-status-published {\n background: var(--bm-badge-green-bg);\n color: var(--bm-badge-green-fg);\n}\n.bm-status-published .bm-dot {\n background: oklch(0.55 0.14 145);\n}\n.bm-status-draft {\n background: var(--bm-fill);\n color: var(--bm-help);\n}\n.bm-status-draft .bm-dot {\n background: oklch(0.65 0.01 255);\n}\n.bm-status-unsaved {\n background: oklch(0.96 0.05 85);\n color: oklch(0.42 0.1 65);\n}\n.bm-status-unsaved .bm-dot {\n background: oklch(0.72 0.15 75);\n}\n.bm-mono-muted {\n font-family: var(--mono);\n font-size: 12px;\n color: var(--muted);\n}\n.bm-td-time {\n color: var(--bm-help);\n font-size: 13px;\n}\n.bm-table-empty {\n padding: 32px 16px;\n text-align: center;\n color: var(--muted);\n}\n.bm-pager {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 16px;\n font-size: 13px;\n color: var(--bm-help);\n}\n.bm-pager-pages {\n display: flex;\n gap: 4px;\n}\n.bm-panel .bm-pager-pages button {\n min-width: 32px;\n height: 32px;\n min-height: 0;\n padding: 0 8px;\n border: 0;\n border-radius: 8px;\n background: transparent;\n color: var(--bm-label);\n font-size: 13px;\n}\n.bm-panel .bm-pager-pages button.bm-pager-on {\n background: var(--ink);\n color: #fff;\n}\n\n/* ---------- media ---------- */\n.bm-media-grid {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(208px, 1fr));\n gap: 16px;\n margin: 0;\n padding: 0;\n list-style: none;\n}\n.bm-media-card {\n position: relative;\n display: flex;\n flex-direction: column;\n gap: 4px;\n padding: 8px 8px 12px;\n border-radius: 12px;\n background: #fff;\n box-shadow: 0 0 0 1px var(--bm-shell-line);\n min-width: 0;\n}\n.bm-media-thumb {\n display: grid;\n place-items: center;\n aspect-ratio: 4 / 3;\n margin-bottom: 6px;\n border-radius: 8px;\n background: oklch(0.95 0.004 250);\n overflow: hidden;\n}\n.bm-media-thumb img {\n max-width: 100%;\n max-height: 100%;\n object-fit: contain;\n}\n.bm-media-name {\n padding: 0 4px;\n font-family: var(--mono);\n font-size: 12px;\n color: var(--ink);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.bm-media-use {\n padding: 0 4px;\n font-size: 12px;\n color: var(--muted);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.bm-panel .bm-media-delete {\n position: absolute;\n top: 14px;\n right: 14px;\n background: #fff;\n box-shadow: var(--bm-shadow-pop);\n opacity: 0;\n}\n.bm-media-card:hover .bm-media-delete,\n.bm-media-delete:focus-visible {\n opacity: 1;\n}\n.bm-panel .bm-media-drop {\n flex: 1;\n min-height: 180px;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 8px;\n border: 1.5px dashed var(--bm-border);\n border-radius: 8px;\n background: transparent;\n color: var(--muted);\n font-size: 13px;\n font-weight: 500;\n}\n.bm-panel .bm-media-drop:hover:not(:disabled),\n.bm-panel .bm-media-drop-on {\n border-color: var(--accent);\n background: var(--accent-tint);\n color: var(--bm-shell-on-fg);\n}\n.bm-media .bm-media-card:last-child {\n padding: 8px;\n}\n\n/* ---------- SEO › structured data ---------- */\n.bm-meta-over {\n color: var(--danger-ink);\n}\n.bm-jsonld-list {\n display: flex;\n flex-direction: column;\n gap: 8px;\n margin: 0;\n padding: 0;\n list-style: none;\n}\n.bm-jsonld-card {\n border: 1px solid var(--bm-border);\n border-radius: 10px;\n background: #fff;\n}\n.bm-jsonld-head {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 4px 6px 4px 4px;\n}\n.bm-panel .bm-jsonld-toggle {\n flex: 1;\n min-width: 0;\n display: flex;\n align-items: center;\n gap: 8px;\n min-height: 36px;\n padding: 0 8px;\n border: 0;\n border-radius: 7px;\n background: transparent;\n color: var(--ink);\n text-align: left;\n}\n.bm-jsonld-type {\n font-weight: 600;\n font-size: 14px;\n}\n.bm-jsonld-id {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-family: var(--mono);\n font-size: 12px;\n color: var(--muted);\n}\n.bm-jsonld-badge {\n flex: none;\n height: 20px;\n padding: 0 7px;\n border-radius: 5px;\n font-family: var(--mono);\n font-size: 11px;\n line-height: 20px;\n}\n.bm-jsonld-valid {\n background: var(--bm-badge-green-bg);\n color: var(--bm-badge-green-fg);\n}\n.bm-jsonld-warning {\n background: var(--bm-badge-amber-bg);\n color: var(--bm-badge-amber-fg);\n}\n.bm-jsonld-error {\n background: var(--bm-danger-soft);\n color: var(--danger-ink);\n}\n.bm-jsonld-body {\n display: flex;\n flex-direction: column;\n gap: 8px;\n padding: 0 12px 12px;\n}\n.bm-panel .bm-jsonld-text {\n width: 100%;\n padding: 10px 12px;\n border: 1px solid var(--bm-border);\n border-radius: 8px;\n background: oklch(0.985 0.002 250);\n font-family: var(--mono);\n font-size: 12px;\n line-height: 1.55;\n resize: vertical;\n}\n.bm-panel .bm-jsonld-text-bad {\n border-color: var(--bm-danger);\n}\n.bm-jsonld-foot {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n}\n.bm-panel .bm-dashed-add {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 6px;\n width: 100%;\n height: 44px;\n border: 1.5px dashed var(--bm-border);\n border-radius: 10px;\n background: transparent;\n color: var(--bm-label);\n font-size: 14px;\n font-weight: 500;\n}\n.bm-panel .bm-dashed-add:hover:not(:disabled) {\n border-color: var(--accent);\n background: var(--accent-tint);\n color: var(--bm-shell-on-fg);\n}\n\n/* ---------- viewport switch and device frames ---------- */\n.bm-viewport {\n flex: none;\n display: flex;\n gap: 2px;\n padding: 3px;\n border-radius: 9px;\n background: oklch(0.955 0.003 250);\n}\n.bm-viewport button {\n display: grid;\n place-items: center;\n width: 36px;\n height: 30px;\n padding: 0;\n border: 0;\n border-radius: 7px;\n background: transparent;\n color: var(--bm-help);\n}\n.bm-viewport button:hover {\n color: var(--ink);\n}\n.bm-viewport button.bm-viewport-on {\n background: #fff;\n color: var(--ink);\n box-shadow: 0 1px 2px oklch(0 0 0 / 0.1);\n}\n.bm-device {\n position: fixed;\n z-index: 4;\n top: 56px;\n left: var(--bm-nav-w);\n right: var(--bm-insp-w);\n bottom: 0;\n display: flex;\n flex-direction: column;\n align-items: center;\n overflow: auto;\n background: oklch(0.93 0.005 250);\n}\n.bm-device-frame {\n flex: none;\n max-width: calc(100% - 32px);\n height: calc(100% - 64px);\n margin: 24px 0 8px;\n border: 0;\n border-radius: 14px;\n background: #fff;\n box-shadow:\n 0 0 0 1px oklch(0.86 0.005 250),\n 0 24px 48px -24px oklch(0.2 0.02 255 / 0.3);\n}\n.bm-device-note {\n margin: 0 0 8px;\n font-size: 12px;\n color: var(--muted);\n}\n.bm-seg-dot {\n display: inline-block;\n width: 7px;\n height: 7px;\n margin-right: 6px;\n border-radius: 999px;\n vertical-align: 1px;\n}\n.bm-seg-dot-published {\n background: oklch(0.55 0.14 145);\n}\n.bm-seg-dot-draft {\n background: oklch(0.65 0.01 255);\n}\n";
|
|
21307
|
+
var editor_default = "/*\n * Editor styles. They live in a shadow root, so they never meet the site's Tailwind layer.\n * The editor is always light. Tokens and values follow the v4 editor design handoff.\n * The short names (--ink, --line, --accent ...) alias the --bm-* tokens so older rules read the same.\n */\n:host {\n all: initial;\n\n /* ---------- v4 tokens (editor-tokens.css) ---------- */\n --bm-font-ui: \"Bricolage Grotesque Variable\", \"Bricolage Grotesque\", ui-sans-serif, system-ui, sans-serif;\n --bm-font-mono: \"JetBrains Mono\", ui-monospace, SFMono-Regular, Menlo, monospace;\n --bm-font-serif: \"Instrument Serif\", Georgia, serif;\n\n --bm-ink: oklch(0.21 0.012 255);\n --bm-label: oklch(0.3 0.01 255);\n --bm-section: oklch(0.42 0.01 255);\n --bm-help: oklch(0.47 0.01 255);\n --bm-muted: oklch(0.5 0.01 255);\n --bm-icon: oklch(0.55 0.01 255);\n --bm-info: oklch(0.6 0.01 255);\n\n --bm-fill: oklch(0.955 0.003 250);\n --bm-fill-hover: oklch(0.93 0.004 250);\n --bm-fill-soft: oklch(0.965 0.003 250);\n --bm-fill-nested: oklch(0.97 0.003 250);\n --bm-border: oklch(0.88 0.005 250);\n --bm-divider: oklch(0.93 0.004 250);\n --bm-tab-rule: oklch(0.92 0.004 250);\n\n --bm-primary: oklch(0.46 0.13 145);\n --bm-primary-hover: oklch(0.4 0.12 145);\n --bm-primary-ring: oklch(0.46 0.13 145 / 0.15);\n --bm-link: oklch(0.4 0.12 145);\n\n --bm-saved-bg: oklch(0.94 0.045 145);\n --bm-saved-fg: oklch(0.36 0.1 145);\n --bm-unsaved-bg: oklch(0.95 0.05 80);\n --bm-unsaved-fg: oklch(0.48 0.1 60);\n --bm-unsaved-dot: oklch(0.75 0.15 70);\n --bm-badge-green-bg: oklch(0.93 0.06 145);\n --bm-badge-green-fg: oklch(0.38 0.1 145);\n --bm-badge-amber-bg: oklch(0.95 0.04 75);\n --bm-badge-amber-fg: oklch(0.45 0.09 60);\n\n --bm-danger: oklch(0.55 0.19 25);\n --bm-danger-text: oklch(0.52 0.17 25);\n --bm-danger-icon: oklch(0.58 0.18 25);\n --bm-danger-soft: oklch(0.96 0.025 20);\n\n --bm-diff-del-bg: oklch(0.97 0.02 20);\n --bm-diff-del-fg: oklch(0.45 0.13 25);\n --bm-diff-add-bg: oklch(0.96 0.04 145);\n --bm-diff-add-fg: oklch(0.34 0.1 145);\n\n --bm-switch-off: oklch(0.82 0.005 250);\n\n --bm-shadow-pop: 0 0 0 1px oklch(0.9 0.005 250), 0 16px 36px -16px oklch(0.2 0.02 255 / 0.35);\n --bm-shadow-dialog: 0 0 0 1px oklch(0.9 0.005 250), 0 24px 48px -24px oklch(0.2 0.02 255 / 0.35);\n --bm-shadow-segment-on: 0 1px 2px oklch(0 0 0 / 0.08), 0 0 0 1px oklch(0.9 0.005 250);\n\n /* ---------- aliases used by the rules below ---------- */\n --ink: var(--bm-ink);\n --ink-2: var(--bm-label);\n --muted: var(--bm-muted);\n --line: var(--bm-border);\n --line-soft: var(--bm-divider);\n --fill: var(--bm-fill);\n --fill-hover: var(--bm-fill-hover);\n --fill-soft: var(--bm-fill-soft);\n --accent: var(--bm-primary);\n --accent-hover: var(--bm-primary-hover);\n --accent-tint: oklch(0.96 0.03 145);\n --accent-ring: var(--bm-primary-ring);\n --warn-tint: var(--bm-unsaved-bg);\n --warn-ink: var(--bm-unsaved-fg);\n --warn-dot: var(--bm-unsaved-dot);\n --danger-hover: oklch(0.48 0.18 25);\n --danger-tint: var(--bm-danger-soft);\n --danger-ink: var(--bm-danger-text);\n --info-dot: oklch(0.6 0.15 255);\n --sans: var(--bm-font-ui);\n --mono: var(--bm-font-mono);\n --serif: var(--bm-font-serif);\n --shadow-pop: var(--bm-shadow-pop);\n}\n* {\n box-sizing: border-box;\n}\nbutton,\ninput,\nselect,\ntextarea {\n font: inherit;\n color: inherit;\n}\nbutton {\n cursor: pointer;\n}\n:focus-visible {\n outline: 2px solid var(--accent);\n outline-offset: 2px;\n}\n\n/* On-page outlines */\n.bm-outline {\n position: fixed;\n pointer-events: none;\n border-radius: 6px;\n z-index: 1;\n}\n.bm-outline-section {\n border: 2px solid var(--accent);\n}\n.bm-outline-field {\n border: 2px solid var(--accent);\n background: oklch(0.46 0.13 145 / 0.08);\n}\n.bm-image-bar {\n flex-wrap: nowrap;\n left: auto;\n white-space: nowrap;\n}\n.bm-image-bar-group {\n display: flex;\n gap: 2px;\n}\n.bm-image-bar button[aria-pressed=\"true\"] {\n background: var(--bm-saved-bg);\n color: var(--bm-saved-fg);\n}\n.bm-image-bar-grid {\n display: grid;\n grid-template-columns: repeat(3, 9px);\n grid-template-rows: repeat(3, 9px);\n gap: 2px;\n align-self: center;\n padding: 0 4px;\n}\n.bm-image-bar .bm-pos-cell {\n width: 9px;\n height: 9px;\n /* `.bm-rich button` sets a 32px minimum for the bar's text buttons; the cells stay 9px. */\n min-width: 0;\n min-height: 0;\n padding: 0;\n border-radius: 2px;\n background: var(--line);\n}\n.bm-image-bar .bm-pos-cell:hover:not(:disabled) {\n background: var(--muted);\n}\n.bm-image-bar .bm-pos-cell[aria-pressed=\"true\"] {\n background: var(--accent);\n}\n.bm-image-bar .bm-pos-cell:disabled {\n opacity: 0.3;\n cursor: default;\n}\n.bm-outline-image {\n background: oklch(0.46 0.13 145 / 0.12);\n}\n.bm-outline-image::after {\n content: \"Change image\";\n position: absolute;\n top: 8px;\n left: 8px;\n padding: 4px 9px;\n border-radius: 6px;\n background: var(--accent);\n color: #fff;\n font: 500 11px / 1.3 var(--sans, system-ui, sans-serif);\n}\n\n.bm-toolbar,\n.bm-chrome,\n.bm-popover,\n.bm-dialog,\n.bm-rich,\n.bm-banner,\n.bm-toaster,\n.bm-scrim {\n pointer-events: auto;\n font-family: var(--sans);\n font-size: 13px;\n color: var(--ink);\n -webkit-font-smoothing: antialiased;\n}\n\n/*\n * Insert between sections. Three states:\n * idle / hover a solid line and a 28px circle; hover changes nothing.\n * open the picker is open: the line stays and a \"between A and B\" chip replaces the circle.\n */\n.bm-gap {\n position: fixed;\n z-index: 2;\n height: 0;\n pointer-events: none;\n}\n.bm-gap::before {\n content: \"\";\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n height: 0;\n border-top: 2px solid var(--bm-primary);\n transform: translateY(-50%);\n}\n.bm-gap-add {\n position: absolute;\n left: 50%;\n top: 0;\n transform: translate(-50%, -50%);\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 6px;\n width: 28px;\n height: 28px;\n padding: 0;\n border: 0;\n border-radius: 999px;\n pointer-events: auto;\n cursor: pointer;\n white-space: nowrap;\n background: var(--bm-primary);\n color: #fff;\n box-shadow: 0 0 0 2px #fff;\n}\n.bm-gap-add .bm-icon {\n width: 14px;\n height: 14px;\n stroke-width: 2.4;\n}\n.bm-gap-add:focus-visible {\n outline: 2px solid var(--ink);\n outline-offset: 3px;\n}\n.bm-gap-chip {\n position: absolute;\n left: 50%;\n top: 0;\n transform: translate(-50%, -50%);\n padding: 4px 10px;\n border-radius: 999px;\n background: #fff;\n color: var(--bm-ink);\n box-shadow: 0 0 0 1.5px var(--bm-primary);\n white-space: nowrap;\n pointer-events: none;\n font-size: 12px;\n font-weight: 500;\n}\n\n/* Light floating bars: section toolbar, rich text bar, heading format bar */\n.bm-toolbar,\n.bm-rich {\n position: fixed;\n z-index: 7;\n display: flex;\n gap: 2px;\n padding: 4px;\n border-radius: 12px;\n background: #fff;\n color: var(--ink);\n box-shadow: var(--bm-shadow-pop);\n}\n.bm-toolbar button,\n.bm-rich button {\n border: 0;\n border-radius: 7px;\n background: transparent;\n color: inherit;\n min-height: 32px;\n padding: 0 10px;\n font-size: 12px;\n font-weight: 500;\n}\n.bm-toolbar button:hover:not(:disabled),\n.bm-rich button:hover {\n background: var(--fill);\n}\n.bm-rich button[aria-pressed=\"true\"] {\n background: var(--bm-saved-bg);\n box-shadow: inset 0 0 0 1px oklch(0.46 0.13 145 / 0.4);\n}\n.bm-toolbar :focus-visible,\n.bm-rich :focus-visible {\n outline-color: var(--accent);\n}\n.bm-toolbar {\n align-items: center;\n max-width: calc(100vw - 16px);\n padding: 5px;\n}\n.bm-toolbar button {\n width: 34px;\n min-height: 34px;\n height: 34px;\n padding: 0;\n border-radius: 8px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n color: oklch(0.4 0.01 255);\n}\n.bm-toolbar button:hover:not(:disabled) {\n background: var(--bm-fill);\n color: var(--bm-ink);\n}\n.bm-toolbar button:disabled {\n opacity: 0.35;\n cursor: default;\n}\n.bm-toolbar .bm-danger {\n color: var(--bm-danger-icon);\n}\n.bm-toolbar .bm-danger:hover:not(:disabled) {\n background: var(--bm-danger-soft);\n color: var(--bm-danger-icon);\n}\n.bm-toolbar-active {\n box-shadow:\n 0 0 0 2px var(--bm-primary),\n 0 10px 24px -12px oklch(0.2 0.02 255 / 0.35);\n}\n.bm-toolbar-name {\n display: block;\n max-width: 16rem;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n padding: 0 12px 0 10px;\n}\n.bm-toolbar-title {\n font-size: 14px;\n font-weight: 600;\n color: var(--bm-ink);\n}\n.bm-toolbar-anchor {\n font-family: var(--mono);\n font-size: 12px;\n font-weight: 400;\n color: var(--bm-muted);\n}\n.bm-sep {\n width: 1px;\n align-self: stretch;\n margin: 4px 2px;\n background: var(--line);\n}\n.bm-toolbar .bm-sep {\n align-self: center;\n height: 20px;\n margin: 0 4px;\n background: oklch(0.9 0.005 250);\n}\n.bm-icon {\n width: 16px;\n height: 16px;\n display: block;\n}\n.bm-rich {\n align-items: center;\n flex-wrap: wrap;\n max-width: calc(100vw - 16px);\n}\n.bm-rich button {\n min-height: 32px;\n min-width: 32px;\n}\n.bm-rich input {\n width: 168px;\n min-height: 30px;\n padding: 0 8px;\n border: 0;\n border-radius: 7px;\n background: var(--fill);\n color: var(--ink);\n font-size: 12px;\n}\n.bm-rich input:focus {\n outline: none;\n box-shadow: 0 0 0 2px var(--accent);\n}\n\n/* Heading format bar: each button shows \"Aa\" in its own weight or font over a mono caption. */\n.bm-rich.bm-format-bar {\n flex-wrap: nowrap;\n}\n.bm-rich.bm-format-bar button.bm-fmt {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 2px;\n min-width: 42px;\n height: 48px;\n min-height: 48px;\n padding: 0 8px;\n border-radius: 8px;\n}\n.bm-fmt-sample {\n font-size: 15px;\n line-height: 1;\n color: var(--bm-ink);\n}\n.bm-fmt-caption {\n font-family: var(--mono);\n font-size: 9px;\n letter-spacing: 0.02em;\n color: var(--bm-muted);\n}\n.bm-rich.bm-format-bar button.bm-fmt[aria-pressed=\"true\"] {\n background: var(--bm-saved-bg);\n box-shadow: inset 0 0 0 1px oklch(0.46 0.13 145 / 0.4);\n}\n.bm-format-bar .bm-sep {\n align-self: stretch;\n margin: 6px 4px;\n}\n\n/* Light popovers: add menu, section picker, edit link */\n.bm-popover {\n position: fixed;\n z-index: 7;\n display: flex;\n flex-direction: column;\n gap: 2px;\n min-width: 180px;\n max-height: min(420px, calc(100vh - 16px));\n overflow: auto;\n padding: 6px;\n border-radius: 12px;\n background: #fff;\n box-shadow: var(--bm-shadow-pop);\n}\n.bm-popover > button {\n display: flex;\n align-items: center;\n gap: 8px;\n min-height: 34px;\n padding: 0 10px;\n border: 0;\n border-radius: 7px;\n background: transparent;\n text-align: left;\n font-size: 13px;\n font-weight: 500;\n}\n.bm-popover > button:hover {\n background: var(--fill);\n}\n\n/* Add section picker: wireframe cards */\n.bm-popover[aria-label=\"Add section\"][role=\"listbox\"] {\n gap: 14px;\n width: 640px;\n max-width: calc(100vw - 16px);\n max-height: calc(100vh - 16px);\n padding: 16px;\n border-radius: 14px;\n overflow: visible;\n box-shadow: var(--bm-shadow-dialog);\n}\n.bm-picker-head {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n.bm-picker-title {\n font-size: 17px;\n font-weight: 600;\n letter-spacing: -0.01em;\n}\n.bm-picker-where {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 13px;\n color: var(--bm-muted);\n}\n.bm-picker-grid {\n display: grid;\n grid-template-columns: repeat(3, minmax(0, 1fr));\n gap: 10px;\n max-height: 26rem;\n overflow-y: auto;\n padding: 2px 6px 2px 2px;\n margin-right: -6px;\n scrollbar-gutter: stable;\n}\n.bm-popover .bm-picker-grid > button {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n justify-content: flex-start;\n gap: 6px;\n min-height: 0;\n padding: 8px 8px 10px;\n border: 1px solid oklch(0.9 0.005 250);\n border-radius: 10px;\n background: #fff;\n text-align: left;\n font-weight: 400;\n}\n.bm-popover .bm-picker-grid > button:hover {\n background: #fff;\n border-color: var(--bm-primary);\n box-shadow: 0 0 0 3px oklch(0.46 0.13 145 / 0.12);\n}\n.bm-wire {\n position: relative;\n display: block;\n width: 100%;\n height: 76px;\n border-radius: 7px;\n background: oklch(0.97 0 0);\n overflow: hidden;\n}\n.bm-wire > span {\n position: absolute;\n display: block;\n}\n.bm-type-text {\n display: flex;\n flex-direction: column;\n gap: 2px;\n padding: 0 2px;\n}\n.bm-type-name {\n font-size: 14px;\n font-weight: 600;\n line-height: 1.25;\n color: var(--bm-ink);\n}\n.bm-type-variants {\n font-family: var(--mono);\n font-size: 10px;\n font-weight: 400;\n line-height: 1.35;\n white-space: nowrap;\n color: var(--muted);\n}\n.bm-type-desc {\n padding: 0 2px;\n font-size: 12px;\n line-height: 1.4;\n color: var(--bm-help);\n}\n.bm-picker-note {\n margin: 0;\n font-size: 12px;\n color: var(--bm-muted);\n}\n\n.bm-popover[aria-label=\"Edit link\"] {\n gap: 14px;\n padding: 16px;\n max-height: calc(100vh - 16px);\n}\n\n/* Dialogs and banners */\n.bm-dialog {\n position: fixed;\n z-index: 6;\n display: flex;\n flex-direction: column;\n gap: 16px;\n width: min(400px, calc(100vw - 32px));\n padding: 20px;\n border-radius: 14px;\n background: #fff;\n box-shadow: var(--bm-shadow-dialog);\n}\n.bm-dialog-head {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: 12px;\n}\n.bm-dialog-heading {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n.bm-dialog-sub {\n margin: 0;\n font-size: 13px;\n line-height: 1.4;\n color: var(--bm-help);\n}\n.bm-dialog .bm-dialog-x,\n.bm-popover .bm-dialog-x,\n.bm-modal .bm-dialog-x {\n flex: none;\n width: 32px;\n height: 32px;\n margin: -6px -8px -6px 0;\n background: transparent;\n color: var(--bm-icon);\n}\n.bm-dialog-title {\n margin: 0;\n font-size: 17px;\n font-weight: 600;\n letter-spacing: -0.01em;\n color: var(--bm-ink);\n}\n.bm-popover .bm-dialog-title {\n font-size: 16px;\n}\n.bm-dialog .bm-note {\n color: var(--bm-label);\n font-size: 14px;\n line-height: 1.5;\n}\n.bm-dialog button,\n.bm-popover .bm-actions button,\n.bm-banner button {\n min-height: 38px;\n padding: 0 16px;\n border: 0;\n border-radius: 8px;\n background: var(--fill);\n font-size: 14px;\n font-weight: 400;\n}\n.bm-dialog button:hover:not(:disabled),\n.bm-popover .bm-actions button:hover:not(:disabled) {\n background: var(--fill-hover);\n}\n/* The primary action comes first in the DOM (focus lands on it); row-reverse shows it last, on the right. */\n.bm-actions {\n display: flex;\n flex-direction: row-reverse;\n justify-content: flex-start;\n align-items: center;\n gap: 8px;\n}\n.bm-dialog > .bm-actions,\n.bm-popover[aria-label=\"Edit link\"] > .bm-actions {\n padding-top: 12px;\n border-top: 1px solid var(--bm-divider);\n}\n.bm-dialog-foot {\n display: flex;\n align-items: center;\n gap: 8px;\n padding-top: 12px;\n border-top: 1px solid var(--bm-divider);\n}\n.bm-dialog-foot > .bm-hint {\n flex: 1;\n min-width: 0;\n margin: 0;\n}\n.bm-dialog-foot .bm-actions {\n flex: none;\n}\n\n/* Alert dialogs: [icon tile] [title / body / note] [x] */\n.bm-alert-main {\n display: flex;\n align-items: flex-start;\n gap: 12px;\n}\n.bm-alert-copy {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n.bm-alert-body {\n margin: 0;\n font-size: 14px;\n line-height: 1.5;\n color: var(--bm-label);\n overflow-wrap: anywhere;\n}\n.bm-alert-body strong {\n font-weight: 600;\n color: var(--bm-ink);\n}\n.bm-alert-note {\n margin: 0;\n font-size: 12px;\n line-height: 1.45;\n color: var(--bm-muted);\n}\n.bm-tile {\n flex: none;\n display: grid;\n place-items: center;\n width: 36px;\n height: 36px;\n border-radius: 9px;\n}\n.bm-tile .bm-icon {\n width: 18px;\n height: 18px;\n}\n.bm-tile-warn {\n background: var(--bm-unsaved-bg);\n color: var(--bm-unsaved-fg);\n}\n.bm-tile-danger {\n background: var(--bm-danger-soft);\n color: var(--bm-danger-icon);\n}\n.bm-tile-neutral {\n background: var(--bm-fill);\n color: var(--bm-label);\n}\n\n.bm-banner {\n position: fixed;\n z-index: 6;\n display: flex;\n align-items: center;\n gap: 12px;\n width: min(440px, calc(100vw - 32px));\n padding: 12px 14px;\n border-radius: 12px;\n box-shadow: 0 14px 34px -10px oklch(0.2 0.02 255 / 0.4);\n}\n.bm-banner button {\n min-height: 34px;\n padding: 0 14px;\n font-size: 13px;\n font-weight: 500;\n}\n.bm-banner-ink {\n background: var(--ink);\n color: #fff;\n}\n.bm-banner-light {\n background: #fff;\n box-shadow: var(--shadow-pop);\n}\n.bm-banner-text {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n.bm-banner-title {\n margin: 0;\n font-size: 13px;\n font-weight: 500;\n line-height: 1.35;\n}\n.bm-banner-sub {\n margin: 0;\n font-size: 12px;\n line-height: 1.4;\n opacity: 0.7;\n}\n.bm-banner .bm-actions {\n flex: none;\n gap: 6px;\n}\n.bm-banner-ink button {\n min-height: 30px;\n padding: 0 12px;\n font-size: 12px;\n background: oklch(1 0 0 / 0.12);\n color: #fff;\n}\n.bm-banner-ink button:hover {\n background: oklch(1 0 0 / 0.2);\n}\n.bm-banner-ink .bm-primary {\n background: #fff;\n color: var(--ink);\n}\n.bm-banner-ink .bm-primary:hover {\n background: oklch(0.94 0.003 250);\n}\n.bm-banner-ink :focus-visible {\n outline-color: oklch(0.82 0.14 145);\n}\n.bm-dot-stale {\n background: oklch(0.7 0.18 25) !important;\n}\n.bm-dot-info {\n background: var(--info-dot) !important;\n}\n\n/* Closed editor. The dock sits where the sidebar header's controls sit: header padding (top 14, right 14) minus the dock's 7px padding. */\n\n.bm-dot {\n flex: none;\n width: 8px;\n height: 8px;\n border-radius: 99px;\n background: oklch(0.72 0.17 145);\n}\n.bm-dot-dirty {\n background: var(--warn-dot);\n}\n\n/* Sidebar shell */\n\n/* Bear, name and slogan. Takes the space the controls leave; the text fades out when it no longer fits. */\n\n/* The same two lines, in a card left of the sidebar (over the page), level with the header, while the pointer is on\n the brand. 16px is the header's left padding: the card clears the sidebar edge by 10px. */\n\n/* A ring with one open quarter that turns while a save is written and the page reloads. */\n.bm-spin {\n flex: none;\n width: 14px;\n height: 14px;\n border: 2px solid currentColor;\n border-right-color: transparent;\n border-radius: 50%;\n animation: bm-spin 0.8s linear infinite;\n}\n@keyframes bm-spin {\n to {\n transform: rotate(360deg);\n }\n}\n@media (prefers-reduced-motion: reduce) {\n .bm-spin {\n animation: none;\n }\n}\n.bm-faces {\n display: grid;\n}\n.bm-face {\n grid-area: 1 / 1;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n white-space: nowrap;\n}\n.bm-face[hidden-face] {\n visibility: hidden;\n}\n.bm-save:disabled {\n opacity: 0.85;\n cursor: progress;\n}\n\n.bm-pill {\n flex: none;\n display: inline-flex;\n align-items: center;\n gap: 6px;\n height: 24px;\n padding: 0 10px;\n border-radius: 999px;\n background: var(--bm-saved-bg);\n color: var(--bm-saved-fg);\n font-size: 12px;\n font-weight: 500;\n}\n.bm-pill .bm-dot {\n width: 6px;\n height: 6px;\n background: var(--accent);\n}\n.bm-pill-dirty {\n background: var(--warn-tint);\n color: var(--warn-ink);\n}\n.bm-pill-dirty .bm-dot {\n background: var(--warn-dot);\n}\nbutton.bm-pill-btn {\n min-height: 0;\n padding: 0 10px;\n border: 0;\n border-radius: 999px;\n background: var(--warn-tint);\n color: var(--warn-ink);\n font-family: inherit;\n font-size: 12px;\n font-weight: 500;\n cursor: pointer;\n}\nbutton.bm-pill-btn:hover:not(:disabled) {\n background: oklch(0.93 0.06 75);\n color: var(--warn-ink);\n}\nbutton.bm-pill-btn:focus-visible {\n outline: 2px solid var(--accent);\n outline-offset: 2px;\n}\n.bm-dialog-wide {\n width: min(400px, calc(100vw - 32px));\n}\n.bm-dialog .bm-actions {\n flex-wrap: nowrap;\n}\n.bm-dialog .bm-actions button {\n flex: none;\n white-space: nowrap;\n}\n.bm-changes {\n width: min(540px, calc(100vw - 32px));\n}\n.bm-commit-files {\n list-style: none;\n margin: 0;\n padding: 0;\n display: flex;\n flex-direction: column;\n gap: 4px;\n max-height: min(34vh, 280px);\n overflow-y: auto;\n}\n.bm-commit-files label {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 13px;\n cursor: pointer;\n}\n.bm-commit-mark {\n font:\n 600 11px / 1 ui-monospace,\n monospace;\n width: 18px;\n text-align: center;\n opacity: 0.7;\n}\n.bm-commit-msg {\n width: 100%;\n box-sizing: border-box;\n resize: vertical;\n font: inherit;\n font-size: 14px;\n padding: 8px 12px;\n border: 1px solid var(--line);\n border-radius: 8px;\n background: transparent;\n color: inherit;\n}\n\n/* Unsaved changes review and version history: groups, rows, diff lines */\n.bm-changes-list {\n display: flex;\n flex-direction: column;\n gap: 16px;\n max-height: 22rem;\n overflow-y: auto;\n margin: 0 -4px;\n padding: 0 4px;\n}\n.bm-changes-group {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n.bm-changes-area {\n margin: 0;\n display: flex;\n align-items: baseline;\n gap: 8px;\n font-family: var(--mono);\n font-size: 11px;\n font-weight: 500;\n letter-spacing: 0.1em;\n text-transform: uppercase;\n color: var(--bm-section);\n}\n.bm-changes-file {\n font-weight: 400;\n letter-spacing: 0;\n text-transform: none;\n color: oklch(0.55 0.01 255);\n}\n.bm-changes-count {\n margin-left: auto;\n font-weight: 400;\n letter-spacing: 0;\n color: var(--bm-muted);\n}\n.bm-changes ul {\n display: flex;\n flex-direction: column;\n margin: 0;\n padding: 0;\n list-style: none;\n border: 1px solid var(--bm-border);\n border-radius: 10px;\n overflow: hidden;\n}\n.bm-change {\n display: flex;\n align-items: flex-start;\n gap: 10px;\n padding: 10px;\n font-size: 14px;\n line-height: 1.4;\n}\n.bm-change + .bm-change {\n border-top: 1px solid var(--bm-divider);\n}\n.bm-change-mark {\n flex: none;\n display: grid;\n place-items: center;\n width: 22px;\n height: 22px;\n border-radius: 6px;\n font-family: var(--mono);\n font-size: 13px;\n font-weight: 600;\n background: var(--bm-unsaved-bg);\n color: var(--bm-unsaved-fg);\n}\n.bm-change-added .bm-change-mark {\n background: var(--bm-badge-green-bg);\n color: var(--bm-badge-green-fg);\n}\n.bm-change-removed .bm-change-mark {\n background: var(--bm-danger-soft);\n color: var(--bm-danger-text);\n}\n.bm-change-body {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n.bm-change-field {\n font-weight: 500;\n color: var(--bm-ink);\n overflow-wrap: anywhere;\n}\n.bm-change-values {\n display: flex;\n flex-direction: column;\n gap: 3px;\n min-width: 0;\n}\n.bm-change-values del,\n.bm-change-values ins {\n display: flex;\n gap: 6px;\n min-width: 0;\n padding: 3px 7px;\n border-radius: 5px;\n text-decoration: none;\n font-size: 13px;\n}\n.bm-change-values del {\n background: var(--bm-diff-del-bg);\n color: var(--bm-diff-del-fg);\n}\n.bm-change-values ins {\n background: var(--bm-diff-add-bg);\n color: var(--bm-diff-add-fg);\n}\n.bm-change-values del::before {\n content: \"\\2212\";\n flex: none;\n font-family: var(--mono);\n}\n.bm-change-values ins::before {\n content: \"+\";\n flex: none;\n font-family: var(--mono);\n}\n.bm-change-values del > span,\n.bm-change-values ins > span {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.bm-change-values del > span {\n text-decoration: line-through;\n text-decoration-color: oklch(0.45 0.13 25 / 0.5);\n}\n.bm-changes-empty {\n margin: 0;\n padding: 24px 0;\n text-align: center;\n font-size: 14px;\n color: var(--bm-muted);\n}\n\n.bm-changes ul.bm-versions {\n gap: 0;\n}\n.bm-version {\n padding: 0;\n}\n.bm-version + .bm-version {\n border-top: 1px solid var(--bm-divider);\n}\n.bm-version-when strong {\n font-weight: 600;\n}\n.bm-tipped {\n position: relative;\n}\n.bm-tipped::after {\n content: attr(data-tip);\n position: absolute;\n right: calc(100% + 6px);\n top: 50%;\n transform: translateY(-50%);\n padding: 4px 8px;\n border-radius: 6px;\n background: var(--ink);\n color: #fff;\n font-size: 12px;\n font-weight: 500;\n line-height: 1.3;\n white-space: nowrap;\n pointer-events: none;\n visibility: hidden;\n z-index: 5;\n}\n.bm-version-row > .bm-tipped:first-child::after {\n right: auto;\n left: calc(100% + 6px);\n}\n.bm-tipped:hover::after,\n.bm-tipped:focus-visible::after {\n visibility: visible;\n}\n.bm-version-row {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 8px 8px 8px 10px;\n}\n.bm-version-when {\n flex: 1;\n min-width: 0;\n margin-right: auto;\n padding: 0 !important;\n min-height: 32px !important;\n font-weight: 500;\n display: flex !important;\n flex-direction: column;\n align-items: flex-start !important;\n justify-content: center;\n gap: 2px;\n text-align: left;\n}\n.bm-version-line {\n display: flex;\n align-items: baseline;\n gap: 8px;\n}\n.bm-version-sum {\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 12px;\n font-weight: 400;\n color: var(--bm-help);\n}\n.bm-version-row .bm-restore {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n flex: none;\n min-height: 32px;\n padding: 0 10px;\n border-radius: 7px;\n font-size: 13px;\n font-weight: 500;\n}\n.bm-version-rel {\n font-size: 14px;\n font-weight: 500;\n color: var(--bm-ink);\n}\n.bm-version-abs {\n font-family: var(--mono);\n font-size: 11px;\n color: var(--bm-muted);\n}\n.bm-version-diff {\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 4px 10px 12px 10px;\n border-top: 1px solid var(--bm-divider);\n margin-top: 0;\n}\n.bm-version-diff ul {\n margin: 0;\n}\n.bm-day {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n.bm-restored {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 8px 8px 8px 12px;\n border-radius: 9px;\n background: var(--bm-diff-add-bg);\n color: var(--bm-saved-fg);\n font-size: 13px;\n}\n.bm-restored > span {\n flex: 1;\n min-width: 0;\n}\n\n.bm-tabs {\n display: flex;\n gap: 0;\n padding: 0 12px;\n overflow-x: auto;\n border-bottom: 1px solid var(--bm-tab-rule);\n}\n.bm-tabs button {\n flex: 1 1 auto;\n height: 46px;\n padding: 0 6px;\n border: 0;\n border-radius: 0;\n background: transparent;\n color: oklch(0.48 0.01 255);\n font-size: 13px;\n font-weight: 400;\n}\n.bm-tabs button:hover {\n color: var(--ink);\n background: var(--fill-soft);\n}\n.bm-tabs button[aria-selected=\"true\"] {\n color: var(--ink);\n background: transparent;\n font-weight: 600;\n box-shadow: inset 0 -2px 0 var(--accent);\n}\n.bm-tabs button:focus-visible {\n outline-offset: -2px;\n}\n\n.bm-body {\n flex: 1;\n min-height: 0;\n overflow: auto;\n padding: 24px 24px 32px;\n display: flex;\n flex-direction: column;\n gap: 18px;\n}\n\n/* Group header: mono 11/500, then a 1px rule. With a right-hand item the rule sits on the flex wrapper. */\n.bm-group {\n margin: 18px 0 0;\n padding-bottom: 10px;\n border-bottom: 1px solid var(--bm-divider);\n font-family: var(--mono);\n font-size: 11px;\n font-weight: 500;\n letter-spacing: 0.1em;\n text-transform: uppercase;\n color: var(--bm-section);\n}\n.bm-group:first-child {\n margin-top: 0;\n}\n.bm-stack-tight > .bm-group {\n margin-bottom: 10px;\n}\n.bm-meta {\n margin: 0;\n font-family: var(--mono);\n font-size: 11px;\n color: var(--muted);\n}\n\n/* Fields */\n.bm-label {\n display: flex;\n flex-direction: column;\n gap: 8px;\n font-size: 13px;\n font-weight: 500;\n color: var(--bm-label);\n}\n.bm-field {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n.bm-hint {\n font-size: 12px;\n line-height: 1.45;\n font-weight: 400;\n color: var(--muted);\n}\n.bm-label-text {\n display: inline-flex;\n align-items: center;\n min-width: 0;\n}\n.bm-info {\n position: relative;\n display: inline-flex;\n align-items: center;\n vertical-align: middle;\n margin-left: 4px;\n}\n.bm-info-btn {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 20px;\n height: 20px;\n margin: -3px 0;\n border-radius: 999px;\n color: var(--bm-info);\n cursor: help;\n text-transform: none;\n letter-spacing: 0;\n}\n.bm-info-btn:hover,\n.bm-info-btn[aria-expanded=\"true\"] {\n color: var(--ink);\n}\n.bm-info-btn:focus-visible {\n outline: 2px solid var(--accent);\n outline-offset: 1px;\n}\n.bm-tip {\n position: fixed;\n z-index: 2147483647;\n visibility: hidden;\n pointer-events: none;\n padding: 8px 10px;\n border-radius: 8px;\n box-sizing: border-box;\n background: var(--ink);\n color: oklch(0.98 0.003 250);\n font-family: var(--sans, inherit);\n font-size: 12px;\n line-height: 1.45;\n font-weight: 400;\n text-transform: none;\n letter-spacing: 0;\n text-align: left;\n white-space: normal;\n box-shadow: 0 6px 20px rgb(0 0 0 / 0.25);\n}\n.bm-tip-open {\n visibility: visible;\n}\n:is(.bm-panel, .bm-popover, .bm-seo, .bm-consent) :where(input:not([type=\"checkbox\"]):not([type=\"file\"]), select, textarea) {\n width: 100%;\n min-height: 40px;\n padding: 0 12px;\n border: 1px solid var(--bm-border);\n border-radius: 8px;\n background: #fff;\n color: var(--ink);\n font-size: 14px;\n font-weight: 400;\n outline: none;\n}\n:is(.bm-panel, .bm-popover, .bm-seo, .bm-consent) textarea {\n padding: 8px 12px;\n min-height: 72px;\n line-height: 1.5;\n resize: vertical;\n}\n:is(.bm-panel, .bm-popover) select:not([size]) {\n appearance: none;\n padding-right: 32px;\n /* A caret made of gradients, not a `data:` image: a site's Content-Security-Policy can block those. */\n background-image: linear-gradient(45deg, transparent 50%, #777 50%), linear-gradient(135deg, #777 50%, transparent 50%);\n background-size: 6px 6px;\n background-repeat: no-repeat;\n background-position:\n right 17px center,\n right 12px center;\n}\n.bm-panel select[size],\n.bm-popover select[size] {\n padding: 4px;\n font-size: 12px;\n}\n.bm-panel select[size] option,\n.bm-panel select[size] optgroup,\n.bm-popover select[size] option,\n.bm-popover select[size] optgroup {\n padding: 3px 6px;\n}\n:is(.bm-panel, .bm-popover, .bm-seo, .bm-consent) :where(input:not([type=\"checkbox\"]):not([type=\"file\"]), select, textarea):focus {\n border-color: var(--bm-primary);\n box-shadow: 0 0 0 3px var(--bm-primary-ring);\n}\n:is(.bm-panel, .bm-popover, .bm-seo, .bm-consent) :where(input[aria-label=\"Link URL\"], .bm-mono) {\n font-family: var(--mono);\n font-size: 13px;\n}\n.bm-prefix-wrap {\n display: flex;\n align-items: center;\n min-height: 40px;\n border: 1px solid var(--bm-border);\n border-radius: 8px;\n background: #fff;\n overflow: hidden;\n}\n.bm-prefix-wrap:focus-within {\n border-color: var(--bm-primary);\n box-shadow: 0 0 0 3px var(--bm-primary-ring);\n}\n.bm-prefix {\n padding: 0 2px 0 12px;\n font-family: var(--mono);\n font-size: 13px;\n color: var(--muted);\n}\n.bm-prefix-wrap input {\n border: 0;\n box-shadow: none !important;\n min-height: 38px;\n padding-left: 2px;\n font-family: var(--mono);\n font-size: 13px;\n}\n.bm-stack {\n display: flex;\n flex-direction: column;\n gap: 18px;\n}\n.bm-stack-tight {\n gap: 8px;\n}\n.bm-groups {\n gap: 36px;\n}\n.bm-list {\n display: flex;\n flex-direction: column;\n border-radius: 10px;\n box-shadow: 0 0 0 1px var(--bm-border);\n overflow: hidden;\n}\n.bm-list-row {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 8px 10px 8px 12px;\n border-bottom: 1px solid var(--line-soft);\n}\n.bm-list-row:last-child {\n border-bottom: 0;\n}\n.bm-list-row-on {\n background: var(--accent-tint);\n}\n.bm-list-row a {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n color: var(--ink);\n text-decoration: none;\n}\n.bm-list-row a:hover .bm-list-title {\n text-decoration: underline;\n}\n.bm-list-title {\n font-size: 14px;\n font-weight: 500;\n}\n.bm-list-path {\n font-family: var(--mono);\n font-size: 11px;\n color: var(--muted);\n}\n.bm-badge-home {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n background: var(--bm-badge-green-bg);\n color: var(--bm-badge-green-fg);\n}\n.bm-badge {\n font-family: var(--mono);\n font-size: 11px;\n padding: 3px 7px;\n border-radius: 5px;\n background: var(--bm-badge-amber-bg);\n color: var(--bm-badge-amber-fg);\n}\n.bm-badge-system {\n background: var(--fill);\n color: var(--ink-2);\n}\n.bm-badge-on {\n background: var(--bm-badge-green-bg);\n color: var(--bm-badge-green-fg);\n}\n.bm-row {\n display: flex;\n gap: 6px;\n align-items: center;\n flex-wrap: wrap;\n}\n.bm-row-split {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 10px;\n}\n.bm-error {\n color: var(--danger-ink);\n font-size: 12px;\n font-weight: 400;\n margin: 0;\n}\n.bm-warn {\n color: var(--warn-ink);\n font-size: 12px;\n margin: 0;\n}\n.bm-note {\n margin: 0;\n color: var(--bm-help);\n font-size: 13px;\n line-height: 1.55;\n font-weight: 400;\n}\n.bm-group + .bm-note,\n.bm-group-split + .bm-note {\n margin-top: -4px;\n}\n\n/* Switch: 36 x 20, knob 16 inset 2 */\n.bm-check {\n flex-direction: row;\n align-items: center;\n gap: 10px;\n font-weight: 500;\n}\n:is(.bm-check, .bm-switch-row) input[type=\"checkbox\"] {\n appearance: none;\n position: relative;\n flex: none;\n width: 36px;\n height: 20px;\n margin: 0;\n border-radius: 999px;\n background: var(--bm-switch-off);\n cursor: pointer;\n transition: background 0.15s;\n}\n:is(.bm-check, .bm-switch-row) input[type=\"checkbox\"]::before {\n content: \"\";\n position: absolute;\n top: 2px;\n left: 2px;\n width: 16px;\n height: 16px;\n border-radius: 50%;\n background: #fff;\n box-shadow: 0 1px 2px oklch(0 0 0 / 0.2);\n transition: transform 0.15s;\n}\n:is(.bm-check, .bm-switch-row) input[type=\"checkbox\"]:checked {\n background: var(--bm-primary);\n}\n:is(.bm-check, .bm-switch-row) input[type=\"checkbox\"]:checked::before {\n transform: translateX(16px);\n}\n.bm-popover .bm-check {\n color: var(--bm-label);\n font-size: 14px;\n}\n\n/* Buttons inside the sidebar */\n.bm-panel :where(button:not([role=\"tab\"]):not([role=\"radio\"]):not(.bm-grip-handle)) {\n min-height: 32px;\n padding: 0 12px;\n border: 0;\n border-radius: 8px;\n background: var(--fill);\n color: var(--ink);\n font-size: 13px;\n font-weight: 500;\n}\n.bm-panel :where(button:not([role=\"tab\"]):not([role=\"radio\"]):not(.bm-grip-handle)):hover:not(:disabled) {\n background: var(--fill-hover);\n}\n.bm-panel button:disabled {\n opacity: 0.45;\n cursor: default;\n}\n/* Dashed \"Add ...\" buttons: Add link, Add button, Add column, Add item */\n.bm-panel .bm-add {\n min-height: 44px;\n background: oklch(0.985 0.002 250);\n color: var(--bm-link);\n border: 1px dashed oklch(0.85 0.005 250);\n border-radius: 8px;\n}\n.bm-panel .bm-add:hover:not(:disabled) {\n background: var(--accent-tint);\n}\n\n/* Cards, lists, images */\n.bm-card {\n position: relative;\n display: flex;\n flex-direction: column;\n gap: 10px;\n padding: 12px;\n border: 1px solid var(--bm-border);\n border-radius: 10px;\n background: #fff;\n}\n.bm-card .bm-card {\n background: var(--bm-fill-nested);\n border-color: var(--line-soft);\n}\n.bm-card > .bm-label:first-child:not(:only-child) {\n font-family: var(--mono);\n font-size: 11px;\n letter-spacing: 0.04em;\n font-weight: 500;\n color: var(--muted);\n}\n.bm-card[draggable=\"true\"] {\n cursor: grab;\n}\n/* Drag and drop: the target shows what a drop would do. */\n.bm-dragging {\n opacity: 0.4;\n}\n.bm-drop-before,\n.bm-drop-after,\n.bm-drop-child {\n --drop: var(--accent);\n}\n.bm-drop-before::before,\n.bm-drop-after::before {\n content: \"\";\n position: absolute;\n left: 0;\n right: 0;\n height: 3px;\n border-radius: 3px;\n background: var(--drop);\n box-shadow: 0 0 0 2px var(--accent-ring);\n pointer-events: none;\n z-index: 2;\n}\n.bm-drop-before::before {\n top: -6px;\n}\n.bm-drop-after::before {\n bottom: -6px;\n}\n.bm-drop-child {\n box-shadow: inset 0 0 0 2px var(--drop);\n background: var(--accent-tint);\n}\n.bm-drop-before::after,\n.bm-drop-after::after,\n.bm-drop-child::after,\n.bm-drop-files::after {\n content: attr(data-drop-hint);\n position: absolute;\n right: 8px;\n padding: 3px 8px;\n border-radius: 6px;\n background: var(--ink);\n color: #fff;\n font-size: 11px;\n font-weight: 500;\n line-height: 1.3;\n white-space: nowrap;\n pointer-events: none;\n z-index: 3;\n}\n.bm-drop-before::after {\n top: -22px;\n}\n.bm-drop-after::after {\n bottom: -22px;\n}\n.bm-drop-child::after {\n top: -11px;\n right: 12px;\n}\n.bm-drop-files {\n box-shadow: inset 0 0 0 2px var(--accent);\n background: var(--accent-tint);\n}\n.bm-drop-files::after {\n top: -11px;\n right: 12px;\n}\n.bm-thumb {\n width: 100%;\n height: 96px;\n object-fit: cover;\n border-radius: 7px;\n background: var(--fill);\n}\n.bm-drop {\n display: flex;\n flex-direction: column;\n gap: 8px;\n border: 1px dashed var(--line);\n border-radius: 10px;\n padding: 10px;\n background: var(--fill-soft);\n}\n.bm-drop input[type=\"file\"] {\n width: 100%;\n font-size: 12px;\n color: var(--muted);\n}\n.bm-drop input[type=\"file\"]::file-selector-button {\n height: 32px;\n margin-right: 10px;\n padding: 0 12px;\n border: 0;\n border-radius: 7px;\n background: var(--ink);\n color: #fff;\n font: inherit;\n font-size: 12px;\n font-weight: 500;\n cursor: pointer;\n}\n.bm-alert {\n display: flex;\n flex-direction: column;\n gap: 6px;\n padding: 12px 14px;\n border-radius: 12px;\n background: var(--danger-tint);\n box-shadow: 0 0 0 1px oklch(0.55 0.18 25 / 0.35);\n}\n.bm-alert-title {\n display: flex;\n align-items: center;\n gap: 8px;\n margin: 0;\n font-size: 13px;\n font-weight: 600;\n color: var(--danger-ink);\n}\n.bm-alert .bm-error {\n font-family: var(--mono);\n font-size: 11px;\n}\n.bm-alert-notice {\n background: var(--warn-tint);\n box-shadow: 0 0 0 1px oklch(0.45 0.09 65 / 0.2);\n}\n.bm-alert-notice .bm-note {\n color: var(--warn-ink);\n font-size: 12px;\n}\n\n/* Header actions */\n.bm-save {\n flex: none;\n display: inline-flex;\n align-items: center;\n gap: 8px;\n height: 34px;\n padding: 0 12px;\n border: 0;\n border-radius: 8px;\n background: var(--accent);\n color: #fff;\n font-size: 13px;\n font-weight: 600;\n}\n.bm-dialog .bm-primary kbd {\n font-family: var(--mono);\n font-size: 11px;\n font-weight: 400;\n margin-left: 8px;\n opacity: 0.8;\n}\n.bm-save kbd {\n font-family: var(--mono);\n font-size: 10px;\n font-weight: 400;\n opacity: 0.75;\n}\n/* Icon buttons: 32 x 32, transparent, grey icon, grey fill on hover. */\n.bm-icon-btn {\n flex: none;\n display: inline-grid;\n place-items: center;\n width: 32px;\n height: 32px;\n min-height: 0 !important;\n padding: 0 !important;\n border: 0;\n border-radius: 7px;\n background: transparent;\n color: var(--bm-icon);\n}\n.bm-icon-btn:hover:not(:disabled) {\n background: var(--bm-fill);\n color: var(--bm-ink);\n}\n.bm-icon-btn:disabled {\n opacity: 0.35;\n}\n.bm-close {\n width: 32px;\n height: 32px;\n background: transparent;\n color: var(--bm-icon);\n border-radius: 7px;\n}\n.bm-close:hover:not(:disabled) {\n background: var(--fill) !important;\n color: var(--ink);\n}\n\n.bm-panel .bm-icon-btn.bm-danger {\n color: var(--bm-danger-icon);\n}\n.bm-panel .bm-icon-btn.bm-danger:hover:not(:disabled) {\n background: var(--bm-danger-soft);\n color: var(--bm-danger-icon);\n}\n.bm-small {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n min-height: 28px !important;\n padding: 0 10px !important;\n font-family: var(--sans);\n font-size: 12px !important;\n letter-spacing: 0;\n text-transform: none;\n align-self: flex-start;\n}\n.bm-group-split {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n margin-top: 18px;\n margin-bottom: 0;\n padding-bottom: 10px;\n border-bottom: 1px solid var(--bm-divider);\n}\n.bm-group-split:first-child {\n margin-top: 0;\n}\n.bm-group-split > .bm-group {\n margin: 0;\n padding: 0;\n border: 0;\n}\n.bm-group-split .bm-small {\n text-transform: none;\n letter-spacing: 0;\n}\n.bm-group-split span.bm-small {\n font-family: var(--mono);\n font-size: 11px !important;\n font-weight: 400;\n color: var(--bm-muted);\n padding: 0 !important;\n min-height: 0 !important;\n}\n.bm-stack-tight > .bm-group-split {\n margin-bottom: 10px;\n}\n\n/* Labels with a right-hand tag */\n.bm-label.bm-label-row,\n.bm-label-row {\n flex-direction: row;\n display: flex;\n align-items: baseline;\n justify-content: space-between;\n gap: 8px;\n}\n.bm-meta-tag {\n font-family: var(--mono);\n font-size: 11px;\n font-weight: 400;\n letter-spacing: 0;\n color: var(--bm-muted);\n}\n\n/* Switch rows */\n.bm-switch-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 16px;\n cursor: pointer;\n}\n.bm-switch-text {\n display: flex;\n flex-direction: column;\n gap: 2px;\n min-width: 0;\n}\n.bm-switch-title {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n font-size: 14px;\n font-weight: 500;\n color: var(--bm-label);\n}\n\n/* Tone cards and segmented controls */\n.bm-tones {\n display: grid;\n grid-template-columns: repeat(4, 1fr);\n gap: 6px;\n}\n:is(.bm-panel, .bm-popover) .bm-tone {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n gap: 6px;\n min-height: 0;\n padding: 5px 5px 6px;\n border-radius: 9px;\n background: #fff;\n border: 0;\n box-shadow: inset 0 0 0 1px var(--bm-border);\n font-size: 12px;\n font-weight: 500;\n text-align: center;\n}\n:is(.bm-panel, .bm-popover) .bm-tone:hover {\n background: var(--fill-soft);\n}\n:is(.bm-panel, .bm-popover) .bm-tone[aria-checked=\"true\"] {\n box-shadow: inset 0 0 0 2px var(--accent);\n background: #fff;\n}\n.bm-tones-2 {\n grid-template-columns: repeat(2, 1fr);\n}\n.bm-tones-3 {\n grid-template-columns: repeat(3, 1fr);\n}\n/* A miniature of each button look, drawn with the editor's colours so it does not depend on the site theme. */\n.bm-btnsample {\n display: grid;\n place-items: center;\n height: 26px;\n border-radius: 6px;\n background: var(--fill-soft);\n}\n.bm-btnsample > span {\n display: block;\n font-size: 10px;\n font-weight: 600;\n line-height: 1;\n}\n.bm-btnsample-default > span {\n color: var(--ink-2);\n}\n.bm-btnsample-primary > span {\n padding: 5px 12px;\n border-radius: 999px;\n background: var(--accent);\n color: #fff;\n}\n.bm-btnsample-secondary > span {\n padding: 5px 12px;\n border-radius: 999px;\n color: var(--ink);\n box-shadow: inset 0 0 0 1px var(--ink-2);\n}\n.bm-btnsample-tertiary > span {\n color: var(--accent);\n text-decoration: underline;\n text-underline-offset: 3px;\n}\n.bm-swatch {\n display: inline-block;\n flex: none;\n width: 10px;\n height: 10px;\n border-radius: 3px;\n box-shadow: inset 0 0 0 1px oklch(0.2 0.02 255 / 0.15);\n}\n.bm-swatch-lg {\n display: block;\n width: auto;\n height: 22px;\n border-radius: 6px;\n}\n.bm-swatch-base {\n background: #fff;\n}\n.bm-swatch-subtle {\n background: oklch(0.96 0.005 250);\n}\n.bm-swatch-inverse {\n background: var(--ink);\n}\n.bm-swatch-brand {\n background: var(--accent);\n}\n.bm-segmented {\n display: flex;\n padding: 3px;\n border-radius: 9px;\n background: var(--bm-fill);\n}\n.bm-panel .bm-segmented button,\n.bm-dialog .bm-segmented button {\n flex: 1;\n min-height: 36px;\n height: 36px;\n padding: 0 8px;\n border: 0;\n border-radius: 7px;\n background: transparent;\n color: oklch(0.45 0.01 255);\n font-size: 13px;\n font-weight: 400;\n}\n.bm-panel .bm-segmented button:hover:not(:disabled),\n.bm-dialog .bm-segmented button:hover:not(:disabled) {\n background: oklch(1 0 0 / 0.5);\n}\n.bm-panel .bm-segmented button[aria-checked=\"true\"],\n.bm-dialog .bm-segmented button[aria-checked=\"true\"] {\n background: #fff;\n color: var(--ink);\n box-shadow: var(--bm-shadow-segment-on);\n}\n.bm-icon-picker {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));\n gap: 4px;\n padding: 3px;\n border-radius: 9px;\n background: var(--bm-fill);\n}\n.bm-panel .bm-icon-picker button {\n display: grid;\n place-items: center;\n min-height: 40px;\n height: 40px;\n padding: 0;\n border: 0;\n border-radius: 7px;\n background: transparent;\n color: oklch(0.45 0.01 255);\n}\n.bm-panel .bm-icon-picker button:hover {\n background: oklch(1 0 0 / 0.5);\n color: var(--ink);\n}\n.bm-panel .bm-icon-picker button[aria-checked=\"true\"] {\n background: #fff;\n color: var(--accent);\n box-shadow: var(--bm-shadow-segment-on);\n}\n.bm-icon-picker svg {\n width: 20px;\n height: 20px;\n}\n.bm-actions-split {\n display: flex;\n gap: 8px;\n padding-top: 4px;\n}\n.bm-actions-split button {\n flex: 1;\n min-height: 40px !important;\n font-size: 14px !important;\n}\n.bm-panel .bm-actions-split .bm-danger {\n background: var(--bm-danger-soft);\n}\n\n/* Arrays, links, images */\n.bm-array {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n.bm-array-row {\n position: relative;\n}\n.bm-array-grip {\n cursor: grab;\n}\n.bm-array-item {\n border: 1px solid var(--bm-border);\n border-radius: 10px;\n background: #fff;\n overflow: hidden;\n}\n.bm-array-item summary {\n display: flex;\n align-items: center;\n gap: 8px;\n min-height: 44px;\n padding: 0 8px 0 10px;\n font-size: 14px;\n font-weight: 500;\n color: var(--ink);\n cursor: pointer;\n list-style: none;\n}\n.bm-array-item summary::-webkit-details-marker {\n display: none;\n}\n.bm-array-item summary:hover {\n background: var(--fill-soft);\n}\n.bm-array-summary {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.bm-grip,\n.bm-chevron {\n display: inline-grid;\n place-items: center;\n color: oklch(0.65 0.01 255);\n}\n.bm-chevron {\n transition: transform 0.12s;\n}\ndetails[open] > summary .bm-chevron {\n transform: rotate(90deg);\n}\n.bm-array-body {\n display: flex;\n flex-direction: column;\n gap: 18px;\n padding: 12px;\n background: var(--bm-fill-nested);\n border-top: 1px solid var(--line-soft);\n}\n.bm-row-end {\n justify-content: flex-end;\n}\n.bm-panel .bm-add-row {\n width: 100%;\n}\n.bm-link-btn {\n display: flex;\n align-items: center;\n gap: 10px;\n width: 100%;\n min-height: 40px;\n padding: 0 12px;\n border: 1px solid var(--bm-border);\n border-radius: 8px;\n background: #fff;\n text-align: left;\n color: var(--ink-2);\n}\n.bm-panel .bm-link-btn {\n background: #fff;\n border: 1px solid var(--bm-border);\n font-size: 14px;\n padding: 0 12px;\n}\n.bm-panel .bm-link-btn:hover:not(:disabled) {\n background: #fff;\n border-color: oklch(0.8 0.005 250);\n}\n.bm-link-label {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: var(--ink);\n font-weight: 500;\n}\n.bm-link-href {\n font-family: var(--mono);\n font-size: 11px;\n color: var(--muted);\n max-width: 45%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.bm-stripes {\n background: repeating-linear-gradient(135deg, oklch(0.93 0.004 250) 0 6px, oklch(0.965 0.003 250) 6px 12px);\n}\n\n/* Image field: label above, compact 56px row, alt text under it */\n.bm-imagefield {\n position: relative;\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n.bm-image-row {\n display: flex;\n gap: 10px;\n align-items: center;\n}\n.bm-image-row .bm-thumb {\n flex: none;\n width: 56px;\n height: 56px;\n border-radius: 6px;\n}\n.bm-image-meta {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n gap: 6px;\n justify-content: center;\n}\n.bm-image-path {\n font-family: var(--mono);\n font-size: 12px;\n color: var(--bm-label);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.bm-panel .bm-alt {\n min-height: 40px;\n font-size: 14px;\n}\n.bm-image-actions {\n flex-wrap: nowrap;\n gap: 6px;\n}\n.bm-image-actions > button:not(.bm-icon-btn) {\n flex: 1;\n min-height: 36px;\n font-size: 13px;\n}\n.bm-layout {\n display: flex;\n flex-direction: column;\n gap: 10px;\n padding-top: 2px;\n}\n.bm-layout-row {\n display: grid;\n grid-template-columns: 56px 1fr;\n align-items: center;\n column-gap: 10px;\n row-gap: 4px;\n}\n.bm-layout-row .bm-label {\n margin: 0;\n}\n.bm-layout-row .bm-layout-hint {\n grid-column: 2;\n}\n.bm-position {\n display: grid;\n grid-template-columns: repeat(3, 20px);\n grid-template-rows: repeat(3, 20px);\n gap: 3px;\n padding: 4px;\n width: max-content;\n border-radius: 8px;\n background: var(--fill);\n}\n.bm-panel .bm-position-cell {\n width: 20px;\n height: 20px;\n min-height: 0;\n padding: 0;\n border: 0;\n border-radius: 5px;\n background: #fff;\n box-shadow: inset 0 0 0 1px var(--line);\n}\n.bm-panel .bm-position-cell:hover:not(:disabled) {\n background: var(--accent-tint);\n}\n.bm-panel .bm-position-cell[aria-checked=\"true\"],\n.bm-panel .bm-position-cell[aria-checked=\"true\"]:hover:not(:disabled) {\n background: var(--accent);\n box-shadow: none;\n}\n.bm-panel .bm-position-cell:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n}\n.bm-slot,\n.bm-dropzone {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 4px;\n width: 100%;\n min-height: 96px;\n padding: 14px;\n border: 1.5px dashed oklch(0.82 0.006 250);\n border-radius: 10px;\n background: var(--fill-soft);\n color: var(--ink-2);\n text-align: center;\n cursor: pointer;\n}\n.bm-panel .bm-slot:hover:not(:disabled),\n.bm-dropzone:hover {\n border-color: var(--accent);\n background: var(--accent-tint);\n}\n.bm-dropzone {\n min-height: 180px;\n position: relative;\n}\n.bm-dropzone:focus-within {\n outline: 2px solid var(--accent);\n outline-offset: 2px;\n}\n.bm-dropzone-over {\n border-color: var(--accent);\n background: var(--accent-tint);\n}\n.bm-slot-title {\n font-size: 13px;\n font-weight: 600;\n color: var(--ink);\n}\n.bm-slot-hint {\n font-size: 11px;\n color: var(--muted);\n}\n.bm-scrim {\n position: fixed;\n inset: 0;\n z-index: 7;\n display: flex;\n align-items: flex-start;\n justify-content: center;\n padding: 10vh 16px 16px;\n background: oklch(0.2 0.01 255 / 0.4);\n}\n.bm-modal {\n display: flex;\n flex-direction: column;\n width: min(480px, 100%);\n max-height: min(560px, 80vh);\n overflow: hidden;\n padding: 20px 0 0;\n border-radius: 14px;\n background: #fff;\n box-shadow: var(--bm-shadow-dialog);\n}\n.bm-modal-head {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 0 20px 12px;\n}\n.bm-modal-head .bm-dialog-title {\n flex: none;\n}\n.bm-modal-head .bm-meta-tag {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.bm-modal-head .bm-icon-btn {\n margin: -6px -8px -6px 0;\n}\n.bm-modal .bm-tabs {\n margin: 0 20px;\n padding: 3px;\n gap: 0;\n border: 0;\n border-radius: 9px;\n background: var(--bm-fill);\n overflow: visible;\n}\n.bm-modal .bm-tabs button {\n flex: 1;\n height: 36px;\n min-height: 36px;\n padding: 0 8px;\n border-radius: 7px;\n font-size: 13px;\n font-weight: 400;\n}\n.bm-modal .bm-tabs button:hover {\n background: oklch(1 0 0 / 0.5);\n}\n.bm-modal .bm-tabs button[aria-selected=\"true\"] {\n background: #fff;\n color: var(--ink);\n font-weight: 500;\n box-shadow: var(--bm-shadow-segment-on);\n}\n.bm-modal-body {\n flex: 1;\n min-height: 0;\n overflow: auto;\n padding: 16px 20px 20px;\n display: flex;\n flex-direction: column;\n gap: 10px;\n}\n.bm-library {\n display: grid;\n grid-template-columns: repeat(4, minmax(0, 1fr));\n gap: 10px;\n}\n.bm-library-item {\n position: relative;\n}\n.bm-library-pick {\n display: flex;\n flex-direction: column;\n gap: 4px;\n width: 100%;\n min-height: 0;\n padding: 4px;\n border: 0;\n border-radius: 9px;\n background: var(--fill-soft);\n text-align: left;\n font-family: var(--mono);\n font-size: 9px;\n font-weight: 400;\n color: var(--muted);\n word-break: break-all;\n cursor: pointer;\n}\n.bm-library-pick:hover {\n background: var(--fill-hover);\n}\n.bm-library-pick img {\n width: 100%;\n aspect-ratio: 1 / 1;\n object-fit: cover;\n border-radius: 6px;\n background: var(--fill);\n}\n.bm-library-pick[aria-pressed=\"true\"] {\n box-shadow: 0 0 0 2px var(--accent);\n background: var(--accent-tint);\n}\n.bm-library-delete {\n position: absolute;\n top: 8px;\n right: 8px;\n width: 24px;\n height: 24px;\n min-height: 0;\n background: #fff;\n box-shadow: 0 1px 3px oklch(0.2 0.01 255 / 0.25);\n opacity: 0;\n}\n.bm-library-item:hover .bm-library-delete,\n.bm-library-delete:focus-visible {\n opacity: 1;\n}\n.bm-library-empty {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 8px;\n}\n.bm-modal-confirm {\n display: flex;\n flex-direction: column;\n gap: 10px;\n padding: 14px 20px 16px;\n border-top: 1px solid var(--line-soft);\n background: var(--danger-tint);\n}\n.bm-modal-confirm .bm-note {\n color: var(--danger-ink);\n font-size: 13px;\n line-height: 1.5;\n}\n.bm-visually-hidden {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0 0 0 0);\n border: 0;\n white-space: nowrap;\n}\n.bm-popover-title {\n grid-column: 1 / -1;\n padding: 0;\n font-size: 16px;\n font-weight: 600;\n letter-spacing: -0.01em;\n color: var(--bm-ink);\n}\n.bm-popover-head {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0;\n}\n.bm-popover-head-wide {\n grid-column: 1 / -1;\n}\n.bm-popover[aria-label=\"Edit link\"],\n.bm-popover[aria-label=\"Add section\"][role=\"listbox\"] {\n z-index: 5;\n}\n.bm-popover :is(.bm-fmt-bold) {\n font-weight: 700;\n}\n.bm-fmt-bold {\n font-weight: 700;\n font-size: 13px;\n}\n.bm-fmt-heading {\n font-weight: 700;\n font-size: 12px;\n letter-spacing: -0.02em;\n}\n.bm-fmt-italic {\n font-family: var(--serif);\n font-style: italic;\n font-size: 15px;\n}\n\n/* Edit link: Advanced row */\n.bm-advanced {\n display: flex;\n flex-direction: column;\n gap: 14px;\n}\n.bm-popover button.bm-advanced-toggle {\n display: flex;\n align-items: center;\n gap: 6px;\n width: 100%;\n min-height: 32px;\n padding: 0 2px;\n border: 0;\n border-radius: 6px;\n background: transparent;\n color: var(--bm-label);\n font-size: 13px;\n font-weight: 500;\n text-align: left;\n}\n.bm-popover button.bm-advanced-toggle:hover {\n background: transparent;\n color: var(--bm-ink);\n}\n.bm-advanced-toggle .bm-chevron {\n transition: transform 0.12s;\n}\n.bm-advanced-toggle[aria-expanded=\"true\"] .bm-chevron {\n transform: rotate(90deg);\n}\n.bm-advanced-summary {\n margin-left: auto;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-family: var(--mono);\n font-size: 11px;\n font-weight: 400;\n color: var(--bm-muted);\n}\n\n/* SEO card and dialog */\n.bm-seo-card {\n display: flex;\n flex-direction: column;\n gap: 10px;\n}\n.bm-seo-badges {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n margin: 0;\n padding: 0;\n list-style: none;\n}\n.bm-seo-badge {\n padding: 2px 8px;\n border-radius: 999px;\n background: var(--fill-soft);\n color: var(--bm-label);\n font-family: var(--mono);\n font-size: 11px;\n}\n.bm-seo-edit,\n.bm-consent-edit {\n align-self: flex-start;\n display: inline-flex;\n align-items: center;\n gap: 6px;\n}\n.bm-dialog.bm-seo {\n position: relative;\n width: min(560px, 100%);\n max-height: calc(100vh - 10vh - 32px);\n min-height: 0;\n}\n.bm-seo-body {\n display: flex;\n flex-direction: column;\n gap: 20px;\n min-height: 0;\n overflow-y: auto;\n padding: 2px 4px 2px 2px;\n}\n.bm-seo-json {\n min-height: 220px;\n white-space: pre;\n overflow: auto;\n tab-size: 2;\n}\n.bm-seo-json[aria-invalid=\"true\"] {\n border-color: var(--bm-danger);\n}\n.bm-seo-format {\n align-self: flex-start;\n}\n\n/* Cookie banner dialog */\n.bm-dialog.bm-consent {\n position: relative;\n width: min(520px, 100%);\n max-height: calc(100vh - 10vh - 32px);\n min-height: 0;\n}\n.bm-consent-body {\n display: flex;\n flex-direction: column;\n gap: 20px;\n min-height: 0;\n overflow-y: auto;\n padding: 2px 4px 2px 2px;\n}\n.bm-consent-preview {\n display: flex;\n flex-direction: column;\n gap: 8px;\n padding: 14px 16px;\n border-radius: 12px;\n background: var(--fill-soft);\n}\n.bm-consent-preview-title {\n margin: 0;\n font-size: 15px;\n font-weight: 600;\n color: var(--bm-label);\n}\n.bm-consent-preview-text {\n margin: 0;\n font-size: 13px;\n line-height: 1.45;\n color: var(--bm-muted);\n overflow-wrap: anywhere;\n}\n.bm-consent-preview-link {\n text-decoration: underline;\n text-underline-offset: 3px;\n}\n.bm-consent-preview-buttons {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n}\n.bm-consent-preview-buttons > span {\n padding: 5px 14px;\n border-radius: 999px;\n box-shadow: inset 0 0 0 1px var(--bm-border);\n font-size: 13px;\n font-weight: 500;\n color: var(--bm-label);\n}\n\n/* SEO preview, OG row, outline */\n.bm-serp {\n display: flex;\n flex-direction: column;\n gap: 3px;\n padding: 12px 14px;\n border-radius: 10px;\n background: var(--fill-soft);\n}\n.bm-serp-image {\n flex-direction: row;\n align-items: flex-start;\n gap: 12px;\n}\n.bm-serp-text {\n display: flex;\n flex: 1;\n flex-direction: column;\n gap: 3px;\n min-width: 0;\n}\n.bm-serp-thumb {\n flex: none;\n width: 64px;\n height: 64px;\n border-radius: 8px;\n object-fit: cover;\n background: var(--fill);\n}\n.bm-serp-title {\n font-size: 15px;\n font-weight: 500;\n color: oklch(0.42 0.12 260);\n}\n.bm-serp-url {\n font-family: var(--mono);\n font-size: 11px;\n color: oklch(0.45 0.08 145);\n}\n.bm-serp-desc {\n font-size: 12px;\n line-height: 1.45;\n color: oklch(0.45 0.01 255);\n}\n.bm-outline-list {\n display: flex;\n flex-direction: column;\n gap: 8px;\n margin: 0;\n padding: 0;\n list-style: none;\n}\n.bm-panel .bm-outline-row {\n display: flex;\n align-items: center;\n gap: 10px;\n width: 100%;\n min-height: 40px;\n padding: 0 10px;\n border-radius: 8px;\n background: transparent;\n text-align: left;\n font-size: 14px;\n}\n.bm-panel .bm-outline-row:hover:not(:disabled) {\n background: var(--fill-soft);\n}\n\n/* Section rows (Pages tab): grip, tone swatch, name over #anchor and variant, then actions. */\n.bm-srow {\n position: relative;\n display: flex;\n align-items: center;\n gap: 4px;\n min-height: 52px;\n padding: 6px 6px 6px 8px;\n border: 1px solid var(--bm-border);\n border-radius: 10px;\n background: #fff;\n}\n.bm-srow:hover {\n border-color: oklch(0.8 0.008 250);\n}\n.bm-srow-grip {\n flex: none;\n width: 16px;\n height: 32px;\n display: inline-grid;\n place-items: center;\n cursor: grab;\n touch-action: none;\n}\n.bm-srow-grip:active {\n cursor: grabbing;\n}\n.bm-srow .bm-outline-row {\n flex: 1;\n min-width: 0;\n width: auto;\n padding: 0 8px 0 4px;\n gap: 10px;\n}\n.bm-srow .bm-swatch {\n width: 10px;\n height: 10px;\n border-radius: 2px;\n}\n.bm-srow-text {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n gap: 1px;\n}\n.bm-srow-name {\n font-size: 14px;\n font-weight: 500;\n color: var(--bm-ink);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.bm-srow-meta {\n font-family: var(--mono);\n font-size: 11px;\n font-weight: 400;\n color: var(--bm-muted);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.bm-srow .bm-outline-meta {\n flex: none;\n max-width: 40%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.bm-srow-btn {\n width: 32px;\n height: 32px;\n background: transparent;\n color: var(--bm-icon);\n border-radius: 7px;\n}\n.bm-srow-btn:disabled {\n opacity: 0.35;\n}\n.bm-panel .bm-srow-btn:hover:not(:disabled) {\n background: var(--bm-fill);\n color: var(--bm-ink);\n}\n.bm-panel .bm-srow-btn.bm-danger {\n color: var(--bm-danger-icon);\n}\n.bm-panel .bm-srow-btn.bm-danger:hover:not(:disabled) {\n background: var(--bm-danger-soft);\n}\n.bm-srow-sep {\n flex: none;\n width: 1px;\n height: 20px;\n margin: 0 2px;\n background: var(--bm-divider);\n}\n.bm-outline-n {\n width: 18px;\n font-family: var(--mono);\n font-size: 11px;\n color: oklch(0.55 0.01 255);\n}\n.bm-outline-label {\n flex: 1;\n min-width: 0;\n font-weight: 500;\n}\n.bm-outline-meta {\n font-family: var(--mono);\n font-size: 11px;\n font-weight: 400;\n color: var(--muted);\n}\n\n/* Navigation and footer link cards */\n.bm-nav-card {\n padding: 12px 12px 14px;\n gap: 10px;\n}\n.bm-nested {\n margin: 6px 0 0 16px;\n}\n.bm-nav-children {\n margin-top: -4px;\n}\n.bm-nav-head {\n display: flex;\n align-items: center;\n gap: 4px;\n}\n.bm-nav-head .bm-icon-btn,\n.bm-column-head .bm-icon-btn {\n background: var(--bm-fill);\n color: oklch(0.45 0.01 255);\n}\n.bm-nav-head .bm-icon-btn:hover:not(:disabled),\n.bm-column-head .bm-icon-btn:hover:not(:disabled) {\n background: var(--bm-fill-hover);\n color: var(--bm-ink);\n}\n.bm-panel .bm-nav-head .bm-icon-btn.bm-danger,\n.bm-panel .bm-column-head .bm-icon-btn.bm-danger {\n background: var(--bm-danger-soft);\n color: var(--bm-danger-icon);\n}\n.bm-panel .bm-nav-label {\n flex: 1;\n min-width: 0;\n min-height: 32px;\n padding: 0 8px;\n border-color: transparent;\n font-weight: 500;\n}\n.bm-panel .bm-nav-label:hover {\n border-color: var(--line);\n}\n.bm-column {\n padding: 0;\n gap: 0;\n}\n.bm-column-head {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 8px 10px;\n cursor: grab;\n}\n.bm-column-links > summary {\n display: flex;\n align-items: center;\n gap: 6px;\n min-height: 40px;\n padding: 0 12px;\n border-top: 1px solid var(--line-soft);\n font-size: 13px;\n font-weight: 500;\n color: var(--bm-label);\n cursor: pointer;\n list-style: none;\n}\n.bm-column-links > summary::-webkit-details-marker {\n display: none;\n}\n.bm-column-links > :not(summary) {\n margin: 10px 12px 0;\n}\n.bm-column-links > :last-child {\n margin-bottom: 12px;\n}\n\n/* Wordmark preview */\n.bm-card-head {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n}\n.bm-card-head .bm-label {\n flex: none;\n}\n.bm-combo {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n:is(.bm-panel, .bm-popover) .bm-combo-trigger {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 6px;\n width: auto;\n max-width: 140px;\n min-height: 38px;\n padding: 0 10px 0 12px;\n border: 0;\n border-left: 1px solid var(--bm-border);\n border-radius: 0;\n background: var(--fill-soft);\n color: var(--ink-2);\n font-family: var(--mono);\n font-size: 12px;\n font-weight: 400;\n text-align: left;\n}\n:is(.bm-panel, .bm-popover) .bm-combo-trigger:hover:not(:disabled) {\n background: var(--fill-hover);\n}\n:is(.bm-panel, .bm-popover) .bm-combo-trigger[aria-expanded=\"true\"] {\n background: var(--accent-tint);\n color: var(--accent-hover);\n}\n/* One URL field: the text input and the page picker share a single border. */\n.bm-linkfield {\n display: flex;\n align-items: stretch;\n min-height: 40px;\n border: 1px solid var(--bm-border);\n border-radius: 8px;\n background: #fff;\n overflow: hidden;\n}\n.bm-linkfield:focus-within {\n border-color: var(--bm-primary);\n box-shadow: 0 0 0 3px var(--bm-primary-ring);\n}\n.bm-linkfield > input {\n flex: 1;\n min-width: 0;\n border: 0 !important;\n box-shadow: none !important;\n border-radius: 0;\n min-height: 38px;\n background: transparent;\n}\n.bm-linkfield .bm-combo {\n flex: none;\n max-width: 45%;\n}\n.bm-linkfield .bm-combo-trigger {\n height: 100%;\n}\n.bm-linkfield .bm-combo-trigger:focus-visible {\n outline-offset: -2px;\n}\n.bm-combo-trigger > span {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.bm-combo-trigger .bm-combo-custom {\n color: var(--muted);\n}\n.bm-combo-panel {\n position: fixed;\n z-index: 6;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n gap: 6px;\n padding: 6px;\n border: 1px solid var(--bm-border);\n border-radius: 10px;\n background: #fff;\n box-shadow: 0 6px 18px oklch(0.2 0.02 255 / 0.1);\n}\n.bm-combo-list {\n max-height: 200px;\n overflow-y: auto;\n display: flex;\n flex-direction: column;\n}\n.bm-combo-group {\n margin: 6px 6px 2px;\n font-family: var(--mono);\n font-size: 10px;\n letter-spacing: 0.06em;\n text-transform: uppercase;\n color: var(--muted);\n}\n.bm-combo-option {\n display: flex;\n align-items: baseline;\n justify-content: space-between;\n gap: 10px;\n padding: 6px 8px;\n border-radius: 6px;\n font-size: 13px;\n color: var(--ink);\n cursor: pointer;\n}\n.bm-combo-option[aria-selected=\"true\"] {\n font-weight: 600;\n color: var(--accent-hover);\n}\n.bm-combo-active {\n background: var(--fill);\n}\n.bm-combo-value {\n flex: none;\n max-width: 50%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-family: var(--mono);\n font-size: 11px;\n color: var(--muted);\n}\n.bm-combo-empty {\n margin: 0;\n padding: 8px;\n font-size: 12px;\n color: var(--muted);\n}\n.bm-format {\n margin-top: -4px;\n}\n.bm-panel .bm-format button[aria-pressed=\"true\"] {\n background: #fff;\n color: var(--ink);\n box-shadow: var(--bm-shadow-segment-on);\n}\n.bm-wordmark {\n display: flex;\n align-items: baseline;\n justify-content: space-between;\n gap: 12px;\n padding: 12px 14px;\n border-radius: 10px;\n background: var(--bm-fill-soft);\n}\n.bm-wordmark-name {\n font-size: 24px;\n font-weight: 600;\n letter-spacing: -0.03em;\n}\n.bm-alert-notice {\n flex-direction: row;\n align-items: flex-start;\n gap: 8px;\n color: var(--warn-ink);\n}\n.bm-alert-notice .bm-icon {\n margin-top: 2px;\n flex: none;\n}\n\n/*\n * Button system. Three variants, one danger modifier, one rule set.\n * secondary (default): neutral fill, ink text.\n * .bm-primary: the one main action of a surface. Solid accent, white text (AA).\n * .bm-tertiary: low emphasis text button (Cancel, Reset). No fill, no underline, grey fill on hover.\n * .bm-danger: modifier. primary = solid red, secondary = red text, tertiary = red text.\n * The scope list gives every rule enough specificity to beat the per-surface defaults above,\n * so the hover state of one variant can never fall back to the secondary fill.\n */\n:is(.bm-dialog, .bm-popover, .bm-modal, .bm-panel) button:where(.bm-primary, .bm-tertiary, .bm-danger):not(.bm-icon-btn, .bm-save) {\n transition:\n background-color 0.12s,\n color 0.12s;\n}\n:is(.bm-dialog, .bm-popover, .bm-modal, .bm-panel) button.bm-primary {\n background: var(--bm-primary);\n color: #fff;\n box-shadow: none;\n font-weight: 600;\n}\n:is(.bm-dialog, .bm-popover, .bm-modal, .bm-panel) button.bm-primary:hover:not(:disabled) {\n background: var(--bm-primary-hover);\n color: #fff;\n}\n:is(.bm-dialog, .bm-popover, .bm-modal, .bm-panel) button.bm-primary.bm-danger {\n background: var(--bm-danger);\n color: #fff;\n}\n:is(.bm-dialog, .bm-popover, .bm-modal, .bm-panel) button.bm-primary.bm-danger:hover:not(:disabled) {\n background: var(--danger-hover);\n color: #fff;\n}\n:is(.bm-dialog, .bm-popover, .bm-modal, .bm-panel) button.bm-danger:not(.bm-primary, .bm-tertiary, .bm-icon-btn) {\n background: var(--bm-danger-soft);\n color: var(--bm-danger-text);\n}\n:is(.bm-dialog, .bm-popover, .bm-modal, .bm-panel) button.bm-danger:not(.bm-primary, .bm-tertiary, .bm-icon-btn):hover:not(:disabled) {\n background: oklch(0.93 0.04 25);\n color: var(--bm-danger-text);\n}\n:is(.bm-dialog, .bm-popover, .bm-modal, .bm-panel) button.bm-tertiary {\n min-height: 32px;\n padding: 0 10px;\n border-radius: 8px;\n background: transparent;\n color: var(--bm-label);\n font-weight: 400;\n box-shadow: none;\n text-decoration: none;\n}\n:is(.bm-dialog, .bm-popover, .bm-modal) button.bm-tertiary {\n min-height: 38px;\n font-size: 14px;\n}\n:is(.bm-dialog, .bm-popover, .bm-modal, .bm-panel) button.bm-tertiary:hover:not(:disabled) {\n background: var(--bm-fill);\n color: var(--bm-ink);\n}\n:is(.bm-dialog, .bm-popover, .bm-modal, .bm-panel) button.bm-tertiary.bm-danger {\n background: transparent;\n color: var(--bm-danger-text);\n}\n:is(.bm-dialog, .bm-popover, .bm-modal, .bm-panel) button.bm-tertiary.bm-danger:hover:not(:disabled) {\n background: var(--bm-danger-soft);\n color: var(--bm-danger-text);\n}\n:is(.bm-dialog, .bm-popover, .bm-modal, .bm-panel) button:disabled {\n opacity: 0.5;\n cursor: default;\n}\n.bm-save:hover:not(:disabled) {\n background: var(--accent-hover);\n color: #fff;\n}\n.bm-panel .bm-save:hover:not(:disabled) {\n background: var(--accent-hover);\n color: #fff;\n}\n.bm-popover .bm-actions-remove,\n.bm-dialog .bm-actions-remove {\n margin-right: auto;\n}\n.bm-modal :where(button:not([role=\"tab\"], .bm-library-pick, .bm-icon-btn, .bm-tertiary)) {\n min-height: 38px;\n padding: 0 16px;\n border: 0;\n border-radius: 8px;\n background: var(--fill);\n color: var(--ink);\n font-size: 14px;\n font-weight: 400;\n}\n.bm-modal :where(button:not([role=\"tab\"], .bm-library-pick, .bm-icon-btn, .bm-tertiary)):hover:not(:disabled) {\n background: var(--fill-hover);\n}\n.bm-modal .bm-dropzone {\n font-family: var(--sans);\n}\n\n/* Design tab */\n.bm-colorrow {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n.bm-colorpick {\n flex: none;\n width: 40px !important;\n height: 40px;\n min-height: 40px !important;\n padding: 2px !important;\n border: 1px solid var(--bm-border);\n border-radius: 8px;\n background: #fff;\n cursor: pointer;\n}\n.bm-colorhex {\n flex: 1;\n min-width: 0;\n font-family: var(--mono);\n font-size: 13px;\n text-transform: lowercase;\n}\n.bm-colorhex[aria-invalid=\"true\"] {\n border-color: var(--bm-danger);\n}\n.bm-overrides {\n display: flex;\n flex-direction: column;\n border: 1px solid var(--bm-border);\n border-radius: 10px;\n overflow: hidden;\n}\n.bm-override-row {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 8px 10px 8px 12px;\n}\n.bm-override-row + .bm-override-row {\n border-top: 1px solid var(--bm-divider);\n}\n.bm-override-label {\n flex: 1;\n min-width: 0;\n display: flex;\n align-items: baseline;\n gap: 6px;\n font-size: 13px;\n font-weight: 500;\n color: var(--bm-label);\n}\n.bm-override-label .bm-meta-tag {\n font-size: 10px;\n}\n.bm-override-row .bm-colorpick {\n width: 32px !important;\n height: 32px;\n min-height: 32px !important;\n padding: 1px !important;\n border-radius: 7px;\n}\n.bm-override-row .bm-colorhex {\n flex: none;\n width: 104px;\n min-height: 36px;\n padding: 0 10px;\n}\n.bm-tone-matrix {\n display: grid;\n grid-template-columns: 60px minmax(0, 1fr) minmax(0, 1fr);\n gap: 8px;\n align-items: stretch;\n}\n.bm-tone-pick {\n border: 0;\n text-align: left;\n font: inherit;\n cursor: pointer;\n}\n.bm-tone-cell[aria-pressed=\"true\"] {\n outline: 2px solid var(--bm-primary);\n outline-offset: 0;\n}\n.bm-tone-head {\n font-family: var(--mono);\n font-size: 10px;\n letter-spacing: 0.06em;\n text-transform: uppercase;\n color: var(--muted);\n}\n.bm-tone-name {\n align-self: center;\n font-size: 12px;\n font-weight: 500;\n color: var(--ink-2);\n}\n.bm-tone-cell {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 6px;\n min-width: 0;\n min-height: 46px;\n padding: 0 10px;\n border-radius: 8px;\n overflow: hidden;\n white-space: nowrap;\n}\n.bm-tone-aa {\n flex: none;\n font-size: 16px;\n font-weight: 600;\n}\n.bm-tone-muted {\n flex: 0 1 auto;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n font-size: 11px;\n}\n.bm-tone-chip {\n flex: none;\n padding: 2px 6px;\n border-radius: 5px;\n font-size: 10px;\n font-weight: 600;\n}\n.bm-tone-link {\n flex: none;\n font-size: 11px;\n text-decoration: underline;\n text-underline-offset: 2px;\n}\n.bm-contrast-list {\n margin: 6px 0 0;\n padding-left: 16px;\n font-family: var(--mono);\n font-size: 11px;\n color: var(--warn-ink);\n}\n.bm-range {\n flex: 1;\n min-width: 0;\n min-height: 28px;\n accent-color: var(--accent);\n cursor: pointer;\n}\n/* Preview: the only editor UI left on screen. */\n\n.bm-srow-add {\n display: flex;\n justify-content: flex-end;\n padding-top: 6px;\n}\n.bm-panel .bm-add-section {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n min-height: 32px;\n padding: 0 12px;\n border: 0;\n border-radius: 8px;\n background: var(--bm-primary);\n color: #fff;\n font-size: 13px;\n font-weight: 500;\n}\n.bm-panel .bm-add-section:hover {\n background: var(--bm-primary-hover);\n}\n\n/* ======================================================================\n * Editor shell: left navigation, top bar, inspector and full-screen views\n * around the page, which is framed into the canvas (see page-frame.ts).\n * Sizes are px, not rem: rem follows the site's root font size.\n * ====================================================================== */\n.bm-shell {\n display: contents;\n --bm-shell-line: oklch(0.9 0.005 250);\n --bm-shell-text: oklch(0.32 0.01 255);\n --bm-shell-hover: oklch(0.965 0.003 250);\n --bm-shell-on-bg: oklch(0.94 0.04 145);\n --bm-shell-on-fg: oklch(0.34 0.1 145);\n}\n.bm-canvas-layer {\n position: fixed;\n inset: 0;\n pointer-events: none;\n}\n\n/* ---------- left navigation ---------- */\n.bm-nav {\n position: fixed;\n z-index: 6;\n top: 0;\n left: 0;\n bottom: 0;\n width: var(--bm-nav-w);\n display: flex;\n flex-direction: column;\n background: #fff;\n border-right: 1px solid var(--bm-shell-line);\n transition: width 0.18s ease;\n}\n.bm-nav-brand {\n flex: none;\n display: flex;\n align-items: center;\n gap: 10px;\n height: 56px;\n padding: 0 16px;\n border-bottom: 1px solid var(--bm-divider);\n overflow: hidden;\n}\n.bm-nav-rail .bm-nav-brand {\n justify-content: center;\n padding: 0;\n}\n.bm-nav-mark {\n flex: none;\n display: block;\n width: 32px;\n height: auto;\n aspect-ratio: 21 / 19;\n image-rendering: pixelated;\n user-select: none;\n}\n.bm-nav-brand-text {\n display: flex;\n flex-direction: column;\n min-width: 0;\n white-space: nowrap;\n}\n.bm-nav-name {\n font-size: 16px;\n font-weight: 600;\n letter-spacing: -0.02em;\n line-height: 1.25;\n}\n.bm-nav-slogan {\n font-family: var(--mono);\n font-size: 11px;\n color: var(--muted);\n}\n.bm-nav-groups {\n flex: 1;\n min-height: 0;\n overflow-y: auto;\n padding: 4px 12px 12px;\n}\n.bm-nav-rail .bm-nav-groups {\n overflow: visible;\n}\n.bm-nav-group-label {\n margin: 0;\n padding: 12px 12px 6px;\n font-family: var(--mono);\n font-size: 11px;\n font-weight: 500;\n letter-spacing: 0.1em;\n text-transform: uppercase;\n color: var(--muted);\n}\n.bm-nav-divider {\n height: 1px;\n margin: 10px 12px;\n border: 0;\n background: oklch(0.92 0.004 250);\n}\n.bm-nav-item {\n position: relative;\n display: flex;\n align-items: center;\n gap: 12px;\n width: 100%;\n height: 40px;\n padding: 0 12px;\n border: 0;\n border-radius: 8px;\n background: transparent;\n color: var(--bm-shell-text);\n font-size: 15px;\n font-weight: 500;\n text-align: left;\n}\n.bm-nav-item .bm-icon {\n flex: none;\n}\n.bm-nav-rail .bm-nav-item {\n justify-content: center;\n padding: 0;\n}\n.bm-nav-item:hover {\n background: var(--bm-shell-hover);\n}\n.bm-nav-item-on,\n.bm-nav-item-on:hover {\n background: var(--bm-shell-on-bg);\n color: var(--bm-shell-on-fg);\n font-weight: 600;\n}\n.bm-nav-label-text {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.bm-nav-count {\n flex: none;\n font-family: var(--mono);\n font-size: 11px;\n font-weight: 400;\n color: var(--muted);\n}\n.bm-nav-tip {\n position: absolute;\n z-index: 10;\n top: 50%;\n left: calc(100% + 10px);\n padding: 6px 10px;\n border-radius: 6px;\n background: var(--ink);\n color: #fff;\n font-size: 13px;\n font-weight: 500;\n white-space: nowrap;\n opacity: 0;\n transform: translateY(-50%);\n pointer-events: none;\n transition: opacity 0.12s ease;\n}\n.bm-nav-item:hover .bm-nav-tip,\n.bm-nav-item:focus-visible .bm-nav-tip {\n opacity: 1;\n}\n.bm-nav-foot {\n flex: none;\n padding: 8px 12px 12px;\n border-top: 1px solid var(--bm-divider);\n}\n.bm-nav-rail .bm-nav-collapse .bm-icon {\n transform: scaleX(-1);\n}\n.bm-kbd {\n font-family: var(--mono);\n font-size: 11px;\n font-weight: 400;\n color: var(--muted);\n}\n\n/* ---------- top bar ---------- */\n.bm-topbar {\n position: fixed;\n z-index: 6;\n top: 0;\n left: var(--bm-nav-w);\n right: 0;\n height: 56px;\n display: flex;\n align-items: center;\n gap: 16px;\n padding: 0 12px 0 16px;\n background: #fff;\n border-bottom: 1px solid var(--bm-shell-line);\n font-size: 14px;\n transition: left 0.18s ease;\n}\n.bm-topbar-left {\n flex: 1 1 0;\n min-width: 0;\n display: flex;\n align-items: center;\n gap: 8px;\n overflow: hidden;\n}\n.bm-topbar-right {\n flex: 1 0 0;\n min-width: max-content;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n gap: 8px;\n}\n.bm-topbar-divider {\n flex: none;\n width: 1px;\n height: 24px;\n background: var(--bm-shell-line);\n}\n.bm-crumbs {\n flex: 0 1 auto;\n min-width: 0;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n.bm-crumb-type {\n flex: none;\n height: 30px;\n padding: 0 6px;\n border: 0;\n border-radius: 6px;\n background: transparent;\n color: var(--bm-help);\n font-size: 14px;\n font-weight: 500;\n}\n.bm-crumb-type:hover {\n background: var(--bm-shell-hover);\n color: var(--ink);\n}\n.bm-crumb-sep {\n flex: none;\n color: var(--bm-info);\n}\n.bm-crumb-title {\n flex: 0 0 auto;\n max-width: 256px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-weight: 600;\n}\n.bm-crumb-path {\n flex: 0 1 auto;\n min-width: 0;\n padding: 2px 6px;\n border-radius: 5px;\n background: oklch(0.96 0.003 250);\n color: var(--bm-help);\n font-family: var(--mono);\n font-size: 12px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.bm-topbar-btn {\n position: relative;\n flex: none;\n display: inline-grid;\n place-items: center;\n width: 36px;\n height: 36px;\n padding: 0;\n border: 0;\n border-radius: 8px;\n background: transparent;\n color: var(--bm-label);\n}\n.bm-topbar-btn:hover:not(:disabled) {\n background: var(--bm-shell-hover);\n color: var(--ink);\n}\n.bm-topbar-btn:disabled {\n color: oklch(0.78 0.005 250);\n cursor: default;\n}\n.bm-topbar-btn-on,\n.bm-topbar-btn-on:hover:not(:disabled) {\n background: var(--bm-shell-on-bg);\n color: var(--bm-shell-on-fg);\n}\n.bm-topbar-badge {\n position: absolute;\n top: 3px;\n right: 1px;\n min-width: 16px;\n height: 16px;\n padding: 0 4px;\n border-radius: 999px;\n background: var(--accent);\n color: #fff;\n font-family: var(--mono);\n font-size: 10px;\n line-height: 16px;\n}\n.bm-back {\n flex: none;\n display: inline-flex;\n align-items: center;\n gap: 4px;\n height: 36px;\n padding: 0 10px 0 6px;\n border: 0;\n border-radius: 8px;\n background: transparent;\n color: var(--bm-label);\n font-size: 14px;\n font-weight: 500;\n}\n.bm-back:hover {\n background: var(--bm-shell-hover);\n color: var(--ink);\n}\n.bm-back-text {\n max-width: 240px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.bm-view-crumb {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: var(--bm-help);\n}\n.bm-view-crumb strong {\n color: var(--ink);\n font-weight: 600;\n}\n.bm-preview-btn {\n flex: none;\n display: inline-flex;\n align-items: center;\n gap: 6px;\n height: 36px;\n padding: 0 12px;\n border: 1px solid oklch(0.88 0.005 250);\n border-radius: 8px;\n background: #fff;\n color: var(--bm-label);\n font-size: 14px;\n font-weight: 500;\n}\n.bm-preview-btn:hover {\n background: var(--bm-shell-hover);\n color: var(--ink);\n}\n.bm-topbar .bm-pill {\n height: 32px;\n padding: 0 10px;\n background: transparent;\n color: var(--bm-help);\n font-size: 13px;\n}\n.bm-topbar .bm-pill .bm-dot {\n background: oklch(0.55 0.14 145);\n}\n.bm-topbar .bm-pill-dirty,\n.bm-topbar button.bm-pill-btn {\n background: oklch(0.96 0.05 85);\n color: oklch(0.42 0.1 65);\n border-radius: 999px;\n}\n.bm-topbar .bm-pill-dirty .bm-dot {\n background: oklch(0.72 0.15 75);\n}\n.bm-topbar .bm-save {\n height: 36px;\n padding: 0 14px;\n font-size: 14px;\n font-family: var(--sans);\n}\n.bm-topbar .bm-save:hover:not(:disabled) {\n background: var(--accent-hover);\n}\n.bm-topbar .bm-save:disabled:not([aria-busy=\"true\"]) {\n background: oklch(0.92 0.005 250);\n color: var(--muted);\n opacity: 1;\n cursor: default;\n}\n.bm-exit-preview {\n flex: none;\n display: inline-flex;\n align-items: center;\n gap: 8px;\n height: 36px;\n padding: 0 14px;\n border: 0;\n border-radius: 8px;\n background: var(--ink);\n color: #fff;\n font-size: 14px;\n font-weight: 500;\n}\n.bm-exit-preview:hover {\n background: oklch(0.3 0.012 255);\n}\n.bm-topbar-preview-note {\n color: var(--bm-help);\n font-size: 13px;\n}\n.bm-topbar-pop {\n position: fixed;\n z-index: 9;\n top: 64px;\n right: 12px;\n pointer-events: auto;\n}\n.bm-topbar-pop > .bm-dialog {\n position: static !important;\n transform: none !important;\n width: min(380px, calc(100vw - 24px));\n max-height: calc(100vh - 88px);\n overflow: auto;\n border-radius: 12px;\n box-shadow:\n 0 0 0 1px oklch(0.9 0.005 250),\n 0 20px 40px -16px oklch(0.2 0.02 255 / 0.3);\n}\n@media (max-width: 1179px) {\n .bm-preview-text {\n display: none;\n }\n .bm-preview-btn {\n width: 36px;\n padding: 0;\n justify-content: center;\n }\n}\n@media (max-width: 999px) {\n .bm-crumb-type,\n .bm-crumb-sep,\n .bm-viewport {\n display: none;\n }\n}\n\n/* ---------- inspector ---------- */\n.bm-inspector {\n position: fixed;\n z-index: 5;\n top: 56px;\n right: 0;\n bottom: 0;\n display: flex;\n flex-direction: column;\n background: #fff;\n border-left: 1px solid var(--bm-shell-line);\n}\n.bm-inspector-resize {\n position: absolute;\n z-index: 2;\n top: 0;\n bottom: 0;\n left: -5px;\n width: 10px;\n cursor: col-resize;\n touch-action: none;\n}\n.bm-inspector-resize:focus-visible {\n outline: none;\n}\n.bm-inspector-grip {\n position: absolute;\n top: 50%;\n left: 3px;\n width: 4px;\n height: 40px;\n border-radius: 999px;\n background: oklch(0.82 0.006 250);\n box-shadow: 0 0 0 2px #fff;\n transform: translateY(-50%);\n}\n.bm-inspector-resize:hover .bm-inspector-grip,\n.bm-inspector-resize:active .bm-inspector-grip,\n.bm-inspector-resize:focus-visible .bm-inspector-grip {\n background: var(--accent);\n}\n.bm-inspector .bm-tabs {\n flex: none;\n}\n.bm-inspector .bm-tabs button {\n height: 44px;\n font-size: 14px;\n}\n\n/* A settings sidebar (Navigation, Footer, Site) in the inspector's place: a title row, then the form. */\n.bm-side-head {\n flex: none;\n display: flex;\n align-items: flex-start;\n gap: 8px;\n padding: 16px 16px 14px 24px;\n border-bottom: 1px solid var(--bm-tab-rule);\n}\n.bm-side-heading {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n.bm-side-title {\n margin: 0;\n font-size: 18px;\n font-weight: 600;\n letter-spacing: -0.02em;\n line-height: 1.3;\n color: var(--ink);\n}\n.bm-side-close {\n flex: none;\n display: grid;\n place-items: center;\n width: 30px;\n height: 30px;\n padding: 0;\n border: 0;\n border-radius: 8px;\n background: transparent;\n color: var(--bm-icon);\n cursor: pointer;\n}\n.bm-side-close:hover {\n background: var(--bm-fill-hover);\n color: var(--ink);\n}\n\n/* ---------- full-screen views ---------- */\n.bm-view {\n position: fixed;\n z-index: 5;\n top: 56px;\n left: var(--bm-nav-w);\n right: 0;\n bottom: 0;\n overflow: auto;\n background: oklch(0.975 0.003 250);\n transition: left 0.18s ease;\n}\n.bm-screen {\n max-width: 736px;\n margin: 0 auto;\n padding: 40px 32px 64px;\n display: flex;\n flex-direction: column;\n gap: 24px;\n}\n.bm-screen-head {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n.bm-screen-title {\n margin: 0;\n font-size: 32px;\n font-weight: 600;\n letter-spacing: -0.04em;\n line-height: 1.15;\n color: var(--ink);\n}\n.bm-screen-file {\n margin: 0;\n font-family: var(--mono);\n font-size: 12px;\n color: var(--muted);\n}\n.bm-screen-cards > .bm-stack {\n gap: 24px;\n}\n/* Each group of a settings form is a card. A group inside a card stays a plain group. */\n.bm-screen-cards .bm-stack:is(:has(> .bm-group:first-child), :has(> .bm-group-split:first-child)) {\n padding: 20px 24px 24px;\n border-radius: 12px;\n background: #fff;\n box-shadow: 0 0 0 1px var(--bm-shell-line, oklch(0.9 0.005 250));\n}\n.bm-screen-cards\n .bm-stack:is(:has(> .bm-group:first-child), :has(> .bm-group-split:first-child))\n .bm-stack:is(:has(> .bm-group:first-child), :has(> .bm-group-split:first-child)) {\n padding: 0;\n border-radius: 0;\n background: none;\n box-shadow: none;\n}\n/* The inspector is narrow: a section row shows its name, and its buttons while it is hovered or focused. */\n.bm-inspector .bm-srow:not(:hover):not(:focus-within) .bm-srow-btn,\n.bm-inspector .bm-srow:not(:hover):not(:focus-within) .bm-srow-sep {\n display: none;\n}\n.bm-topbar-pop .bm-dialog-foot .bm-hint {\n display: none;\n}\n\n/* ---------- content listings ---------- */\n.bm-listing {\n padding: 32px 40px 48px;\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n.bm-listing-head {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: 24px;\n flex-wrap: wrap;\n}\n.bm-listing-title-row {\n display: flex;\n align-items: center;\n gap: 16px;\n}\n.bm-panel .bm-listing-new {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n height: 36px;\n min-height: 0;\n padding: 0 14px;\n border: 0;\n border-radius: 8px;\n background: var(--accent);\n color: #fff;\n font-size: 14px;\n font-weight: 600;\n}\n.bm-panel .bm-listing-new:hover:not(:disabled) {\n background: var(--accent-hover);\n}\n.bm-listing-heading .bm-screen-file {\n margin-top: 6px;\n}\n.bm-listing-search {\n display: flex;\n align-items: center;\n gap: 8px;\n width: 288px;\n height: 38px;\n padding: 0 12px;\n border: 1px solid var(--bm-border);\n border-radius: 8px;\n background: #fff;\n color: var(--bm-icon);\n}\n.bm-listing-search:focus-within {\n border-color: var(--accent);\n box-shadow: 0 0 0 3px var(--accent-ring);\n}\n.bm-listing-search input {\n flex: 1;\n min-width: 0;\n height: 100%;\n padding: 0;\n border: 0;\n outline: none;\n background: transparent;\n color: var(--ink);\n font-size: 14px;\n}\n.bm-new-document .bm-modal-body {\n padding-top: 4px;\n}\n.bm-new-document-form {\n display: flex;\n flex-direction: column;\n gap: 14px;\n}\n.bm-new-document-form > .bm-primary {\n align-self: flex-start;\n}\n.bm-listing-filters {\n display: flex;\n gap: 4px;\n flex-wrap: wrap;\n}\n.bm-panel .bm-filter {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n height: 32px;\n min-height: 0;\n padding: 0 12px;\n border: 0;\n border-radius: 8px;\n background: transparent;\n color: var(--bm-help);\n font-size: 14px;\n font-weight: 500;\n}\n.bm-panel .bm-filter:hover:not(:disabled) {\n background: oklch(0.95 0.003 250);\n color: var(--ink);\n}\n.bm-panel .bm-filter-on,\n.bm-panel .bm-filter-on:hover:not(:disabled) {\n background: #fff;\n color: var(--ink);\n font-weight: 600;\n box-shadow: 0 0 0 1px var(--bm-shell-line);\n}\n.bm-filter-count {\n font-family: var(--mono);\n font-size: 11px;\n font-weight: 400;\n color: var(--muted);\n}\n.bm-bulk {\n align-self: flex-start;\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 6px 6px 6px 16px;\n border-radius: 999px;\n background: var(--ink);\n color: #fff;\n font-size: 13px;\n font-weight: 500;\n}\n.bm-panel .bm-bulk button {\n min-height: 0;\n height: 30px;\n padding: 0 12px;\n border: 0;\n border-radius: 999px;\n background: oklch(1 0 0 / 0.12);\n color: #fff;\n font-size: 13px;\n font-weight: 500;\n display: inline-flex;\n align-items: center;\n gap: 6px;\n}\n.bm-panel .bm-bulk button:hover:not(:disabled) {\n background: oklch(1 0 0 / 0.2);\n color: #fff;\n}\n.bm-panel .bm-bulk .bm-bulk-delete,\n.bm-panel .bm-bulk .bm-bulk-delete:hover:not(:disabled) {\n background: oklch(0.58 0.18 25);\n}\n.bm-table-wrap {\n overflow-x: auto;\n border-radius: 12px;\n background: #fff;\n box-shadow: 0 0 0 1px var(--bm-shell-line);\n}\n.bm-table {\n width: 100%;\n min-width: 832px;\n border-collapse: collapse;\n table-layout: fixed;\n font-size: 14px;\n}\n.bm-col-check {\n width: 48px;\n}\n.bm-col-url {\n width: 30%;\n}\n.bm-col-status {\n width: 128px;\n}\n.bm-col-indexed {\n width: 112px;\n}\n.bm-col-time {\n width: 160px;\n}\n.bm-tr {\n border-top: 1px solid var(--bm-divider);\n}\n.bm-thead {\n height: 44px;\n border-top: 0;\n background: oklch(0.985 0.002 250);\n}\n.bm-td {\n padding: 10px 12px;\n text-align: left;\n vertical-align: middle;\n color: var(--bm-label);\n}\n.bm-thead .bm-td {\n padding: 0 12px;\n font-weight: 400;\n}\n.bm-td-check {\n padding-left: 16px;\n}\n.bm-td-check input {\n width: 16px;\n height: 16px;\n margin: 0;\n accent-color: var(--accent);\n}\n.bm-panel .bm-th {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n min-height: 0;\n padding: 0;\n border: 0;\n background: transparent;\n color: var(--muted);\n font-family: var(--mono);\n font-size: 11px;\n font-weight: 500;\n letter-spacing: 0.08em;\n text-transform: uppercase;\n}\n.bm-panel .bm-th:hover:not(:disabled),\n.bm-panel .bm-th-on {\n background: transparent;\n color: var(--ink);\n}\ntbody .bm-tr:hover {\n background: oklch(0.985 0.002 250);\n}\ntbody .bm-tr-on,\ntbody .bm-tr-on:hover {\n background: oklch(0.97 0.025 145);\n}\n.bm-td-title {\n min-width: 0;\n}\n.bm-row-title-line {\n display: flex;\n align-items: center;\n gap: 6px;\n min-width: 0;\n}\n.bm-panel .bm-row-title {\n min-width: 0;\n min-height: 0;\n padding: 0;\n border: 0;\n background: transparent;\n color: var(--ink);\n font-size: 15px;\n font-weight: 600;\n text-align: left;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.bm-panel .bm-row-title:hover:not(:disabled) {\n background: transparent;\n color: var(--accent);\n text-decoration: underline;\n}\n.bm-chip {\n flex: none;\n display: inline-flex;\n align-items: center;\n height: 20px;\n padding: 0 7px;\n border-radius: 5px;\n font-family: var(--mono);\n font-size: 11px;\n}\n.bm-chip-amber {\n background: var(--bm-badge-amber-bg);\n color: var(--bm-badge-amber-fg);\n}\n.bm-chip-grey {\n background: var(--bm-fill);\n color: var(--bm-help);\n}\n.bm-chip-green {\n background: var(--bm-badge-green-bg);\n color: var(--bm-badge-green-fg);\n}\n.bm-row-actions {\n display: flex;\n align-items: center;\n gap: 6px;\n margin-top: 4px;\n font-size: 13px;\n color: var(--bm-info);\n visibility: hidden;\n}\n.bm-tr:hover .bm-row-actions,\n.bm-tr:focus-within .bm-row-actions,\n.bm-tr-on .bm-row-actions {\n visibility: visible;\n}\n.bm-panel .bm-row-actions button,\n.bm-row-actions a {\n min-height: 0;\n padding: 0;\n border: 0;\n background: transparent;\n color: var(--bm-link);\n font-size: 13px;\n font-weight: 500;\n text-decoration: none;\n}\n.bm-panel .bm-row-actions button:hover:not(:disabled),\n.bm-row-actions a:hover {\n background: transparent;\n text-decoration: underline;\n}\n.bm-panel .bm-row-actions .bm-row-delete {\n color: var(--danger-ink);\n}\n.bm-td-url {\n font-family: var(--mono);\n font-size: 13px;\n color: var(--bm-help);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.bm-status {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n height: 24px;\n padding: 0 9px;\n border-radius: 999px;\n font-size: 12px;\n font-weight: 500;\n}\n.bm-status .bm-dot {\n width: 6px;\n height: 6px;\n}\n.bm-status-published {\n background: var(--bm-badge-green-bg);\n color: var(--bm-badge-green-fg);\n}\n.bm-status-published .bm-dot {\n background: oklch(0.55 0.14 145);\n}\n.bm-status-draft {\n background: var(--bm-fill);\n color: var(--bm-help);\n}\n.bm-status-draft .bm-dot {\n background: oklch(0.65 0.01 255);\n}\n.bm-status-unsaved {\n background: oklch(0.96 0.05 85);\n color: oklch(0.42 0.1 65);\n}\n.bm-status-unsaved .bm-dot {\n background: oklch(0.72 0.15 75);\n}\n.bm-mono-muted {\n font-family: var(--mono);\n font-size: 12px;\n color: var(--muted);\n}\n.bm-td-time {\n color: var(--bm-help);\n font-size: 13px;\n}\n.bm-table-empty {\n padding: 32px 16px;\n text-align: center;\n color: var(--muted);\n}\n.bm-pager {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 16px;\n font-size: 13px;\n color: var(--bm-help);\n}\n.bm-pager-pages {\n display: flex;\n gap: 4px;\n}\n.bm-panel .bm-pager-pages button {\n min-width: 32px;\n height: 32px;\n min-height: 0;\n padding: 0 8px;\n border: 0;\n border-radius: 8px;\n background: transparent;\n color: var(--bm-label);\n font-size: 13px;\n}\n.bm-panel .bm-pager-pages button.bm-pager-on {\n background: var(--ink);\n color: #fff;\n}\n\n/* ---------- media ---------- */\n.bm-media-grid {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(208px, 1fr));\n gap: 16px;\n margin: 0;\n padding: 0;\n list-style: none;\n}\n.bm-media-card {\n position: relative;\n display: flex;\n flex-direction: column;\n gap: 4px;\n padding: 8px 8px 12px;\n border-radius: 12px;\n background: #fff;\n box-shadow: 0 0 0 1px var(--bm-shell-line);\n min-width: 0;\n}\n.bm-media-thumb {\n display: grid;\n place-items: center;\n aspect-ratio: 4 / 3;\n margin-bottom: 6px;\n border-radius: 8px;\n background: oklch(0.95 0.004 250);\n overflow: hidden;\n}\n.bm-media-thumb img {\n max-width: 100%;\n max-height: 100%;\n object-fit: contain;\n}\n.bm-media-name {\n padding: 0 4px;\n font-family: var(--mono);\n font-size: 12px;\n color: var(--ink);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.bm-media-use {\n padding: 0 4px;\n font-size: 12px;\n color: var(--muted);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.bm-panel .bm-media-delete {\n position: absolute;\n top: 14px;\n right: 14px;\n background: #fff;\n box-shadow: var(--bm-shadow-pop);\n opacity: 0;\n}\n.bm-media-card:hover .bm-media-delete,\n.bm-media-delete:focus-visible {\n opacity: 1;\n}\n.bm-panel .bm-media-drop {\n flex: 1;\n min-height: 180px;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 8px;\n border: 1.5px dashed var(--bm-border);\n border-radius: 8px;\n background: transparent;\n color: var(--muted);\n font-size: 13px;\n font-weight: 500;\n}\n.bm-panel .bm-media-drop:hover:not(:disabled),\n.bm-panel .bm-media-drop-on {\n border-color: var(--accent);\n background: var(--accent-tint);\n color: var(--bm-shell-on-fg);\n}\n.bm-media .bm-media-card:last-child {\n padding: 8px;\n}\n\n/* Loading: placeholder cards, then a shimmer on each thumbnail until its file arrives. */\n.bm-skeleton,\n.bm-media-thumb[data-loading] {\n background: linear-gradient(100deg, oklch(0.95 0.004 250) 30%, oklch(0.975 0.003 250) 50%, oklch(0.95 0.004 250) 70%) 0 0 / 300% 100%;\n animation: bm-shimmer 1.4s ease-in-out infinite;\n}\n.bm-skeleton-line {\n display: block;\n height: 12px;\n margin: 3px 4px;\n border-radius: 4px;\n}\n.bm-skeleton-short {\n width: 55%;\n}\n.bm-media-thumb img {\n transition: opacity 0.2s ease;\n}\n.bm-media-thumb[data-loading] img {\n opacity: 0;\n}\n@keyframes bm-shimmer {\n from {\n background-position: 100% 0;\n }\n to {\n background-position: 0 0;\n }\n}\n@media (prefers-reduced-motion: reduce) {\n .bm-skeleton,\n .bm-media-thumb[data-loading] {\n animation: none;\n }\n}\n\n/* ---------- SEO › structured data ---------- */\n.bm-meta-over {\n color: var(--danger-ink);\n}\n.bm-jsonld-list {\n display: flex;\n flex-direction: column;\n gap: 8px;\n margin: 0;\n padding: 0;\n list-style: none;\n}\n.bm-jsonld-card {\n border: 1px solid var(--bm-border);\n border-radius: 10px;\n background: #fff;\n}\n.bm-jsonld-head {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 4px 6px 4px 4px;\n}\n.bm-panel .bm-jsonld-toggle {\n flex: 1;\n min-width: 0;\n display: flex;\n align-items: center;\n gap: 8px;\n min-height: 36px;\n padding: 0 8px;\n border: 0;\n border-radius: 7px;\n background: transparent;\n color: var(--ink);\n text-align: left;\n}\n.bm-jsonld-type {\n font-weight: 600;\n font-size: 14px;\n}\n.bm-jsonld-id {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-family: var(--mono);\n font-size: 12px;\n color: var(--muted);\n}\n.bm-jsonld-badge {\n flex: none;\n height: 20px;\n padding: 0 7px;\n border-radius: 5px;\n font-family: var(--mono);\n font-size: 11px;\n line-height: 20px;\n}\n.bm-jsonld-valid {\n background: var(--bm-badge-green-bg);\n color: var(--bm-badge-green-fg);\n}\n.bm-jsonld-warning {\n background: var(--bm-badge-amber-bg);\n color: var(--bm-badge-amber-fg);\n}\n.bm-jsonld-error {\n background: var(--bm-danger-soft);\n color: var(--danger-ink);\n}\n.bm-jsonld-body {\n display: flex;\n flex-direction: column;\n gap: 8px;\n padding: 0 12px 12px;\n}\n.bm-panel .bm-jsonld-text {\n width: 100%;\n padding: 10px 12px;\n border: 1px solid var(--bm-border);\n border-radius: 8px;\n background: oklch(0.985 0.002 250);\n font-family: var(--mono);\n font-size: 12px;\n line-height: 1.55;\n resize: vertical;\n}\n.bm-panel .bm-jsonld-text-bad {\n border-color: var(--bm-danger);\n}\n.bm-jsonld-foot {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n}\n.bm-panel .bm-dashed-add {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 6px;\n width: 100%;\n height: 44px;\n border: 1.5px dashed var(--bm-border);\n border-radius: 10px;\n background: transparent;\n color: var(--bm-label);\n font-size: 14px;\n font-weight: 500;\n}\n.bm-panel .bm-dashed-add:hover:not(:disabled) {\n border-color: var(--accent);\n background: var(--accent-tint);\n color: var(--bm-shell-on-fg);\n}\n\n/* ---------- viewport switch and device frames ---------- */\n.bm-viewport {\n flex: none;\n display: flex;\n gap: 2px;\n padding: 3px;\n border-radius: 9px;\n background: oklch(0.955 0.003 250);\n}\n.bm-viewport button {\n display: grid;\n place-items: center;\n width: 36px;\n height: 30px;\n padding: 0;\n border: 0;\n border-radius: 7px;\n background: transparent;\n color: var(--bm-help);\n}\n.bm-viewport button:hover {\n color: var(--ink);\n}\n.bm-viewport button.bm-viewport-on {\n background: #fff;\n color: var(--ink);\n box-shadow: 0 1px 2px oklch(0 0 0 / 0.1);\n}\n.bm-device {\n position: fixed;\n z-index: 4;\n top: 56px;\n left: var(--bm-nav-w);\n right: var(--bm-insp-w);\n bottom: 0;\n display: flex;\n flex-direction: column;\n align-items: center;\n overflow: auto;\n background: oklch(0.93 0.005 250);\n}\n.bm-device-frame {\n flex: none;\n max-width: calc(100% - 32px);\n height: calc(100% - 64px);\n margin: 24px 0 8px;\n border: 0;\n border-radius: 14px;\n background: #fff;\n box-shadow:\n 0 0 0 1px oklch(0.86 0.005 250),\n 0 24px 48px -24px oklch(0.2 0.02 255 / 0.3);\n}\n.bm-device-note {\n margin: 0 0 8px;\n font-size: 12px;\n color: var(--muted);\n}\n.bm-seg-dot {\n display: inline-block;\n width: 7px;\n height: 7px;\n margin-right: 6px;\n border-radius: 999px;\n vertical-align: 1px;\n}\n.bm-seg-dot-published {\n background: oklch(0.55 0.14 145);\n}\n.bm-seg-dot-draft {\n background: oklch(0.65 0.01 255);\n}\n\n/*\n * Toasts: errors and warnings over every screen, bottom right. Newest in front; older ones peek out behind it,\n * smaller. Hover or focus fans them out. Each stays until dismissed.\n */\n.bm-toaster {\n position: fixed;\n z-index: 20;\n right: 16px;\n bottom: 16px;\n width: min(400px, calc(100vw - 32px));\n transition: height 0.2s ease;\n}\n.bm-toast-list {\n margin: 0;\n padding: 0;\n list-style: none;\n}\n.bm-toast {\n position: absolute;\n right: 0;\n bottom: 0;\n left: 0;\n display: flex;\n align-items: flex-start;\n gap: 10px;\n padding: 12px 10px 12px 14px;\n border-radius: 12px;\n background: #fff;\n box-shadow: var(--bm-shadow-pop);\n transform-origin: bottom center;\n transition:\n transform 0.25s ease,\n opacity 0.2s ease;\n}\n.bm-toast::before {\n content: \"\";\n position: absolute;\n inset: 0 auto 0 0;\n width: 3px;\n border-radius: 12px 0 0 12px;\n background: var(--bm-info);\n}\n.bm-toast-error::before {\n background: var(--bm-danger);\n}\n.bm-toast-warning::before {\n background: var(--bm-unsaved-dot);\n}\n.bm-toast-icon {\n flex: none;\n display: grid;\n place-items: center;\n width: 20px;\n height: 20px;\n color: var(--bm-icon);\n}\n.bm-toast-error .bm-toast-icon {\n color: var(--bm-danger-icon);\n}\n.bm-toast-warning .bm-toast-icon {\n color: var(--warn-ink);\n}\n.bm-toast-copy {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n gap: 4px;\n padding-top: 1px;\n}\n.bm-toast-title {\n margin: 0;\n font-size: 13px;\n font-weight: 600;\n line-height: 1.4;\n color: var(--bm-ink);\n}\n.bm-toast-lines {\n margin: 0;\n padding: 0;\n max-height: 160px;\n overflow: auto;\n list-style: none;\n font-family: var(--mono);\n font-size: 11px;\n line-height: 1.5;\n color: var(--bm-label);\n overflow-wrap: anywhere;\n}\n.bm-toast-close {\n flex: none;\n display: grid;\n place-items: center;\n width: 26px;\n height: 26px;\n padding: 0;\n border: 0;\n border-radius: 6px;\n background: transparent;\n color: var(--bm-icon);\n cursor: pointer;\n}\n.bm-toast-close:hover {\n background: var(--bm-fill-hover);\n color: var(--bm-ink);\n}\n.bm-toast-close:focus-visible,\n.bm-toast-clear:focus-visible {\n outline: 2px solid var(--bm-primary);\n outline-offset: 1px;\n}\n.bm-toast-clear {\n position: absolute;\n top: 0;\n right: 0;\n min-height: 26px;\n padding: 0 10px;\n border: 0;\n border-radius: 999px;\n background: #fff;\n box-shadow: var(--bm-shadow-pop);\n font-size: 12px;\n font-weight: 500;\n color: var(--bm-label);\n cursor: pointer;\n}\n@media (prefers-reduced-motion: reduce) {\n .bm-toaster,\n .bm-toast {\n transition: none;\n }\n}\n";
|
|
21239
21308
|
//#endregion
|
|
21240
21309
|
//#region src/ui/styles.ts
|
|
21241
21310
|
function boxStyle(rect, offset = 0) {
|
|
@@ -21605,6 +21674,127 @@ function SectionPicker() {
|
|
|
21605
21674
|
});
|
|
21606
21675
|
}
|
|
21607
21676
|
//#endregion
|
|
21677
|
+
//#region src/ui/overlay/toaster.tsx
|
|
21678
|
+
/** Toasts drawn behind the front one while the stack is collapsed. More are kept, just not painted. */
|
|
21679
|
+
const VISIBLE_BEHIND = 2;
|
|
21680
|
+
/** How far each toast behind peeks out above the one in front, and how much smaller it is. */
|
|
21681
|
+
const PEEK = 10;
|
|
21682
|
+
const SHRINK = .05;
|
|
21683
|
+
const GAP = 8;
|
|
21684
|
+
/** Room above the fanned-out stack for Dismiss all. */
|
|
21685
|
+
const CLEAR_ROW = 34;
|
|
21686
|
+
const ICON = {
|
|
21687
|
+
error: "alert",
|
|
21688
|
+
warning: "alert",
|
|
21689
|
+
info: "info"
|
|
21690
|
+
};
|
|
21691
|
+
/**
|
|
21692
|
+
* Errors and warnings over the whole editor, bottom right. Collapsed, the newest is in front and older ones peek out
|
|
21693
|
+
* behind it; hover or keyboard focus fans the stack out so each can be read and dismissed.
|
|
21694
|
+
*/
|
|
21695
|
+
function Toaster() {
|
|
21696
|
+
const { ui } = useEditor();
|
|
21697
|
+
const toasts = ui.toasts.list.value;
|
|
21698
|
+
const [expanded, setExpanded] = useState(false);
|
|
21699
|
+
const [heights, setHeights] = useState({});
|
|
21700
|
+
const nodes = useRef(/* @__PURE__ */ new Map());
|
|
21701
|
+
useLayoutEffect(() => {
|
|
21702
|
+
const next = {};
|
|
21703
|
+
let changed = Object.keys(heights).length !== toasts.length;
|
|
21704
|
+
for (const toast of toasts) {
|
|
21705
|
+
const height = nodes.current.get(toast.id)?.offsetHeight ?? 0;
|
|
21706
|
+
next[toast.id] = height;
|
|
21707
|
+
if (heights[toast.id] !== height) changed = true;
|
|
21708
|
+
}
|
|
21709
|
+
if (changed) setHeights(next);
|
|
21710
|
+
});
|
|
21711
|
+
useLayoutEffect(() => {
|
|
21712
|
+
if (toasts.length === 0) setExpanded(false);
|
|
21713
|
+
}, [toasts.length]);
|
|
21714
|
+
if (toasts.length === 0) return null;
|
|
21715
|
+
const newestFirst = [...toasts].reverse();
|
|
21716
|
+
const frontHeight = heights[newestFirst[0].id] ?? 0;
|
|
21717
|
+
let offset = 0;
|
|
21718
|
+
const placed = newestFirst.map((toast, index) => {
|
|
21719
|
+
const at = offset;
|
|
21720
|
+
offset += (heights[toast.id] ?? 0) + GAP;
|
|
21721
|
+
return {
|
|
21722
|
+
toast,
|
|
21723
|
+
index,
|
|
21724
|
+
at
|
|
21725
|
+
};
|
|
21726
|
+
});
|
|
21727
|
+
const stackHeight = expanded ? offset - GAP : frontHeight + Math.min(newestFirst.length - 1, VISIBLE_BEHIND) * PEEK;
|
|
21728
|
+
const clearAll = expanded && toasts.length > 1;
|
|
21729
|
+
return /* @__PURE__ */ jsxs("section", {
|
|
21730
|
+
class: "bm-toaster",
|
|
21731
|
+
"aria-label": "Notifications",
|
|
21732
|
+
"data-expanded": expanded || void 0,
|
|
21733
|
+
style: `height:${stackHeight + (clearAll ? CLEAR_ROW : 0)}px;`,
|
|
21734
|
+
onMouseEnter: () => setExpanded(true),
|
|
21735
|
+
onMouseLeave: () => setExpanded(false),
|
|
21736
|
+
onFocusIn: () => setExpanded(true),
|
|
21737
|
+
onFocusOut: (event) => {
|
|
21738
|
+
if (!event.currentTarget.contains(event.relatedTarget)) setExpanded(false);
|
|
21739
|
+
},
|
|
21740
|
+
children: [clearAll && /* @__PURE__ */ jsx("button", {
|
|
21741
|
+
type: "button",
|
|
21742
|
+
class: "bm-toast-clear",
|
|
21743
|
+
onClick: ui.toasts.clear,
|
|
21744
|
+
children: "Dismiss all"
|
|
21745
|
+
}), /* @__PURE__ */ jsx("ol", {
|
|
21746
|
+
class: "bm-toast-list",
|
|
21747
|
+
children: placed.map(({ toast, index, at }) => {
|
|
21748
|
+
const hidden = !expanded && index > VISIBLE_BEHIND;
|
|
21749
|
+
const transform = expanded ? `translateY(${-at}px)` : `translateY(${-index * PEEK}px) scale(${1 - index * SHRINK})`;
|
|
21750
|
+
const clip = !expanded && index > 0 && frontHeight > 0 ? `height:${frontHeight}px;overflow:hidden;` : "";
|
|
21751
|
+
return /* @__PURE__ */ jsxs("li", {
|
|
21752
|
+
class: `bm-toast bm-toast-${toast.tone}`,
|
|
21753
|
+
role: toast.tone === "error" ? "alert" : "status",
|
|
21754
|
+
"aria-hidden": hidden || void 0,
|
|
21755
|
+
inert: hidden || !expanded && index > 0 || void 0,
|
|
21756
|
+
"data-front": index === 0 || void 0,
|
|
21757
|
+
style: `z-index:${toasts.length - index};transform:${transform};opacity:${hidden ? 0 : 1};${clip}`,
|
|
21758
|
+
ref: (node) => {
|
|
21759
|
+
if (node) nodes.current.set(toast.id, node);
|
|
21760
|
+
else nodes.current.delete(toast.id);
|
|
21761
|
+
},
|
|
21762
|
+
children: [
|
|
21763
|
+
/* @__PURE__ */ jsx("span", {
|
|
21764
|
+
class: "bm-toast-icon",
|
|
21765
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
21766
|
+
name: ICON[toast.tone],
|
|
21767
|
+
size: 16
|
|
21768
|
+
})
|
|
21769
|
+
}),
|
|
21770
|
+
/* @__PURE__ */ jsxs("div", {
|
|
21771
|
+
class: "bm-toast-copy",
|
|
21772
|
+
children: [/* @__PURE__ */ jsx("p", {
|
|
21773
|
+
class: "bm-toast-title",
|
|
21774
|
+
children: toast.title
|
|
21775
|
+
}), toast.lines.length > 0 && /* @__PURE__ */ jsx("ul", {
|
|
21776
|
+
class: "bm-toast-lines",
|
|
21777
|
+
children: toast.lines.map((line, at) => /* @__PURE__ */ jsx("li", { children: line }, `${at}:${line}`))
|
|
21778
|
+
})]
|
|
21779
|
+
}),
|
|
21780
|
+
/* @__PURE__ */ jsx("button", {
|
|
21781
|
+
type: "button",
|
|
21782
|
+
class: "bm-toast-close",
|
|
21783
|
+
"aria-label": "Dismiss",
|
|
21784
|
+
title: "Dismiss",
|
|
21785
|
+
onClick: () => ui.toasts.dismiss(toast.id),
|
|
21786
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
21787
|
+
name: "x",
|
|
21788
|
+
size: 14
|
|
21789
|
+
})
|
|
21790
|
+
})
|
|
21791
|
+
]
|
|
21792
|
+
}, toast.id);
|
|
21793
|
+
})
|
|
21794
|
+
})]
|
|
21795
|
+
});
|
|
21796
|
+
}
|
|
21797
|
+
//#endregion
|
|
21608
21798
|
//#region src/ui/device-mirror.ts
|
|
21609
21799
|
/** On the `<iframe>` of a tablet or mobile frame. The editor script inside it mirrors the draft instead of mounting. */
|
|
21610
21800
|
const DEVICE_FRAME_ATTR = "data-bearminion-device";
|
|
@@ -23769,31 +23959,6 @@ function sampleItem(value) {
|
|
|
23769
23959
|
/** The inspector adds a section from its outline: the picker opens beside the inspector, at the button's height. */
|
|
23770
23960
|
const PICKER_HEIGHT = 440;
|
|
23771
23961
|
const PICKER_OFFSET = 536;
|
|
23772
|
-
const FILE_LABELS = {
|
|
23773
|
-
page: "Page",
|
|
23774
|
-
site: "Site settings"
|
|
23775
|
-
};
|
|
23776
|
-
function SaveIssues() {
|
|
23777
|
-
const { ui } = useEditor();
|
|
23778
|
-
const issues = ui.issues.value;
|
|
23779
|
-
if (issues.length === 0) return null;
|
|
23780
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
23781
|
-
class: "bm-alert",
|
|
23782
|
-
role: "alert",
|
|
23783
|
-
children: [/* @__PURE__ */ jsxs("p", {
|
|
23784
|
-
class: "bm-alert-title",
|
|
23785
|
-
children: [/* @__PURE__ */ jsx(Icon, { name: "alert" }), "Save failed. Nothing was written."]
|
|
23786
|
-
}), issues.map((issue) => /* @__PURE__ */ jsxs("p", {
|
|
23787
|
-
class: "bm-error",
|
|
23788
|
-
children: [
|
|
23789
|
-
issue.file ? `${FILE_LABELS[issue.file]} › ` : "",
|
|
23790
|
-
issue.path,
|
|
23791
|
-
": ",
|
|
23792
|
-
issue.message
|
|
23793
|
-
]
|
|
23794
|
-
}, `${issue.file ?? ""}:${issue.path}:${issue.message}`))]
|
|
23795
|
-
});
|
|
23796
|
-
}
|
|
23797
23962
|
function SectionPanel({ catalog }) {
|
|
23798
23963
|
const { doc, ui, edits, sections, preview } = useEditor();
|
|
23799
23964
|
const page = doc.page.value;
|
|
@@ -23991,15 +24156,23 @@ function useFocusRequest(root) {
|
|
|
23991
24156
|
node.focus();
|
|
23992
24157
|
});
|
|
23993
24158
|
}
|
|
23994
|
-
/**
|
|
23995
|
-
function
|
|
24159
|
+
/** While a sidebar's edge is dragged the page must not take the pointer, or the drag stops over it. */
|
|
24160
|
+
function setResizing(dragging) {
|
|
24161
|
+
document.documentElement.toggleAttribute("data-bearminion-resizing", dragging);
|
|
24162
|
+
}
|
|
24163
|
+
/**
|
|
24164
|
+
* The left edge of the right-hand sidebar (the inspector or a settings sidebar): drag, arrow keys, Home and End
|
|
24165
|
+
* resize it; a double click resets it. Both sidebars share one width.
|
|
24166
|
+
*/
|
|
24167
|
+
function SidebarResize({ label = "Resize inspector" }) {
|
|
24168
|
+
const onDrag = setResizing;
|
|
23996
24169
|
const { ui, chrome } = useEditor();
|
|
23997
24170
|
const width = ui.inspectorWidth.value;
|
|
23998
24171
|
return /* @__PURE__ */ jsx("div", {
|
|
23999
24172
|
class: "bm-inspector-resize",
|
|
24000
24173
|
role: "separator",
|
|
24001
24174
|
"aria-orientation": "vertical",
|
|
24002
|
-
"aria-label":
|
|
24175
|
+
"aria-label": label,
|
|
24003
24176
|
"aria-valuemin": 280,
|
|
24004
24177
|
"aria-valuemax": 560,
|
|
24005
24178
|
"aria-valuenow": width,
|
|
@@ -24056,16 +24229,13 @@ function Inspector({ catalog }) {
|
|
|
24056
24229
|
const select = (next) => {
|
|
24057
24230
|
ui.inspectorTab.value = next;
|
|
24058
24231
|
};
|
|
24059
|
-
const setDragging = (dragging) => {
|
|
24060
|
-
document.documentElement.toggleAttribute("data-bearminion-resizing", dragging);
|
|
24061
|
-
};
|
|
24062
24232
|
return /* @__PURE__ */ jsxs("aside", {
|
|
24063
24233
|
class: "bm-inspector bm-panel bm-chrome",
|
|
24064
24234
|
"aria-label": "Inspector",
|
|
24065
24235
|
style: `width:${ui.inspectorWidth.value}px`,
|
|
24066
24236
|
ref: root,
|
|
24067
24237
|
children: [
|
|
24068
|
-
/* @__PURE__ */ jsx(
|
|
24238
|
+
/* @__PURE__ */ jsx(SidebarResize, {}),
|
|
24069
24239
|
/* @__PURE__ */ jsx("div", {
|
|
24070
24240
|
class: "bm-tabs",
|
|
24071
24241
|
role: "tablist",
|
|
@@ -24091,12 +24261,12 @@ function Inspector({ catalog }) {
|
|
|
24091
24261
|
anchors: doc.anchors.value,
|
|
24092
24262
|
editLink: links.open
|
|
24093
24263
|
},
|
|
24094
|
-
children: /* @__PURE__ */
|
|
24264
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
24095
24265
|
class: "bm-body",
|
|
24096
24266
|
role: "tabpanel",
|
|
24097
24267
|
id: `bm-panel-${tab}`,
|
|
24098
24268
|
"aria-labelledby": `bm-tab-${tab}`,
|
|
24099
|
-
children:
|
|
24269
|
+
children: tab === "page" ? /* @__PURE__ */ jsx(PagePanel, { catalog }) : /* @__PURE__ */ jsx(SectionPanel, { catalog })
|
|
24100
24270
|
})
|
|
24101
24271
|
})
|
|
24102
24272
|
})
|
|
@@ -24582,7 +24752,7 @@ function TopBar({ groups }) {
|
|
|
24582
24752
|
})
|
|
24583
24753
|
] })
|
|
24584
24754
|
}),
|
|
24585
|
-
view
|
|
24755
|
+
showsPage(view) && /* @__PURE__ */ jsx(ViewportSwitch, {}),
|
|
24586
24756
|
/* @__PURE__ */ jsxs("div", {
|
|
24587
24757
|
class: "bm-topbar-right",
|
|
24588
24758
|
children: [
|
|
@@ -24799,7 +24969,6 @@ function ListingView({ catalog, type }) {
|
|
|
24799
24969
|
const [selected, setSelected] = useState(/* @__PURE__ */ new Set());
|
|
24800
24970
|
const [creating, setCreating] = useState(false);
|
|
24801
24971
|
const [pending, setPending] = useState(null);
|
|
24802
|
-
const [error, setError] = useState("");
|
|
24803
24972
|
const pagesType = type === "pages";
|
|
24804
24973
|
const info = doc.types.value.find((item) => item.id === type);
|
|
24805
24974
|
const label = pagesType ? "Pages" : info?.label ?? type;
|
|
@@ -24857,7 +25026,6 @@ function ListingView({ catalog, type }) {
|
|
|
24857
25026
|
setSelected(next);
|
|
24858
25027
|
}
|
|
24859
25028
|
async function duplicate(item) {
|
|
24860
|
-
setError("");
|
|
24861
25029
|
const slug = copySlug(item.slug, taken);
|
|
24862
25030
|
const result = await createEntry(item.type ?? "pages", {
|
|
24863
25031
|
slug,
|
|
@@ -24865,19 +25033,18 @@ function ListingView({ catalog, type }) {
|
|
|
24865
25033
|
template: item.slug,
|
|
24866
25034
|
...draftField ? {} : { status: "draft" }
|
|
24867
25035
|
});
|
|
24868
|
-
if (!result.ok)
|
|
25036
|
+
if (!result.ok) ui.toasts.error(`Could not duplicate ${item.title}.`, { lines: [result.message] });
|
|
24869
25037
|
await session.load();
|
|
24870
25038
|
}
|
|
24871
25039
|
async function remove(list) {
|
|
24872
25040
|
setPending(null);
|
|
24873
|
-
setError("");
|
|
24874
25041
|
const failed = [];
|
|
24875
25042
|
for (const item of list) {
|
|
24876
25043
|
const result = await deleteEntry(item.type ?? "pages", item.slug);
|
|
24877
25044
|
if (!result.ok) failed.push(`${item.title}: ${result.message}`);
|
|
24878
25045
|
}
|
|
24879
25046
|
setSelected(/* @__PURE__ */ new Set());
|
|
24880
|
-
if (failed.length > 0)
|
|
25047
|
+
if (failed.length > 0) ui.toasts.error(failed.length === 1 ? "Could not delete one item." : `Could not delete ${failed.length} items.`, { lines: failed });
|
|
24881
25048
|
await session.load();
|
|
24882
25049
|
}
|
|
24883
25050
|
const sortBy = (key) => {
|
|
@@ -24942,7 +25109,6 @@ function ListingView({ catalog, type }) {
|
|
|
24942
25109
|
})]
|
|
24943
25110
|
})]
|
|
24944
25111
|
}),
|
|
24945
|
-
/* @__PURE__ */ jsx(SaveIssues, {}),
|
|
24946
25112
|
creating && /* @__PURE__ */ jsx(NewDocumentDialog, {
|
|
24947
25113
|
noun,
|
|
24948
25114
|
storage,
|
|
@@ -24957,11 +25123,6 @@ function ListingView({ catalog, type }) {
|
|
|
24957
25123
|
onNavigate: open
|
|
24958
25124
|
})
|
|
24959
25125
|
}),
|
|
24960
|
-
error && /* @__PURE__ */ jsx("p", {
|
|
24961
|
-
class: "bm-error",
|
|
24962
|
-
role: "alert",
|
|
24963
|
-
children: error
|
|
24964
|
-
}),
|
|
24965
25126
|
/* @__PURE__ */ jsx("div", {
|
|
24966
25127
|
class: "bm-listing-filters",
|
|
24967
25128
|
role: "tablist",
|
|
@@ -25304,18 +25465,49 @@ function folderOf(images) {
|
|
|
25304
25465
|
const first = images[0]?.path;
|
|
25305
25466
|
return first ? `${first.slice(0, first.lastIndexOf("/") + 1)}` : "src/assets/uploads/";
|
|
25306
25467
|
}
|
|
25468
|
+
/** Placeholder cards while the library loads: the grid keeps its shape instead of starting empty. */
|
|
25469
|
+
const SKELETON_CARDS = 8;
|
|
25470
|
+
function MediaSkeleton() {
|
|
25471
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("p", {
|
|
25472
|
+
class: "bm-visually-hidden",
|
|
25473
|
+
role: "status",
|
|
25474
|
+
children: "Loading the image library."
|
|
25475
|
+
}), /* @__PURE__ */ jsx("ul", {
|
|
25476
|
+
class: "bm-media-grid",
|
|
25477
|
+
"aria-hidden": "true",
|
|
25478
|
+
children: Array.from({ length: SKELETON_CARDS }, (_, index) => /* @__PURE__ */ jsxs("li", {
|
|
25479
|
+
class: "bm-media-card bm-media-skeleton",
|
|
25480
|
+
children: [
|
|
25481
|
+
/* @__PURE__ */ jsx("span", { class: "bm-media-thumb bm-skeleton" }),
|
|
25482
|
+
/* @__PURE__ */ jsx("span", { class: "bm-skeleton bm-skeleton-line" }),
|
|
25483
|
+
/* @__PURE__ */ jsx("span", { class: "bm-skeleton bm-skeleton-line bm-skeleton-short" })
|
|
25484
|
+
]
|
|
25485
|
+
}, index))
|
|
25486
|
+
})] });
|
|
25487
|
+
}
|
|
25488
|
+
/** A thumbnail shimmers until its file has loaded (or failed), then fades in. */
|
|
25489
|
+
function settle(event) {
|
|
25490
|
+
const img = event.currentTarget;
|
|
25491
|
+
if (img instanceof HTMLElement) img.parentElement?.removeAttribute("data-loading");
|
|
25492
|
+
}
|
|
25307
25493
|
/** The image library as a full-screen grid: what is there, where the saved content uses it, upload and delete. */
|
|
25308
25494
|
function MediaView() {
|
|
25309
|
-
const { doc } = useEditor();
|
|
25495
|
+
const { doc, ui } = useEditor();
|
|
25310
25496
|
const [images, setImages] = useState(null);
|
|
25311
|
-
const [error, setError] = useState("");
|
|
25312
25497
|
const [busy, setBusy] = useState(false);
|
|
25313
25498
|
const [dragging, setDragging] = useState(false);
|
|
25314
25499
|
const input = useRef(null);
|
|
25315
25500
|
async function refresh() {
|
|
25316
25501
|
const result = await getImages(true);
|
|
25317
|
-
if (result.ok)
|
|
25318
|
-
|
|
25502
|
+
if (result.ok) {
|
|
25503
|
+
setImages(result.value.images);
|
|
25504
|
+
return;
|
|
25505
|
+
}
|
|
25506
|
+
ui.toasts.error("Could not load the image library.", {
|
|
25507
|
+
key: "media-load",
|
|
25508
|
+
lines: [result.message]
|
|
25509
|
+
});
|
|
25510
|
+
setImages((current) => current ?? []);
|
|
25319
25511
|
}
|
|
25320
25512
|
useEffect(() => {
|
|
25321
25513
|
refresh();
|
|
@@ -25324,7 +25516,6 @@ function MediaView() {
|
|
|
25324
25516
|
const list = [...files ?? []].filter((file) => file.type.startsWith("image/"));
|
|
25325
25517
|
if (list.length === 0) return;
|
|
25326
25518
|
setBusy(true);
|
|
25327
|
-
setError("");
|
|
25328
25519
|
const failed = [];
|
|
25329
25520
|
for (const file of list) {
|
|
25330
25521
|
const result = await uploadFile(file);
|
|
@@ -25332,14 +25523,13 @@ function MediaView() {
|
|
|
25332
25523
|
else doc.addImage(result.image);
|
|
25333
25524
|
}
|
|
25334
25525
|
setBusy(false);
|
|
25335
|
-
if (failed.length > 0)
|
|
25526
|
+
if (failed.length > 0) ui.toasts.error(failed.length === 1 ? "An upload failed." : `${failed.length} uploads failed.`, { lines: failed });
|
|
25336
25527
|
await refresh();
|
|
25337
25528
|
}
|
|
25338
25529
|
async function remove(image) {
|
|
25339
|
-
setError("");
|
|
25340
25530
|
const message = await deleteFile(image);
|
|
25341
25531
|
if (message) {
|
|
25342
|
-
|
|
25532
|
+
ui.toasts.error("Could not delete the image.", { lines: [message] });
|
|
25343
25533
|
return;
|
|
25344
25534
|
}
|
|
25345
25535
|
doc.dropImage(image);
|
|
@@ -25347,116 +25537,109 @@ function MediaView() {
|
|
|
25347
25537
|
}
|
|
25348
25538
|
return /* @__PURE__ */ jsxs("div", {
|
|
25349
25539
|
class: "bm-listing bm-media",
|
|
25350
|
-
children: [
|
|
25351
|
-
|
|
25352
|
-
|
|
25353
|
-
|
|
25354
|
-
|
|
25355
|
-
|
|
25356
|
-
|
|
25357
|
-
|
|
25358
|
-
|
|
25359
|
-
|
|
25360
|
-
|
|
25361
|
-
|
|
25362
|
-
|
|
25363
|
-
|
|
25364
|
-
|
|
25365
|
-
|
|
25366
|
-
|
|
25367
|
-
|
|
25368
|
-
|
|
25369
|
-
|
|
25370
|
-
|
|
25371
|
-
|
|
25372
|
-
|
|
25373
|
-
|
|
25374
|
-
|
|
25375
|
-
|
|
25376
|
-
|
|
25377
|
-
|
|
25378
|
-
|
|
25379
|
-
|
|
25380
|
-
|
|
25381
|
-
|
|
25382
|
-
|
|
25383
|
-
|
|
25384
|
-
|
|
25385
|
-
|
|
25386
|
-
children: folderOf(images ?? [])
|
|
25387
|
-
})]
|
|
25388
|
-
})
|
|
25389
|
-
}),
|
|
25390
|
-
error && /* @__PURE__ */ jsx("p", {
|
|
25391
|
-
class: "bm-error",
|
|
25392
|
-
role: "alert",
|
|
25393
|
-
children: error
|
|
25394
|
-
}),
|
|
25395
|
-
images === null ? /* @__PURE__ */ jsx("p", {
|
|
25396
|
-
class: "bm-note",
|
|
25397
|
-
children: "Loading the image library."
|
|
25398
|
-
}) : /* @__PURE__ */ jsxs("ul", {
|
|
25399
|
-
class: "bm-media-grid",
|
|
25400
|
-
children: [images.map((image) => {
|
|
25401
|
-
const usages = image.usages ?? [];
|
|
25402
|
-
return /* @__PURE__ */ jsxs("li", {
|
|
25403
|
-
class: "bm-media-card",
|
|
25404
|
-
children: [
|
|
25405
|
-
/* @__PURE__ */ jsx("span", {
|
|
25406
|
-
class: "bm-media-thumb",
|
|
25407
|
-
children: /* @__PURE__ */ jsx("img", {
|
|
25408
|
-
src: previewSrc(image.path),
|
|
25409
|
-
alt: "",
|
|
25410
|
-
loading: "lazy"
|
|
25411
|
-
})
|
|
25412
|
-
}),
|
|
25413
|
-
/* @__PURE__ */ jsx("span", {
|
|
25414
|
-
class: "bm-media-name",
|
|
25415
|
-
title: image.path,
|
|
25416
|
-
children: image.filename
|
|
25417
|
-
}),
|
|
25418
|
-
/* @__PURE__ */ jsx("span", {
|
|
25419
|
-
class: "bm-media-use",
|
|
25420
|
-
title: usages.join("\n"),
|
|
25421
|
-
children: usages.length === 0 ? "Not used" : `Used on ${usages.join(", ")}`
|
|
25422
|
-
}),
|
|
25423
|
-
usages.length === 0 && /* @__PURE__ */ jsx("button", {
|
|
25424
|
-
type: "button",
|
|
25425
|
-
class: "bm-icon-btn bm-danger bm-media-delete",
|
|
25426
|
-
"aria-label": `Delete ${image.filename}`,
|
|
25427
|
-
title: "Delete image",
|
|
25428
|
-
onClick: () => void remove(image),
|
|
25429
|
-
children: /* @__PURE__ */ jsx(Icon, {
|
|
25430
|
-
name: "trash",
|
|
25431
|
-
size: 14
|
|
25432
|
-
})
|
|
25433
|
-
})
|
|
25434
|
-
]
|
|
25435
|
-
}, image.path);
|
|
25436
|
-
}), /* @__PURE__ */ jsx("li", {
|
|
25437
|
-
class: "bm-media-card",
|
|
25438
|
-
children: /* @__PURE__ */ jsxs("button", {
|
|
25439
|
-
type: "button",
|
|
25440
|
-
class: dragging ? "bm-media-drop bm-media-drop-on" : "bm-media-drop",
|
|
25441
|
-
onClick: () => input.current?.click(),
|
|
25442
|
-
onDragOver: (event) => {
|
|
25443
|
-
event.preventDefault();
|
|
25444
|
-
setDragging(true);
|
|
25445
|
-
},
|
|
25446
|
-
onDragLeave: () => setDragging(false),
|
|
25447
|
-
onDrop: (event) => {
|
|
25448
|
-
event.preventDefault();
|
|
25449
|
-
setDragging(false);
|
|
25450
|
-
upload(event.dataTransfer?.files);
|
|
25451
|
-
},
|
|
25452
|
-
children: [/* @__PURE__ */ jsx(Icon, {
|
|
25453
|
-
name: "image",
|
|
25454
|
-
size: 22
|
|
25455
|
-
}), "Drop images here"]
|
|
25456
|
-
})
|
|
25540
|
+
children: [/* @__PURE__ */ jsx("header", {
|
|
25541
|
+
class: "bm-listing-head",
|
|
25542
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
25543
|
+
class: "bm-listing-heading",
|
|
25544
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
25545
|
+
class: "bm-listing-title-row",
|
|
25546
|
+
children: [
|
|
25547
|
+
/* @__PURE__ */ jsx("h1", {
|
|
25548
|
+
class: "bm-screen-title",
|
|
25549
|
+
children: "Media"
|
|
25550
|
+
}),
|
|
25551
|
+
/* @__PURE__ */ jsxs("button", {
|
|
25552
|
+
type: "button",
|
|
25553
|
+
class: "bm-primary bm-listing-new",
|
|
25554
|
+
disabled: busy,
|
|
25555
|
+
onClick: () => input.current?.click(),
|
|
25556
|
+
children: [/* @__PURE__ */ jsx(Icon, {
|
|
25557
|
+
name: "upload",
|
|
25558
|
+
size: 16
|
|
25559
|
+
}), busy ? "Uploading…" : "Upload"]
|
|
25560
|
+
}),
|
|
25561
|
+
/* @__PURE__ */ jsx("input", {
|
|
25562
|
+
ref: input,
|
|
25563
|
+
type: "file",
|
|
25564
|
+
accept: "image/*",
|
|
25565
|
+
multiple: true,
|
|
25566
|
+
hidden: true,
|
|
25567
|
+
onChange: (event) => {
|
|
25568
|
+
upload(event.currentTarget.files);
|
|
25569
|
+
event.currentTarget.value = "";
|
|
25570
|
+
}
|
|
25571
|
+
})
|
|
25572
|
+
]
|
|
25573
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
25574
|
+
class: "bm-screen-file",
|
|
25575
|
+
children: folderOf(images ?? [])
|
|
25457
25576
|
})]
|
|
25458
25577
|
})
|
|
25459
|
-
|
|
25578
|
+
}), images === null ? /* @__PURE__ */ jsx(MediaSkeleton, {}) : /* @__PURE__ */ jsxs("ul", {
|
|
25579
|
+
class: "bm-media-grid",
|
|
25580
|
+
children: [images.map((image) => {
|
|
25581
|
+
const usages = image.usages ?? [];
|
|
25582
|
+
return /* @__PURE__ */ jsxs("li", {
|
|
25583
|
+
class: "bm-media-card",
|
|
25584
|
+
children: [
|
|
25585
|
+
/* @__PURE__ */ jsx("span", {
|
|
25586
|
+
class: "bm-media-thumb",
|
|
25587
|
+
"data-loading": true,
|
|
25588
|
+
children: /* @__PURE__ */ jsx("img", {
|
|
25589
|
+
src: previewSrc(image.path),
|
|
25590
|
+
alt: "",
|
|
25591
|
+
loading: "lazy",
|
|
25592
|
+
decoding: "async",
|
|
25593
|
+
onLoad: settle,
|
|
25594
|
+
onError: settle
|
|
25595
|
+
})
|
|
25596
|
+
}),
|
|
25597
|
+
/* @__PURE__ */ jsx("span", {
|
|
25598
|
+
class: "bm-media-name",
|
|
25599
|
+
title: image.path,
|
|
25600
|
+
children: image.filename
|
|
25601
|
+
}),
|
|
25602
|
+
/* @__PURE__ */ jsx("span", {
|
|
25603
|
+
class: "bm-media-use",
|
|
25604
|
+
title: usages.join("\n"),
|
|
25605
|
+
children: usages.length === 0 ? "Not used" : `Used on ${usages.join(", ")}`
|
|
25606
|
+
}),
|
|
25607
|
+
usages.length === 0 && /* @__PURE__ */ jsx("button", {
|
|
25608
|
+
type: "button",
|
|
25609
|
+
class: "bm-icon-btn bm-danger bm-media-delete",
|
|
25610
|
+
"aria-label": `Delete ${image.filename}`,
|
|
25611
|
+
title: "Delete image",
|
|
25612
|
+
onClick: () => void remove(image),
|
|
25613
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
25614
|
+
name: "trash",
|
|
25615
|
+
size: 14
|
|
25616
|
+
})
|
|
25617
|
+
})
|
|
25618
|
+
]
|
|
25619
|
+
}, image.path);
|
|
25620
|
+
}), /* @__PURE__ */ jsx("li", {
|
|
25621
|
+
class: "bm-media-card",
|
|
25622
|
+
children: /* @__PURE__ */ jsxs("button", {
|
|
25623
|
+
type: "button",
|
|
25624
|
+
class: dragging ? "bm-media-drop bm-media-drop-on" : "bm-media-drop",
|
|
25625
|
+
onClick: () => input.current?.click(),
|
|
25626
|
+
onDragOver: (event) => {
|
|
25627
|
+
event.preventDefault();
|
|
25628
|
+
setDragging(true);
|
|
25629
|
+
},
|
|
25630
|
+
onDragLeave: () => setDragging(false),
|
|
25631
|
+
onDrop: (event) => {
|
|
25632
|
+
event.preventDefault();
|
|
25633
|
+
setDragging(false);
|
|
25634
|
+
upload(event.dataTransfer?.files);
|
|
25635
|
+
},
|
|
25636
|
+
children: [/* @__PURE__ */ jsx(Icon, {
|
|
25637
|
+
name: "image",
|
|
25638
|
+
size: 22
|
|
25639
|
+
}), "Drop images here"]
|
|
25640
|
+
})
|
|
25641
|
+
})]
|
|
25642
|
+
})]
|
|
25460
25643
|
});
|
|
25461
25644
|
}
|
|
25462
25645
|
//#endregion
|
|
@@ -25489,23 +25672,19 @@ function SettingsScreen({ view, children }) {
|
|
|
25489
25672
|
const { title, file } = SETTINGS[view];
|
|
25490
25673
|
return /* @__PURE__ */ jsxs("div", {
|
|
25491
25674
|
class: "bm-screen",
|
|
25492
|
-
children: [
|
|
25493
|
-
|
|
25494
|
-
|
|
25495
|
-
|
|
25496
|
-
|
|
25497
|
-
|
|
25498
|
-
|
|
25499
|
-
|
|
25500
|
-
|
|
25501
|
-
|
|
25502
|
-
|
|
25503
|
-
|
|
25504
|
-
|
|
25505
|
-
class: "bm-screen-cards",
|
|
25506
|
-
children
|
|
25507
|
-
})
|
|
25508
|
-
]
|
|
25675
|
+
children: [/* @__PURE__ */ jsxs("header", {
|
|
25676
|
+
class: "bm-screen-head",
|
|
25677
|
+
children: [/* @__PURE__ */ jsx("h1", {
|
|
25678
|
+
class: "bm-screen-title",
|
|
25679
|
+
children: title
|
|
25680
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
25681
|
+
class: "bm-screen-file",
|
|
25682
|
+
children: file
|
|
25683
|
+
})]
|
|
25684
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
25685
|
+
class: "bm-screen-cards",
|
|
25686
|
+
children
|
|
25687
|
+
})]
|
|
25509
25688
|
});
|
|
25510
25689
|
}
|
|
25511
25690
|
function SettingsBody({ view, catalog }) {
|
|
@@ -25536,43 +25715,97 @@ function SettingsBody({ view, catalog }) {
|
|
|
25536
25715
|
});
|
|
25537
25716
|
}
|
|
25538
25717
|
}
|
|
25718
|
+
/** Site links and the open page's anchors for link fields, and the site's issues for the fields they name. */
|
|
25719
|
+
function SiteContexts({ children }) {
|
|
25720
|
+
const { doc, ui, links } = useEditor();
|
|
25721
|
+
return /* @__PURE__ */ jsx(IssueContext.Provider, {
|
|
25722
|
+
value: ui.issues.value.filter((issue) => issue.file === void 0 || issue.file === "site"),
|
|
25723
|
+
children: /* @__PURE__ */ jsx(LinksContext.Provider, {
|
|
25724
|
+
value: {
|
|
25725
|
+
pages: doc.pages.value,
|
|
25726
|
+
currentSlug: doc.linkKey.value,
|
|
25727
|
+
anchors: doc.anchors.value,
|
|
25728
|
+
editLink: links.open
|
|
25729
|
+
},
|
|
25730
|
+
children
|
|
25731
|
+
})
|
|
25732
|
+
});
|
|
25733
|
+
}
|
|
25734
|
+
/**
|
|
25735
|
+
* Navigation, Footer or Site in the right-hand sidebar, where the inspector usually is, so the page they change stays
|
|
25736
|
+
* on the canvas beside them. Same width and resize edge as the inspector; Close (or Escape) goes back to it.
|
|
25737
|
+
*/
|
|
25738
|
+
function SettingsSidebar({ view, catalog }) {
|
|
25739
|
+
const { ui } = useEditor();
|
|
25740
|
+
const root = useRef(null);
|
|
25741
|
+
useFocusRequest(root);
|
|
25742
|
+
const { title, file } = SETTINGS[view];
|
|
25743
|
+
return /* @__PURE__ */ jsxs("aside", {
|
|
25744
|
+
class: "bm-inspector bm-settings-side bm-panel bm-chrome",
|
|
25745
|
+
"aria-label": title,
|
|
25746
|
+
style: `width:${ui.inspectorWidth.value}px`,
|
|
25747
|
+
ref: root,
|
|
25748
|
+
children: [
|
|
25749
|
+
/* @__PURE__ */ jsx(SidebarResize, { label: `Resize ${title} settings` }),
|
|
25750
|
+
/* @__PURE__ */ jsxs("header", {
|
|
25751
|
+
class: "bm-side-head",
|
|
25752
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
25753
|
+
class: "bm-side-heading",
|
|
25754
|
+
children: [/* @__PURE__ */ jsx("h2", {
|
|
25755
|
+
class: "bm-side-title",
|
|
25756
|
+
children: title
|
|
25757
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
25758
|
+
class: "bm-screen-file",
|
|
25759
|
+
children: file
|
|
25760
|
+
})]
|
|
25761
|
+
}), /* @__PURE__ */ jsx("button", {
|
|
25762
|
+
type: "button",
|
|
25763
|
+
class: "bm-side-close",
|
|
25764
|
+
"aria-label": `Close ${title} settings`,
|
|
25765
|
+
title: "Close (Esc)",
|
|
25766
|
+
onClick: () => ui.openView("canvas"),
|
|
25767
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
25768
|
+
name: "x",
|
|
25769
|
+
size: 16
|
|
25770
|
+
})
|
|
25771
|
+
})]
|
|
25772
|
+
}),
|
|
25773
|
+
/* @__PURE__ */ jsx(SiteContexts, { children: /* @__PURE__ */ jsx("div", {
|
|
25774
|
+
class: "bm-body",
|
|
25775
|
+
children: /* @__PURE__ */ jsx(SettingsBody, {
|
|
25776
|
+
view,
|
|
25777
|
+
catalog
|
|
25778
|
+
})
|
|
25779
|
+
}) })
|
|
25780
|
+
]
|
|
25781
|
+
});
|
|
25782
|
+
}
|
|
25539
25783
|
/** A full-screen view over the canvas and the inspector: a content listing, Media or a settings screen. */
|
|
25540
25784
|
function FullView({ view, catalog }) {
|
|
25541
|
-
const { doc
|
|
25785
|
+
const { doc } = useEditor();
|
|
25542
25786
|
const type = listingType(view);
|
|
25543
25787
|
const settings = SETTINGS_VIEWS.includes(view) ? view : null;
|
|
25544
25788
|
const label = type === "pages" ? "Pages" : type !== null ? doc.types.value.find((item) => item.id === type)?.label ?? type : settings ? SETTINGS[settings].title : "Media";
|
|
25545
25789
|
return /* @__PURE__ */ jsx("main", {
|
|
25546
25790
|
class: "bm-view bm-panel bm-chrome",
|
|
25547
25791
|
"aria-label": label,
|
|
25548
|
-
children: /* @__PURE__ */ jsx(
|
|
25549
|
-
|
|
25550
|
-
|
|
25551
|
-
|
|
25552
|
-
|
|
25553
|
-
|
|
25554
|
-
|
|
25555
|
-
|
|
25556
|
-
},
|
|
25557
|
-
children: type !== null ? /* @__PURE__ */ jsx(ListingView, {
|
|
25558
|
-
catalog,
|
|
25559
|
-
type
|
|
25560
|
-
}, type) : view === "media" ? /* @__PURE__ */ jsx(MediaView, {}) : settings ? /* @__PURE__ */ jsx(SettingsScreen, {
|
|
25561
|
-
view: settings,
|
|
25562
|
-
children: /* @__PURE__ */ jsx(SettingsBody, {
|
|
25563
|
-
view: settings,
|
|
25564
|
-
catalog
|
|
25565
|
-
})
|
|
25566
|
-
}) : null
|
|
25792
|
+
children: /* @__PURE__ */ jsx(SiteContexts, { children: type !== null ? /* @__PURE__ */ jsx(ListingView, {
|
|
25793
|
+
catalog,
|
|
25794
|
+
type
|
|
25795
|
+
}, type) : view === "media" ? /* @__PURE__ */ jsx(MediaView, {}) : settings ? /* @__PURE__ */ jsx(SettingsScreen, {
|
|
25796
|
+
view: settings,
|
|
25797
|
+
children: /* @__PURE__ */ jsx(SettingsBody, {
|
|
25798
|
+
view: settings,
|
|
25799
|
+
catalog
|
|
25567
25800
|
})
|
|
25568
|
-
})
|
|
25801
|
+
}) : null })
|
|
25569
25802
|
});
|
|
25570
25803
|
}
|
|
25571
25804
|
//#endregion
|
|
25572
25805
|
//#region src/ui/shell/shell.tsx
|
|
25573
25806
|
/**
|
|
25574
|
-
* The editor around the page: navigation on the left, the top bar, the inspector
|
|
25575
|
-
* views that cover the canvas. The page itself is the canvas (see `page-frame.ts`), so nothing here draws it.
|
|
25807
|
+
* The editor around the page: navigation on the left, the top bar, the inspector (or a settings sidebar) on the
|
|
25808
|
+
* right, and the full-screen views that cover the canvas. The page itself is the canvas (see `page-frame.ts`), so nothing here draws it.
|
|
25576
25809
|
*/
|
|
25577
25810
|
function Shell({ catalog }) {
|
|
25578
25811
|
const { doc, ui } = useEditor();
|
|
@@ -25581,16 +25814,21 @@ function Shell({ catalog }) {
|
|
|
25581
25814
|
const groups = navGroups(doc.types.value, doc.pages.value, true);
|
|
25582
25815
|
const navWidth = previewing ? 0 : ui.navOpen.value ? 248 : 64;
|
|
25583
25816
|
const inspector = Boolean(catalog) && !previewing && view === "canvas" && ui.open.value;
|
|
25817
|
+
const side = Boolean(catalog) && !previewing && isSideView(view);
|
|
25584
25818
|
const viewport = ui.viewport.value;
|
|
25585
25819
|
return /* @__PURE__ */ jsxs("div", {
|
|
25586
25820
|
class: "bm-shell",
|
|
25587
|
-
style: `--bm-nav-w:${navWidth}px;--bm-insp-w:${inspector ? ui.inspectorWidth.value : 0}px;`,
|
|
25821
|
+
style: `--bm-nav-w:${navWidth}px;--bm-insp-w:${inspector || side ? ui.inspectorWidth.value : 0}px;`,
|
|
25588
25822
|
children: [
|
|
25589
25823
|
!previewing && /* @__PURE__ */ jsx(NavSidebar, { groups }),
|
|
25590
25824
|
/* @__PURE__ */ jsx(TopBar, { groups }),
|
|
25591
|
-
!previewing && view
|
|
25825
|
+
!previewing && showsPage(view) && viewport !== "desktop" && /* @__PURE__ */ jsx(DeviceFrame, { viewport }, viewport),
|
|
25592
25826
|
catalog && inspector && /* @__PURE__ */ jsx(Inspector, { catalog }),
|
|
25593
|
-
catalog &&
|
|
25827
|
+
catalog && side && isSideView(view) && /* @__PURE__ */ jsx(SettingsSidebar, {
|
|
25828
|
+
view,
|
|
25829
|
+
catalog
|
|
25830
|
+
}, view),
|
|
25831
|
+
catalog && !previewing && view !== "canvas" && !isSideView(view) && /* @__PURE__ */ jsx(FullView, {
|
|
25594
25832
|
view,
|
|
25595
25833
|
catalog
|
|
25596
25834
|
})
|
|
@@ -25627,7 +25865,7 @@ function CanvasLayer() {
|
|
|
25627
25865
|
/** Order matters: later elements paint over earlier ones, and the active section bar must be the first toolbar. */
|
|
25628
25866
|
function EditorView() {
|
|
25629
25867
|
const { doc, ui } = useEditor();
|
|
25630
|
-
const editing = !ui.previewing.value && ui.view.value
|
|
25868
|
+
const editing = !ui.previewing.value && showsPage(ui.view.value) && ui.viewport.value === "desktop";
|
|
25631
25869
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
25632
25870
|
editing && /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
25633
25871
|
/* @__PURE__ */ jsx(CanvasLayer, {}),
|
|
@@ -25640,8 +25878,8 @@ function EditorView() {
|
|
|
25640
25878
|
] }),
|
|
25641
25879
|
/* @__PURE__ */ jsx(Shell, { catalog: doc.catalog.value }),
|
|
25642
25880
|
/* @__PURE__ */ jsx(DraftBanner, {}),
|
|
25643
|
-
/* @__PURE__ */ jsx(
|
|
25644
|
-
/* @__PURE__ */ jsx(
|
|
25881
|
+
/* @__PURE__ */ jsx(SessionDialogs, {}),
|
|
25882
|
+
/* @__PURE__ */ jsx(Toaster, {})
|
|
25645
25883
|
] });
|
|
25646
25884
|
}
|
|
25647
25885
|
//#endregion
|