/* =========================================================================
   styles/views/site-declared.css — the website editor's side panel on a page that declares its fields
   (src/features/sites/declaredPanel.js: the Outline), the section editor (sectionEditor.js, fieldCards.js)
   and the Site view. Prefixes sdp- (the bar) and sde- (the section editor). The layout follows Primo's editor (Primo
   3.3.1, MIT: Page_Outline, Sidebar_Symbol, SectionEditor, FieldsContent, Card, TextInput, ImageField, Link,
   RepeaterFieldItem); every value here is Magnet's tokens. Hovers guarded; focus visible; no motion beyond the shared.

   How the bar takes the place of today's panel (siteBuilderCore sets one of these on #rightPanel):
     .is-decl            the Outline: #rpDeclared, and below it only the photo picker a click on a picture opens;
                         nothing else of today's panel (its words panel, list panels, Site view) ever shows under the tabs
     .is-decl-wait       a declared site whose canvas hasn't reported yet: only the skeleton (#rpDeclWait)
   ========================================================================= */
.sb-panel.is-decl > .sb-tools,
.sb-panel.is-decl > .sb-rp:not(.sdp-host) { display: none; }
.sb-panel.is-decl > #rpImage:not(.hidden) { display: flex; }
/* the photo picker open below: the bar takes what it needs, up to half the height, the picker the rest */
.sb-panel.is-decl:has(> #rpImage:not(.hidden)) > .sdp-host { flex: 0 1 auto; max-height: 50%; border-bottom: 1px solid var(--border-faint); }
/* a selection whose settings can't change on the page itself (a link's address, a form field's hint, message or
   choices): today's words panel below the Outline as the picker is, with only those rows (siteBuilderCore .is-dock) */
.sb-panel.is-decl > #rpText.is-dock:not(.hidden) { display: flex; }
.sb-panel.is-decl > #rpText.is-dock #rpLiveHint { display: none; }
.sb-panel.is-decl:has(> #rpText.is-dock:not(.hidden)) > .sdp-host { flex: 0 1 auto; max-height: 50%; border-bottom: 1px solid var(--border-faint); }

/* a declared site before its canvas has said what the page declares (siteBuilderCore declWait): the Outline's skeleton
   in place of everything else, never today's panel first */
.sb-panel.is-decl-wait > :not(.sb-panel-grip):not(#rpDeclWait) { display: none; }
.sdp-wait { flex: 1 1 auto; display: flex; flex-direction: column; gap: var(--space-4); min-height: 0; padding: var(--space-3); }
.sdp-wait[hidden] { display: none; }
.sdp-wait-tabs { display: flex; gap: var(--space-1); }
.sdp-wait-tabs .skel { flex: 1 1 0; height: var(--control-sm); border-radius: var(--radius-sm); }
.sdp-wait-rows { display: flex; flex-direction: column; gap: var(--space-1); }
.sdp-wait-row { display: flex; align-items: center; gap: var(--space-2); height: 33px; padding: 0 var(--space-2); }
.sdp-wait-ico { flex: none; width: 14px; height: 14px; }
.sdp-wait-line { height: 10px; }

/* the tabs (Primo's: an icon before each label) share the panel's width, however narrow it is dragged: no label clipped */
#panelModes .segmented[data-decl] button { flex: 1 1 0; min-width: 0; gap: var(--space-1); padding: 0 var(--space-1); }
#panelModes .segmented[data-decl] button svg { flex: none; width: 13px; height: 13px; }
#panelModes .segmented[data-decl] button span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

.sdp-host { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.sdp-view { display: flex; flex-direction: column; padding: var(--space-3) var(--space-3) var(--space-6); }
.sdp-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); padding: var(--space-1) var(--space-2) var(--space-3); }
.sdp-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--text-sm); font-weight: var(--fw-semibold); color: var(--text-strong); }
.sdp-count { flex: none; font-size: var(--text-xs); color: var(--text-soft); font-variant-numeric: tabular-nums; }
/* the zones (every page's shared top and bottom, this page's own) parted by a hairline, Primo's outline: no labels */
.sdp-zone { display: flex; flex-direction: column; gap: var(--space-1); }
.sdp-zone + .sdp-zone { margin-top: var(--space-2); padding-top: var(--space-2); border-top: 1px solid var(--border-faint); }
.sdp-host .empty-state { margin-top: var(--space-6); }

/* ---- Outline: Primo's rows (Page_Outline): 33px, a 3px inset, a handle on a page section, a lock on a shared one, the
   name and a small Shared after it, the pencil (and the ⋯) on hover; the row picked filled with the accent's tint and
   edged in the accent ---- */
.sdp-head { padding: var(--space-1) var(--space-2) 13px; }
.sdp-head .sdp-title { font-size: var(--text-sm); font-weight: var(--fw-regular); }
.sdp-head .sdp-count { font-size: var(--text-xs); }

/* ---- How editing works (declaredPanel tipsHTML, the client's): a quiet sunk card over the rows on their first visit,
   then the "?" at the end of the Outline's head (its count beside it) brings it back. No border (the sunk ground parts
   it: one border level), naked icons, the words a step quieter than the rows' ---- */
.sdp-head:has(> .sdp-help) { align-items: center; }
.sdp-head:has(> .sdp-help) > .sdp-count { margin-left: auto; }
.sdp-help { width: var(--control-xs); height: var(--control-xs); margin: calc(-1 * var(--space-1)) calc(-1 * var(--space-1)) calc(-1 * var(--space-1)) calc(-1 * var(--space-1-5)); border-radius: var(--radius-full); font-size: var(--text-xs); font-weight: var(--fw-semibold); line-height: 1; }
.sdp-help[aria-expanded="true"] { background: var(--surface-2); color: var(--text-strong); }
.sdp-help:focus-visible, .sdp-tips-x:focus-visible { outline: var(--focus-outline); outline-offset: var(--focus-offset); }
.sdp-tips { display: flex; flex-direction: column; gap: var(--space-2-5); margin: 0 0 var(--space-3); padding: var(--space-3); border-radius: var(--radius-md); background: var(--surface-sunk); }
.sdp-tips-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.sdp-tips-title { font-size: var(--text-sm); font-weight: var(--fw-semibold); color: var(--text-strong); }
.sdp-tips-x { width: var(--control-xs); height: var(--control-xs); margin: calc(-1 * var(--space-1)) calc(-1 * var(--space-1)) calc(-1 * var(--space-1)) 0; }
.sdp-tips-x svg { width: 14px; height: 14px; }
.sdp-tips-list { display: flex; flex-direction: column; gap: var(--space-2); margin: 0; padding: 0; list-style: none; font-size: var(--text-sm); line-height: var(--leading-snug); color: var(--text-muted); }
.sdp-tips-list li { display: flex; align-items: flex-start; gap: var(--space-2); }
.sdp-tips-list b { font-weight: var(--fw-semibold); color: var(--text-strong); }
.sdp-tips-ico { flex: none; display: inline-flex; margin-top: 2px; color: var(--text-soft); }
.sdp-tips-ico svg { width: 14px; height: 14px; }
/* (the row's own pencil, drawn in the line where it's named) */
.sdp-tips-pen { display: inline-flex; vertical-align: -2px; color: var(--text-strong); }
.sdp-tips-pen svg { width: 13px; height: 13px; }
.sdp-tips-foot { display: flex; align-items: center; gap: var(--space-3); margin-top: var(--space-0-5); }
.sdp-tips-more { font-size: var(--text-sm); font-weight: var(--fw-medium); color: var(--text-strong); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; border-radius: var(--radius-xs); }
.sdp-tips-more:focus-visible { outline: var(--focus-outline); outline-offset: var(--focus-offset); }
@media (hover: hover) and (pointer: fine) {
  .sdp-help:hover { background: var(--nav-hover-bg); color: var(--text-strong); }
  .sdp-tips-more:hover { text-decoration-color: currentColor; }
}
.sdp-rows { position: relative; display: flex; flex-direction: column; gap: var(--space-1); margin: 0; padding: 0; list-style: none; }
.sdp-row-wrap { position: relative; display: flex; align-items: center; gap: 3px; min-height: calc(var(--control-sm) + 1px); padding: 3px; border: 1px solid transparent; border-radius: 5px; }
@media (hover: hover) and (pointer: fine) { .sdp-row-wrap:hover { background: var(--nav-hover-bg); } }
/* the row picked: a soft tint of the accent and a 1px edge of it at a lower strength (never an ink ring that reads as focus) */
.sdp-row-wrap.is-selected { background: var(--surface-2); }
.sdp-grip, .sdp-lock, .sdp-gutter { flex: none; display: inline-flex; align-items: center; justify-content: center; width: var(--control-xs); height: var(--control-xs); color: var(--text-soft); }
.sdp-lock svg { width: 13px; height: 13px; }
.sdp-lock { color: var(--text-placeholder); }
.sdp-grip svg { width: 14px; height: 14px; }
.sdp-grip { cursor: grab; border-radius: var(--radius-xs); touch-action: none; }
@media (hover: hover) and (pointer: fine) { .sdp-grip:hover { color: var(--text-strong); } }
.sdp-row { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: var(--space-2); padding: var(--space-1-5) var(--space-1); border: 0; border-radius: var(--radius-xs); background: none; font: inherit; font-size: var(--text-sm); font-weight: var(--fw-regular); line-height: 1.5; color: var(--text-strong); text-align: left; cursor: pointer; }
/* the name (what the part is: Hero, Reviews, FAQ) with Shared after it, and under them in grey the part's heading, cut
   short (its whole in the tooltip): a row with a heading is two lines, the rest keep Primo's 33px */
.sdp-row-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.sdp-row-line { display: flex; align-items: center; gap: var(--space-2); min-width: 0; }
.sdp-row-name { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sdp-row-sub { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--text-xs); line-height: var(--leading-snug); color: var(--text-soft); }
.sdp-row.has-sub { padding-top: var(--space-1); padding-bottom: var(--space-1); }
.sdp-row-meta { flex: none; font-size: 11px; color: var(--text-soft); }
.sdp-badge { flex: none; margin-left: auto; font-variant-numeric: tabular-nums; }   /* what the site check found in the part (`magnet dev`) */
/* a hidden section: dimmed, as Primo shows what is off */
.sdp-row-wrap.is-hidden .sdp-row-name, .sdp-row-wrap.is-hidden .sdp-row-sub { color: var(--text-placeholder); }
.sdp-row-hidden, .sdp-row-fixed { flex: none; display: inline-flex; margin-left: auto; color: var(--text-soft); }
.sdp-row-hidden svg, .sdp-row-fixed svg { width: 13px; height: 13px; }
.sdp-row-hidden + .sdp-row-fixed { margin-left: var(--space-1); }
.sdp-row-name.is-unnamed { color: var(--text-soft); }
.sdp-row-wrap .icon-ghost { width: 30px; height: 30px; border-radius: var(--radius-xs); }
.sdp-row-wrap .sdp-edit, .sdp-row-wrap .sdp-more { opacity: 0; pointer-events: none; }
.sdp-row-wrap:focus-within .sdp-edit, .sdp-row-wrap:focus-within .sdp-more,
.sdp-row-wrap.is-selected .sdp-edit, .sdp-row-wrap.is-selected .sdp-more,
.sdp-row-wrap .sdp-more[aria-expanded="true"] { opacity: 1; pointer-events: auto; }
@media (hover: hover) and (pointer: fine) {
  .sdp-row-wrap:hover .sdp-edit, .sdp-row-wrap:hover .sdp-more { opacity: 1; pointer-events: auto; }
  .sdp-row-wrap .icon-ghost:hover { color: var(--text-strong); background: var(--surface-hover); }
}
@media (hover: none) { .sdp-row-wrap .sdp-edit, .sdp-row-wrap .sdp-more { opacity: 1; pointer-events: auto; } }
.sdp-row-wrap .icon-ghost svg { width: 14px; height: 14px; }
.sdp-menu { top: calc(100% + 2px); left: auto; right: 0; min-width: 188px; }
/* the page's own sections, dragged by their handles (the shared sortable list: an Outline row stays a plain row) */
.sdp-rows .sdp-row-wrap.sortable-row { background: none; box-shadow: none; }
.sdp-rows .sdp-row-wrap.sortable-row.is-selected { background: var(--surface-2); }
@media (hover: hover) and (pointer: fine) { .sdp-rows .sdp-row-wrap.sortable-row:hover:not(.is-selected) { background: var(--nav-hover-bg); } }
.sdp-rows .sdp-row-wrap.dragging { opacity: .45; }
.sdp-rows .sdp-row-wrap.dragging > * { visibility: hidden; }
.sdp-rows .sdp-row-wrap.drag-overlay, .sdp-rows .sdp-row-wrap.is-lifted { z-index: var(--z-sticky); background: var(--surface); box-shadow: inset 0 0 0 1px var(--border), var(--shadow-lg); }
.sdp-rows .drop-line { position: absolute; z-index: var(--z-sticky); left: 0; right: 0; height: 2px; margin-top: -3px; border-radius: var(--radius-full); background: var(--text-strong); pointer-events: none; }
.sdp-rows .drop-line[hidden] { display: none; }

/* ---- section fields share one surface; only controls and list rows need edges ---- */
.sde-card { display: flex; flex-direction: column; gap: var(--space-1-5); min-width: 0; }
.sde-flabel { font-size: var(--text-xs); font-weight: var(--fw-medium); color: var(--text-muted); }
.sde-sub { font-size: var(--text-xs); font-weight: var(--fw-medium); color: var(--text-soft); }
.sde-card .input { width: 100%; }
.sde-img-row { display: grid; grid-template-columns: 96px minmax(0, 1fr); column-gap: var(--space-3); row-gap: var(--space-1); min-width: 0; }
.sde-img-row > .sde-flabel { grid-column: 1; grid-row: 1; }
.sde-img-row > .sde-thumb-wrap { grid-column: 1; grid-row: 2 / 5; min-height: 0; }
.sde-img-row:has(.sde-img-inputs > label:only-of-type) > .sde-thumb-wrap { min-height: 96px; }
.sde-img-row .sde-thumb { height: 100%; aspect-ratio: auto; }
/* Image replacement by click or drop; adjustment actions overlay the thumbnail. */
.sde-thumb-wrap { position: relative; flex: none; width: 96px; }
.sde-thumb { position: relative; display: block; width: 96px; aspect-ratio: 1; padding: 0; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-sunk); cursor: pointer; }
.sde-thumb:focus-visible { outline: var(--focus-outline); outline-offset: var(--focus-offset); }
/* (the same cover as a picture's on the page, Primo's: dark, its white mark in the middle) */
.sde-thumb-over { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: var(--overlay-image); color: var(--text-invert); opacity: 0; transition: opacity var(--dur-fast) var(--ease); pointer-events: none; }
.sde-thumb-over svg { width: 22px; height: 22px; }
.sde-thumb:focus-visible .sde-thumb-over, .sde-thumb.is-over .sde-thumb-over { opacity: 1; }
.sde-thumb.is-over .sde-thumb-over, .sde-thumb:active .sde-thumb-over { background: var(--overlay-image-hover); }
@media (hover: hover) and (pointer: fine) { .sde-thumb:hover .sde-thumb-over { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sde-thumb-over { transition: none; } }
.sde-img-tools { position: absolute; top: var(--space-1); right: var(--space-1); z-index: var(--z-popover); }
.sde-img-more, .sde-img-tools > summary { display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; padding: 0; border: 1px solid var(--border-faint); border-radius: var(--radius-sm); background: var(--surface); color: var(--text-strong); box-shadow: var(--shadow-xs); cursor: pointer; list-style: none; }
.sde-img-more svg, .sde-img-tools > summary svg { width: 15px; height: 15px; }
.sde-img-more:focus-visible, .sde-img-tools > summary:focus-visible { outline: var(--focus-outline); outline-offset: var(--focus-offset); }
.sde-img-tools > summary::-webkit-details-marker { display: none; }
.sde-img-menu, .sde-list-img-menu { top: calc(100% + var(--space-1)); left: 0; min-width: 160px; }
.sde-img-menu .filter-opt, .sde-list-img-menu .filter-opt { justify-content: flex-start; text-align: left; }
.sde-img-menu .filter-opt > svg:first-child, .sde-list-img-menu .filter-opt > svg:first-child { flex: none; margin-left: 0; }
.sde-thumb img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.sde-thumb.is-contain { background: var(--logo-well); }   /* (logos are drawn for white: the well stays white in the dark theme) */
.sde-thumb.is-contain img { object-fit: contain; padding: var(--space-2); }
.sde-thumb-empty { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: var(--text-soft); }
.sde-dims { position: absolute; right: 0; bottom: 0; z-index: 1; padding: 2px var(--space-1); border-top-left-radius: var(--radius-xs); background: var(--overlay-dark); color: var(--text-invert); font-size: var(--text-micro); font-variant-numeric: tabular-nums; }
.sde-dims[hidden] { display: none; }
.sde-img-inputs { display: contents; }
.sde-img-inputs > * { grid-column: 2; min-width: 0; }
@media (hover: hover) and (pointer: fine) { .sde-img-more:hover, .sde-img-tools > summary:hover { background: var(--nav-hover-bg); } }

/* ---- the section editor: the shared Modal at full screen, Primo's bar, cards beside a live preview ---- */
.sde { display: flex; flex-direction: column; width: 100%; height: 100%; min-height: 0; background: var(--surface); }
.sde-bar { flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--space-3); min-height: var(--shell-toolbar-height); padding: 0 var(--space-4); border-bottom: 1px solid var(--border-faint); }
.sde-close { justify-self: start; }
.sde-close svg { width: 16px; height: 16px; }
.sde-title { display: flex; align-items: baseline; gap: var(--space-1-5); min-width: 0; margin: 0; font-size: var(--text-md); font-weight: var(--fw-medium); color: var(--text-strong); }
.sde-title > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sde-title svg { flex: none; width: 15px; height: 15px; color: var(--text-soft); }
.sde-title small { font-size: var(--text-md); font-weight: var(--fw-regular); color: var(--text-soft); white-space: nowrap; }   /* "on Home" */
/* short of room (a phone), "on Home" gives way before the section's name does: it shrinks first, cut with an ellipsis */
.sde-title > small:not(.sde-title-tag) { flex: 0 1000 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sde-title > span { flex: 0 1 auto; min-width: 0; }
/* a tag (Auto) as a small grey pill, centred on the line's letters rather than sitting on its baseline */
.sde-title small.sde-title-tag { align-self: center; margin-left: var(--space-1); padding: 0 7px; border-radius: var(--radius-full); background: var(--surface-2); font-size: var(--text-xs); line-height: 20px; color: var(--text-muted); }
.sde-acts { justify-self: end; display: flex; align-items: center; gap: var(--space-3); }
.sde-state { font-size: var(--text-xs); color: var(--text-soft); white-space: nowrap; }
.sde-main { flex: 1 1 auto; min-height: 0; min-width: 0; display: grid; grid-template-columns: minmax(0, var(--sde-pane, 36%)) 8px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
.sde-main.is-stacked { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, var(--sde-stack-pane, 50%)) 8px minmax(0, 1fr); }
.sde-fields { min-width: 0; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: var(--space-5); padding: var(--space-6); background: var(--surface); }
.sde-splitter { position: relative; display: flex; align-items: center; justify-content: center; cursor: col-resize; touch-action: none; background: var(--surface-sunk); border-inline: 1px solid var(--border-faint); }
.sde-splitter > span { width: 2px; height: var(--space-8); border-radius: var(--radius-full); background: var(--border-strong); }
.sde-main.is-stacked .sde-splitter { cursor: row-resize; border-inline: 0; border-block: 1px solid var(--border-faint); }
.sde-main.is-stacked .sde-splitter > span { width: var(--space-8); height: 2px; }
.sde-splitter:focus-visible { outline: var(--focus-outline); outline-offset: -2px; z-index: 1; }
.sde-main.is-resizing { user-select: none; cursor: col-resize; }
.sde-main.is-resizing.is-stacked { cursor: row-resize; }
.sde-main.is-resizing iframe { pointer-events: none; }
@media (hover: hover) and (pointer: fine) { .sde-splitter:hover > span, .sde-main.is-resizing .sde-splitter > span { background: var(--text-soft); } }
.sde-banner { display: flex; align-items: center; gap: var(--space-2); margin: 0; padding: var(--space-2-5) var(--space-3); border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--border-faint); font-size: var(--text-sm); color: var(--text-muted); }
.sde-banner svg { flex: none; width: 14px; height: 14px; color: var(--text-soft); }
.sde-banner--act { justify-content: space-between; }
.sde-part { margin: var(--space-2) var(--space-1) 0; font-size: var(--text-sm); font-weight: var(--fw-semibold); color: var(--text-strong); }
.sde-part small { font-weight: var(--fw-regular); color: var(--text-soft); }
.sde-field { display: flex; flex-direction: column; gap: var(--space-1-5); min-width: 0; }
.sde-card-title { margin: 0; font-size: var(--text-sm); font-weight: var(--fw-semibold); color: var(--text-strong); }
.sde-card-title small { font-weight: var(--fw-regular); color: var(--text-soft); font-variant-numeric: tabular-nums; }
.sde-card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
/* a box of words is as tall as its words (fieldCards fitBox writes its height): one line is a field's height */
textarea.input.sde-text { min-height: var(--control-md); padding: var(--space-2) 10px; resize: none; overflow: hidden; line-height: var(--leading-normal); }
.sde-text[aria-invalid="true"] { border-color: var(--danger-300); }
.sde-err[hidden] { display: none; }
.sde-quiet { margin: 0; font-size: var(--text-sm); color: var(--text-soft); }
.sde-note { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); font-size: var(--text-sm); color: var(--text-soft); }
.sde-field.is-busy, .sde-card.is-busy { opacity: .6; }
/* a set of lines numbered alike (Point 1, Point 2 …): one card, a field each */
.sde-set { gap: var(--space-3); }
.sde-set, .sde-items, .sde-list { padding-top: var(--space-1); }   /* 28 Oct: space, never a rule, between a section's fields and its lists */
/* items numbered alike (a photo, a title and words each) and a list's items: Primo's repeater rows (RepeaterField,
   RepeaterFieldItem): a slim grip bar, the title in medium weight with its chevron right after it, no row boxes or rules
   between them; open, the item's fields under the title, indented to it. A list's header row: its name, a chevron at
   the far right that folds the whole list away. */
.sde-items { gap: var(--space-2); }
.sde-card.is-folded > :not(.sde-card-head) { display: none; }
.sde-fold { flex: none; width: 100%; min-width: 0; min-height: var(--control-lg); padding: var(--space-2) var(--space-3); border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text-strong); font: inherit; text-align: left; cursor: pointer; }
.sde-fold .sde-card-title { min-width: 0; display: flex; align-items: center; gap: var(--space-2); }
.sde-fold .sde-card-title small { display: inline-flex; align-items: center; justify-content: center; min-width: var(--space-5); height: var(--space-5); padding-inline: var(--space-1); border-radius: var(--radius-sm); background: var(--surface-sunk); color: var(--text-soft); font-size: var(--text-xs); }
.sde-fold:focus-visible { outline: var(--focus-outline); outline-offset: var(--focus-offset); }
.sde-fold { background: var(--surface-sunk); border-radius: var(--radius-lg); }   /* 28 Oct: a soft bar, so a folded list reads as one closed thing */
.sde-fold .sde-card-title small { background: var(--surface); }   /* (the count keeps its pill on the bar) */
.sde-fold .sde-card-title small:empty { display: none; }   /* (a group of switches only has no count: no empty pill) */
.sde-fold > svg { flex: none; width: 14px; height: 14px; color: var(--text-soft); transition: transform var(--dur) var(--ease); }
.sde-card-hint { margin-left: auto; font-size: var(--text-xs); font-weight: var(--fw-regular); color: var(--text-soft); white-space: nowrap; }
.sde-card-hint[hidden] { display: none; }
.sde-card-hint:not([hidden]) + svg { margin-left: var(--space-2); }
@media (hover: hover) and (pointer: fine) { .sde-fold:hover { background: var(--nav-hover-bg); } }
.sde-card.is-folded .sde-fold svg { transform: rotate(-90deg); }
@media (prefers-reduced-motion: reduce) { .sde-fold svg { transition: none; } }
.sde-repeat { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.sde-ri { min-width: 0; border-radius: var(--radius-lg); }
.sde-ri.is-open { background: var(--surface-sunk); }   /* 28 Oct (the canvas): no rules between items; the open one a soft block */
.sde-ri-head { display: flex; align-items: center; gap: var(--space-3); width: 100%; min-width: 0; min-height: var(--control-lg); padding: var(--space-2) var(--space-3); border: 0; border-radius: var(--radius-sm); background: none; font: inherit; font-size: var(--text-sm); font-weight: var(--fw-medium); color: var(--text-strong); text-align: left; cursor: pointer; }
.sde-ri-head:focus-visible { outline: var(--focus-outline); outline-offset: var(--focus-offset); }
.sde-ri-head > svg { flex: none; width: 14px; height: 14px; margin-left: auto; color: var(--text-soft); transition: transform var(--dur) var(--ease); }
.sde-ri.is-open .sde-ri-head > svg { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .sde-ri-head svg { transition: none; } }
@media (hover: hover) and (pointer: fine) { .sde-ri-head:hover { background: var(--nav-hover-bg); } }
.sde-ri-title { flex: none; max-width: 60%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: var(--fw-medium); }
.sde-ri-sub { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-soft); }
.sde-ri-thumb { flex: none; display: block; width: 32px; height: 32px; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-sunk); }
.sde-ri-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sde-ri-thumb.is-contain { background: var(--logo-well); }
.sde-ri-thumb.is-contain[data-tone="light"] { background: var(--logo-well-dark); }
.sde-ri-thumb.is-contain img { object-fit: contain; padding: var(--space-1); }
.sde-ri-body { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-1) var(--space-3) var(--space-4); }
.sde-ri-body[hidden] { display: none; }
/* the grip: a slim filled rounded bar (a still one where an item can't move: the rows line up all the same) */
/* the grip: the dotted handle at the far left, always shown (a list reads as one you can reorder before it is hovered) */
.sde-rep-grip { justify-self: center; display: inline-flex; align-items: center; justify-content: center; width: var(--control-xs); height: var(--control-xs); color: var(--text-soft); }
.sde-rep-grip svg { width: 14px; height: 14px; }
.sde-rep-grip[data-drag] { cursor: grab; touch-action: none; }
.sde-rep-grip.is-still { visibility: hidden; }
@media (hover: hover) and (pointer: fine) { .sde-rep-item:hover .sde-rep-grip[data-drag] { color: var(--text-muted); } }
/* a drop-down's choices (fieldCards choicesHTML: the section editor's card and the words panel's Choices): a line of
   words each, × to take one out, Add a choice under them; the prompt's row keeps the ×'s room so the boxes line up */
.sde-choices { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; }
.sde-choice { display: flex; align-items: center; gap: var(--space-1); min-width: 0; }
.sde-choice .input { flex: 1 1 auto; width: auto; min-width: 0; }
.sde-choice-x { flex: none; width: var(--control-sm); height: var(--control-sm); }
.sde-choice-add { align-self: flex-start; gap: var(--space-1-5); }
/* rich text, written in the card */
.sde-rich { display: flex; flex-direction: column; }
.sde-rich-bar { display: flex; gap: 2px; padding: 2px; border: 1px solid var(--border); border-bottom: 0; border-radius: var(--radius-md) var(--radius-md) 0 0; background: var(--surface-sunk); }
.sde-rich-bar .icon-ghost { width: var(--control-sm); height: var(--control-sm); }
.sde-rich-bar .icon-ghost svg { width: 14px; height: 14px; }
@media (hover: hover) and (pointer: fine) { .sde-rich-bar .icon-ghost:hover { background: var(--nav-hover-bg); color: var(--text-strong); } }
.sde-rich-ed { min-height: 140px; padding: var(--space-3); border: 1px solid var(--border); border-radius: 0 0 var(--radius-md) var(--radius-md); background: var(--surface); font-size: var(--text-md); line-height: 1.6; color: var(--text); overflow-wrap: anywhere; }
.sde-rich-ed:focus { outline: none; border-color: var(--border-strong); box-shadow: var(--ring-primary); }
.sde-rich-ed p { margin: 0 0 var(--space-2); }
/* a link in the writing reads as one at once, picked or not, as in a post's body (.rte-ed a): base.css's `a` takes the
   underline off every link, and --primary-text is the writing's own ink in the Ink theme */
.sde-rich-ed a { color: var(--primary-text); text-decoration: underline; text-underline-offset: 2px; }
/* words set in styled runs (wordsLook.js): one flow, each styled run in its own font and colour (--lf, --lc: the site's,
   as the canvas computed them), and Font and Colour above it for the words picked. A colour too close to the box's own
   background to read on it, in either theme (data-low: measured against --surface), gets a thin outline in the box's
   own strongest ink, which stands out from it. */
.sde-look { display: flex; flex-direction: column; }
.sde-look-bar { position: relative; z-index: 1; }
.sde-look-tool { position: relative; }
.sde-look-btn { display: inline-flex; align-items: center; gap: var(--space-1-5); height: var(--control-sm); padding: 0 var(--space-2); border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text-muted); font: inherit; font-size: var(--text-sm); cursor: pointer; }
.sde-look-btn svg { width: 14px; height: 14px; }
.sde-look-btn[aria-expanded="true"] { background: var(--surface-selected); color: var(--text-strong); }
.sde-look-btn:focus-visible, .sde-look-sw:focus-visible { outline: var(--focus-outline); outline-offset: var(--focus-offset); }
@media (hover: hover) and (pointer: fine) { .sde-look-btn:hover { background: var(--nav-hover-bg); color: var(--text-strong); } }
.sde-look-menu { top: calc(100% + var(--space-1)); max-height: 300px; overflow-y: auto; }
.sde-look-menu .filter-opt { justify-content: flex-start; text-align: left; }
.sde-look-fname { font-family: var(--lf, inherit); font-size: var(--text-lg); line-height: 1.3; }
.sde-look-sws { display: grid; grid-template-columns: repeat(6, var(--space-7)); gap: var(--space-1-5); padding: var(--space-2); }
.sde-look-sw { width: var(--space-7); height: var(--space-7); padding: 0; border: 0; border-radius: var(--radius-sm); background: var(--lc); box-shadow: inset 0 0 0 1px var(--border); cursor: pointer; }
.sde-look-sw[aria-checked="true"] { box-shadow: inset 0 0 0 1px var(--border), 0 0 0 2px var(--surface), 0 0 0 3.5px var(--text-strong); }
.sde-look-ed { min-height: var(--control-md); padding: var(--space-2) 10px; border: 1px solid var(--border); border-radius: 0 0 var(--radius-md) var(--radius-md); background: var(--surface); color: var(--text); font-size: var(--text-md); line-height: var(--leading-normal); white-space: pre-wrap; overflow-wrap: anywhere; }
.sde-look.is-bare .sde-look-ed { border-radius: var(--radius-md); }
.sde-look-ed:focus { outline: none; border-color: var(--border-strong); box-shadow: var(--ring-primary); }
.sde-look-ed [data-c], .sde-look-ed [data-n] { font-family: var(--lf, inherit); color: var(--lc, inherit); }
.sde-look-ed [data-low] { text-shadow: 0 0 1px var(--text-strong), 0 0 1px var(--text-strong); }
/* a switch or a choice */
.sde-toggle-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); cursor: pointer; }
/* a picture's focal point: the whole photo, its point marked; a click or the arrow keys move it */
.sde-focal { position: relative; display: block; overflow: hidden; border: 1px solid var(--border-faint); border-radius: var(--radius-md); background: var(--surface-sunk); cursor: crosshair; touch-action: none; }
.sde-focal[hidden], .sde-focal-hint[hidden] { display: none; }
.sde-focal img { display: block; width: 100%; height: auto; max-height: 320px; object-fit: contain; }
.sde-focal:focus-visible { outline: var(--focus-outline); outline-offset: var(--focus-offset); }
.sde-focal-dot { position: absolute; width: var(--space-5); height: var(--space-5); margin: calc(-1 * var(--space-2-5)) 0 0 calc(-1 * var(--space-2-5)); border-radius: var(--radius-full); border: 2px solid var(--surface); box-shadow: 0 0 0 1.5px var(--text-strong), var(--shadow-sm); background: color-mix(in srgb, var(--surface) 30%, transparent); pointer-events: none; }
/* a list in its card, as Primo's repeater (listCards): an item a card that folds open (handle, picture, title, caret, ⋯),
   its fields the editor's own; "+ Add" under the last */
.sde-list-host:empty { display: none; }
.sde-rep-host { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.sde-rep-host.is-saving .sde-rep { cursor: progress; }
.sde-rep { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }   /* no rules between rows (28 Oct, the canvas) */
/* (also a .sortable-row, whose shared look is the leads checklist's: this row's own wins) */
.sde-rep .sde-rep-item { position: relative; display: grid; grid-template-columns: var(--control-xs) minmax(0, 1fr); column-gap: var(--space-1); align-items: center; gap: 0 var(--space-1); padding: 0; border: 0; border-bottom: 0; background: none; box-shadow: none; }
.sde-rep-item.is-hidden .sde-rep-title, .sde-rep-item.is-hidden .sde-rep-sub, .sde-rep-item.is-hidden .sde-rep-thumb { opacity: .5; }
/* the open item: one block, its fields on a quiet fill under its head (no second border), lined up with its title */
.sde-rep .sde-rep-item.is-open { border-radius: var(--radius-lg); border-bottom-color: transparent; background: var(--surface-sunk); }
.sde-rep .sde-rep-item.drag-overlay { background: var(--surface); box-shadow: var(--shadow-md); }
.sde-rep-item.dragging { opacity: .4; }
.sde-rep-head { grid-column: 1 / -1; position: relative; display: grid; grid-template-columns: var(--control-xs) minmax(0, 1fr) auto auto auto; border-radius: var(--radius-lg); column-gap: var(--space-1); align-items: center; min-height: var(--control-md); }
.sde-rep-toggle { display: flex; align-items: center; gap: var(--space-3); width: 100%; min-width: 0; min-height: var(--control-lg); padding: var(--space-2) var(--space-3); border: 0; border-radius: var(--radius-sm); background: none; font: inherit; font-size: var(--text-sm); font-weight: var(--fw-medium); color: var(--text-strong); text-align: left; cursor: pointer; }
.sde-rep-toggle:focus-visible { outline: var(--focus-outline); outline-offset: var(--focus-offset); }
@media (hover: hover) and (pointer: fine) { .sde-rep-item:not(.is-open) > .sde-rep-head:hover { background: var(--nav-hover-bg); } }   /* the whole row, its buttons included (28 Oct) */   /* (an open item is already one filled block: no box inside it) */
.sde-rep-chev { grid-column: 5; display: inline-flex; align-items: center; justify-content: center; width: var(--control-xs); height: var(--control-xs); padding: 0; border: 0; background: none; color: var(--text-soft); cursor: pointer; }
.sde-rep-chev svg { width: 14px; height: 14px; transition: transform var(--dur) var(--ease); }
.sde-rep-item.is-open .sde-rep-chev svg { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .sde-rep-chev svg { transition: none; } }
.sde-rep-title { flex: none; max-width: 60%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* its next words, muted after the title ("10+  Years in business"), so a closed row says what it is */
.sde-rep-sub { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-soft); }
.sde-rep-newtitle { grid-column: 2; padding: 0 var(--space-1-5); font-size: var(--text-sm); font-weight: var(--fw-medium); color: var(--text-strong); }
.sde-rep-thumb { flex: none; display: block; width: 32px; height: 32px; overflow: hidden; border-radius: var(--radius-sm); background: var(--surface-sunk); }
.sde-rep-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sde-rep-thumb.is-contain { background: var(--logo-well); }
.sde-rep-thumb.is-contain[data-tone="light"] { background: var(--logo-well-dark); }
.sde-rep-thumb.is-contain img { object-fit: contain; padding: 2px; }
/* the eye (hide on the site) and the trash at the far right, muted, shown on hover or focus (always, on touch); a
   hidden item keeps its crossed eye, so its state shows on the closed row */
.sde-rep-eye { grid-column: 3; color: var(--text-soft); }
.sde-rep-trash { grid-column: 4; color: var(--text-soft); }
.sde-rep-eye, .sde-rep-trash { width: var(--control-xs); height: var(--control-xs); }
.sde-rep-eye svg, .sde-rep-trash svg { width: 14px; height: 14px; }
@media (hover: hover) and (pointer: fine) {
  .sde-rep-eye:not(.is-on), .sde-rep-trash { opacity: 0; }
  .sde-rep-item:hover :is(.sde-rep-eye, .sde-rep-trash), .sde-rep-item:focus-within :is(.sde-rep-eye, .sde-rep-trash) { opacity: 1; }
  .sde-rep-eye:hover { color: var(--text-strong); }
  .sde-rep-trash:hover { color: var(--danger-600); }
}
.sde-rep-body { grid-column: 2 / -1; display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-1) var(--space-3) var(--space-4); }
.sde-rep-actions { display: flex; gap: var(--space-2); }
/* a list item's picture: the picture (a click or a drop replaces it), Replace and its size beside it, its description under */
.sde-rep-photo { gap: var(--space-2); }
.sde-rep-photo-row { display: flex; align-items: center; gap: var(--space-3); min-width: 0; }
.sde-rep-photo .sde-thumb { width: 64px; flex: none; }
.sde-rep-photo-side { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-1-5); min-width: 0; }
.sde-rep-photo-side .btn svg { width: 14px; height: 14px; }
.sde-rep-photo-meta { font-size: var(--text-xs); color: var(--text-soft); }
.sde-rep-photo > label.sde-flabel { margin-top: var(--space-2); }   /* (its description: a step below the picture) */
.sde-flabel-hint { font-weight: var(--fw-regular); color: var(--text-soft); }
/* "+ Add review" (Primo's "Create item"): full width, a quiet fill, its words centred */
.sde-rep-add { display: flex; align-items: center; justify-content: center; gap: var(--space-1-5); width: 100%; min-height: var(--control-md); margin: var(--space-1) 0 0; padding: 0 var(--space-3); border: 1px dashed var(--border); border-radius: var(--radius-lg); background: none; font: inherit; font-size: var(--text-sm); font-weight: var(--fw-medium); color: var(--text-muted); cursor: pointer; }
.sde-rep-add svg { width: 14px; height: 14px; }
.sde-rep-add:focus-visible { outline: var(--focus-outline); outline-offset: var(--focus-offset); }
@media (hover: hover) and (pointer: fine) { button.sde-rep-add:hover { background: var(--nav-hover-bg); color: var(--text-strong); } }
.sde-rep-add.is-busy { cursor: default; }
.sde-list-rows { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--space-0-5); font-size: var(--text-sm); color: var(--text-muted); }
.sde-list-rows li { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* the preview: the section alone, as the site draws it */
.sde-preview { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--surface-sunk); container: sde-preview / inline-size; }
/* the frame fills the window; one cut to a short section (sectionPreview frameHeight, its height inline) stays at the
   window's top, the window's own grey under it, so the section never moves as its words wrap */
.sde-stage { position: relative; flex: 1 1 auto; min-width: 0; min-height: 0; margin: var(--space-4); overflow: hidden; }
.sde-frame { position: relative; box-sizing: content-box; height: 100%; max-width: 100%; margin-inline: auto; overflow: hidden; border-radius: var(--radius-md); background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); }
.sde-frame iframe { display: block; width: var(--sde-viewport-w, 100%); height: var(--sde-viewport-h, 100%); max-width: none; border: 0; opacity: 0; transform-origin: top left; transform: scale(var(--sde-scale, 1)); }
.sde-frame.is-ready iframe { opacity: 1; }
.sde-frame-wait { position: absolute; inset: var(--space-4); border-radius: var(--radius-md); }
.sde-frame.is-ready .sde-frame-wait { display: none; }
.sde-preview-bar { flex: none; display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2); min-height: var(--space-12); padding: var(--space-2) var(--space-3); border-top: 1px solid var(--border-faint); background: var(--surface); color: var(--text-muted); font-size: var(--text-xs); }
/* 28 Oct (the canvas): the preview's controls sit above it, the frame under them on the soft grey */
.sde-preview-bar { order: -1; border-top: 0; border-bottom: 1px solid var(--border-faint); }
/* the preview's width (28 Oct, ElevenLabs' small fields): one bordered box holding the screen icon, the number and "px",
   the number itself borderless; the box takes the focus ring when the number is typed into */
.sde-preview-width { display: inline-flex; align-items: center; gap: var(--space-1-5); height: var(--control-sm); padding: 0 var(--space-2-5); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); color: var(--text-soft); font-variant-numeric: tabular-nums; cursor: text; }
.sde-preview-width:focus-within { border-color: var(--border-strong); box-shadow: var(--ring-primary); }
.sde-preview-width > svg { width: 15px; height: 15px; color: var(--text-soft); }
.sde-preview-width input { width: 4.5ch; min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--text-strong); font: inherit; font-variant-numeric: tabular-nums; text-align: right; outline: none; appearance: textfield; }
.sde-preview-width input::-webkit-inner-spin-button, .sde-preview-width input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.sde-preview-width input:focus { background: transparent; }
.sde-preview-scale { margin-left: var(--space-1); color: var(--text-soft); }
.sde-width-mode { margin-inline: auto; font-size: var(--text-xs); white-space: nowrap; }
.sde-preview-actions { display: flex; align-items: center; gap: var(--space-1); margin-left: auto; }
.sde-preview-actions .icon-ghost { width: var(--space-8); height: var(--space-8); }
.sde-preview-actions svg { width: 16px; height: 16px; }
.sde-preview-actions [aria-pressed="true"] { background: var(--surface-sunk); color: var(--text-strong); box-shadow: inset 0 0 0 1px var(--border); }
.sde-layout-stack svg { transform: rotate(90deg); }
/* the client's preview size (sectionEditor: Desktop, Tablet, Phone) in place of the agency's width, Dynamic width and
   layout, which stay in the markup out of sight for the preview's own wiring */
.sde-preview-bar > [hidden], .sde-preview-actions > [hidden] { display: none; }
.sde-devices { flex: none; }
.sde-devices button { height: calc(var(--control-sm) - 4px); padding: 0 var(--space-2-5); font-size: var(--text-xs); }
.sde-devices button svg { width: 14px; height: 14px; }
.sde-devices button:focus-visible { outline: var(--focus-outline); outline-offset: var(--focus-offset); }
/* the client's photo: replaced from the computer (the picture itself, or its menu), never by typing its address; the
   picture keeps its square beside the description */
.sde.is-client .sde-img-inputs > label.sde-sub[for$="-src"], .sde.is-client .sde-img-inputs > [data-sde-src], .sde.is-client .sde-img-inputs > [data-sde-src] + .field-check { display: none; }
.sde.is-client .sde-img-row > .sde-thumb-wrap { min-height: 96px; }
@container sde-preview (max-width: 440px) {
  .sde-width-mode { padding-inline: var(--space-2); }
  .sde-width-mode > svg, .sde-preview-width > svg, .sde-preview-scale { display: none; }
  .sde-preview-actions { gap: 0; }
}
@media (max-width: 900px) {
  .sde-fields { padding: var(--space-4); }
  .sde-state { display: none; }
}
/* a phone: the close button and the actions keep their room and the title takes the rest (the centred middle column
   would leave it next to none) */
@media (max-width: 720px) {
  .sde-bar { grid-template-columns: auto minmax(0, 1fr) auto; }
}

.sde-list-wait { display: flex; align-items: center; gap: var(--space-2); margin: 0; }
.sde-thumb.is-contain[data-tone="light"] { background: var(--logo-well-dark); }   /* (a white-on-transparent logo: logoTone) */
.sde-thumb-empty svg { width: 20px; height: 20px; }

/* ---- Pages, as Primo's toolbar has them (siteBuilderCore pagesChrome): the page switcher opens the page list in a dialog
   and says the page open (no "Site / Page" crumb in the middle of the bar); a site that declares nothing keeps the
   dropdown ---- */
.sb-pages-word { display: none; }
/* the dialog: a line, then the site's pages, the one open marked */
.sdp-pages { display: flex; flex-direction: column; gap: var(--space-3); }
.sdp-pages-sub { margin: 0; font-size: var(--text-sm); color: var(--text-soft); }
.sdp-pages .sdp-pages-list { position: static; width: 100%; max-width: none; min-width: 0; max-height: min(60vh, 520px); overflow-y: auto; box-shadow: none; }
.sdp-pages .sdp-pages-list .filter-opt { justify-content: space-between; width: 100%; }
/* (8 Nov, owner, Primo's list as the size): rows a step taller with a little air between them, and the page open filled
   as a selected section is in the Outline (.sdp-row-wrap.is-selected); a page with pages under it fills its whole line,
   the arrow and count with it */
.sdp-pages .sdp-pages-list, .sdp-pages .sb-pg-tree, .sdp-pages .sb-pg-kids { display: flex; flex-direction: column; gap: var(--space-0-5); }
.sdp-pages .sdp-pages-list .filter-opt { height: var(--control-md); }
.sdp-pages .sdp-pages-list .filter-opt.is-active { background: var(--surface-2); }
.sdp-pages .sb-pg-head, .sdp-pages .sb-pg-leaf.has-count { border-radius: var(--radius-sm); }
.sdp-pages .sb-pg-head:has(> .filter-opt.is-active), .sdp-pages .sb-pg-leaf.has-count:has(> .filter-opt.is-active) { background: var(--surface-2); }
.sdp-pages .sb-pg-head > .filter-opt.is-active, .sdp-pages .sb-pg-leaf.has-count > .filter-opt.is-active { background: transparent; }
.modal-title .sdp-count { margin-left: var(--space-1-5); font-weight: var(--fw-regular); }
/* a field the page changed while the editor was open: its newer value, and which to keep */
.sde-clash { display: flex; flex-direction: column; gap: var(--space-1-5); }
.sde-clash .field-msg { margin: 0; }
.sde-clash-acts { display: flex; gap: var(--space-1-5); }
/* a preview that couldn't load (or none here): said plainly where it would be, with Try again; the changes save anyway */
.sde-frame-fail { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-3); padding: var(--space-6); text-align: center; font-size: var(--text-sm); color: var(--text-soft); background: var(--surface); }
.sde-frame-fail[hidden] { display: none; }
.sde-frame-fail p { margin: 0; }
.sde-frame.is-stuck .sde-frame-wait, .sde-frame.is-stuck iframe { display: none; }
/* Save's shortcut, as Primo shows it */
/* Save's shortcut: one step from its word (the button's own gap, a little tighter) and on its line: a size down, its
   own box centred so the ⌘ never rides high */
.btn:has(> .sde-kbd) { gap: var(--space-1-5); }
.sde-kbd { display: inline-flex; align-items: center; height: 1em; margin: 0; font: inherit; font-size: var(--text-sm); line-height: 1; letter-spacing: 0.02em; opacity: .65; }
/* (a touch screen, or a phone's bar short of room: no ⌘S beside Save) */
@media (hover: none) and (pointer: coarse), (max-width: 720px) {
  .sde-kbd { display: none; }
}

/* the gear's Lists sheet: the Site panel's lists and held changes alone (its tips, brand and format stay behind) */
.sb-lists-sheet #rpSite > [data-sp="tips"], .sb-lists-sheet #rpSite > [data-sp="brand"], .sb-lists-sheet #rpSite > .sb-live-rows { display: none; }
.sb-menu-count { margin-left: auto; }
