/* Shared menu finish, loaded last. Only the audited HTML UI inventory is
   decorated. Drawing/report styles and engineering colour tokens are untouched.
   Each menu retains its existing layout, sticky regions and scroll ownership. */
:root {
  --menu-font: var(--font-ui, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif);
  --menu-ink: #182333;
  --menu-muted: #5c6b7e;
  --menu-surface: #ffffff;
  --menu-subtle: #f5f7fb;
  --menu-hover: #edf2f8;
  --menu-hover-border: #8baede;
  --menu-border: #d8e1ec;
  --menu-border-strong: #b9c8da;
  --menu-accent: #075fc4;
  --menu-primary: #0968d5;
  --menu-primary-hover: #0759b8;
  --menu-selected: #eaf2ff;
  --menu-selected-border: #a5c7f5;
  --menu-selected-hover: #dceaff;
  --menu-danger: #b4232c;
  --menu-danger-soft: #fff1f2;
  --menu-danger-border: #edb5bc;
  --menu-danger-hover: #ffe3e5;
  --menu-success: #197342;
  --menu-success-soft: #edf9f1;
  --menu-success-border: #a3d5b7;
  --menu-success-hover: #d9f2e3;
  --menu-radius: 14px;
  --menu-card-radius: 10px;
  --menu-control-radius: 8px;
  --menu-shadow: 0 12px 40px rgb(24 35 51 / 12%), 0 2px 8px rgb(24 35 51 / 5%);
}
html[data-theme="dark"] {
  --menu-ink: #eff0f2;
  --menu-muted: #b5bac4;
  --menu-surface: #222428;
  --menu-subtle: #2a2c31;
  --menu-hover: #34373d;
  --menu-hover-border: #809dc3;
  --menu-border: #41444c;
  --menu-border-strong: #606773;
  --menu-accent: #99c6ff;
  --menu-selected: #253a55;
  --menu-selected-border: #587fae;
  --menu-selected-hover: #304967;
  --menu-danger: #ffabb2;
  --menu-danger-soft: #42292f;
  --menu-danger-border: #995660;
  --menu-danger-hover: #57333b;
  --menu-success: #8bddad;
  --menu-success-soft: #253d30;
  --menu-success-border: #508363;
  --menu-success-hover: #314e3d;
  --menu-shadow: 0 12px 40px rgb(0 0 0 / 28%), 0 2px 8px rgb(0 0 0 / 16%);
}

/* Share the app's font family and palette, but retain each component's type
   scale and weight. Compact drawing controls are not full-size form fields. */
html [data-menu-ui] { font-family: var(--menu-font) !important; font-weight: 500; color: var(--menu-ink); --glass-blur: none; }
html [data-menu-ui="surface"] {
  background: var(--menu-surface) !important; border: 1px solid var(--menu-border) !important;
  border-radius: var(--menu-radius) !important; box-shadow: var(--menu-shadow) !important;
  backdrop-filter: none !important; -webkit-backdrop-filter: none !important; overscroll-behavior: contain;
}
html [data-menu-ui="rail"] {
  background: var(--menu-surface) !important; border-color: var(--menu-border) !important;
  border-radius: var(--menu-card-radius); box-shadow: 0 2px 8px rgb(0 0 0 / 4%) !important;
  backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
}
/* Product readers cover catalogue cards. Legacy model-finder glass gradients
   must not make those cards readable through the foreground content. Keep the
   outside overlay dimmed; only the reader and its model surfaces are opaque. */
html .product-library-popover .product-library-body.detail-open > .product-detail-panel,
html .dashboard-product-mail-layout > .dashboard-product-mail-reader,
html .product-finder-compare-overlay > .product-finder-compare-sheet {
  background: var(--menu-surface) !important;
  backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
}
html :is(.product-detail-panel, .dashboard-product-mail-reader) :is(
  .product-finder-detail-head, .dashboard-product-mail-reader-head,
  .product-detail-tab-panel, .radiator-model-finder, .radiator-model-info
) {
  background: var(--menu-surface) !important;
  backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
}
html :is(.product-detail-panel, .dashboard-product-mail-reader) .radiator-model-results > button {
  height: auto !important; min-height: 44px;
  background: var(--menu-surface) !important;
}
html :is(.product-detail-panel, .dashboard-product-mail-reader) .radiator-model-results > button:is(:hover, .active) {
  background: var(--menu-selected) !important;
}
/* A native select cannot grow with wrapped option text. Keep its selected value
   on one line, and expose the complete specification in a wrapping description. */
html :is(.schematic-plant-equipment-model, .plant-room-equipment-model-control) > select {
  box-sizing: border-box; width: 100%; min-width: 0; max-width: 100%;
  appearance: auto !important;
  white-space: nowrap !important; overflow: hidden; text-overflow: ellipsis;
  padding-right: 34px !important;
}
html .plant-equipment-model-summary {
  display: block; min-width: 0; max-width: 100%;
  white-space: normal; overflow-wrap: anywhere;
  color: var(--menu-muted); font: 500 11px/1.45 var(--menu-font);
}
html [data-menu-ui="surface"].tile-opening { animation-name: menuSurfaceIn; will-change: transform, opacity; }
html [data-menu-ui="surface"].tile-closing { animation-name: menuSurfaceOut; will-change: transform, opacity; }
/* Adapt existing specialist palettes to the same tokens, including their
   footers and inset cards. Keep pass/fail and engineering palettes intact. */
html [data-menu-ui].commissioning-quick-dialog { --cq-bg: var(--menu-surface); --cq-panel: var(--menu-subtle); --cq-text: var(--menu-ink); --cq-muted: var(--menu-muted); --cq-border: var(--menu-border); }
html [data-menu-ui].procurement-drawer { --po-bg: var(--menu-surface); --po-subtle: var(--menu-subtle); --po-muted: var(--menu-muted); --po-line: var(--menu-border); }
html :is(.thermal-workbench, .thermal-launcher, .thermal-inline-controls, .thermal-setup-summary) { --tt-bg: var(--menu-surface); --tt-ink: var(--menu-ink); --tt-muted: var(--menu-muted); --tt-line: var(--menu-border); font-family: var(--menu-font); }
html [data-menu-ui].coordination-panel { --coord-text: var(--menu-ink); --coord-muted: var(--menu-muted); }
html [data-menu-ui] :is(h1, h2, h3, h4, h5, h6, p, small, strong, b, label, legend, summary, button, input, select, textarea, th, td, li, a, dt, dd) { font-family: var(--menu-font) !important; }
html [data-menu-ui] :is(p, label, legend, summary, th, td, li, dt, dd) { overflow-wrap: break-word; }
html [data-menu-ui] small { color: var(--menu-muted); }
html [data-menu-ui] :is(h1, h2, h3, h4, h5, h6) { color: var(--menu-ink); }
/* Tool previews are hover feedback too. Their old light tooltip text/arrow
   palette must follow the decorated surface in dark mode; demo SVGs keep
   their own drawing and service colours. */
html .tool-preview-popover[data-menu-ui] .tool-preview-copy strong { color: var(--menu-ink); }
html .tool-preview-popover[data-menu-ui] .tool-preview-copy span { color: var(--menu-muted); }
html .tool-preview-popover[data-menu-ui]::before { background: var(--menu-surface); border-color: var(--menu-border); }

/* Shared heading hierarchy without replacing sticky/flex/grid behaviour. */
html [data-menu-ui] :is(.project-settings-head, .export-popover-head, .product-library-head,
  .account-menu-head, .history-popover-head, .team-activity-popover-head, .share-popover-head,
  .floor-plan-head, .panel-head, .thermal-workbench > header, .rz-header,
  .workspace-assistant-head, .my-day-designer-comments-panel > header, .commissioning-quick-head,
  .coordination-panel__header, .programme-task-drawer-head, .programme-settings-head) {
  background: var(--menu-surface) !important; border-color: var(--menu-border) !important;
  color: var(--menu-ink); gap: 12px; box-shadow: none !important;
}
html [data-menu-ui] :is(.project-settings-head, .export-popover-head, .account-menu-head, .product-library-head, .history-popover-head, .share-popover-head, .panel-head) strong {
  color: var(--menu-ink); font-size: 16px !important; font-weight: 850 !important; line-height: 1.3; text-transform: none !important;
}
html [data-menu-ui] :is(.project-settings-head, .export-popover-head, .account-menu-head, .product-library-head, .history-popover-head, .share-popover-head) > div > span {
  color: var(--menu-muted) !important; font-size: 12px !important; font-weight: 650 !important; line-height: 1.45;
}
html [data-menu-ui] :is(.plant-room-menu-section-head > span, .pipe-panel-menu-section-head > span,
  .team-activity-kicker, .rz-eyebrow, .coordination-panel__eyebrow, .thermal-workbench-eyebrow, .workspace-assistant-eyebrow) {
  color: var(--menu-muted) !important; font-size: 11px !important; font-weight: 600 !important;
  line-height: 1.4; letter-spacing: .045em !important; text-transform: uppercase;
}

/* Controls retain native interaction semantics, including switch tracks and
   swatches. Preserve their layout and scroll ownership. */
html [data-menu-ui] button:not([role="switch"]):not(.colour-swatch):not(.color-swatch) {
  border-radius: var(--menu-control-radius) !important; box-shadow: none !important; text-shadow: none !important;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}
/* A minimum for plain controls, not a replacement for taller product cards or
   multi-line tool tiles. Their established intrinsic dimensions take priority. */
html [data-menu-ui] :where(button:not([role="switch"]):not(.colour-swatch):not(.color-swatch):not(.tool-btn)) { min-height: 32px; padding: 7px 11px; }
/* Mini actions used to have a fixed 30px height. Let their box grow when a
   label wraps, including at larger browser text sizes. Icon controls retain
   their own dimensions. */
html [data-menu-ui] :is(.primary-mini, .secondary-mini, .settings-mini-btn):not(.colour-swatch):not(.color-swatch) {
  height: auto; min-height: 32px; min-width: 0; max-width: 100%;
  padding: 7px 10px; line-height: 1.3; white-space: normal; overflow-wrap: break-word;
}
html [data-menu-ui] button:not(:disabled):hover { transform: none; }
html [data-menu-ui] button:disabled { cursor: not-allowed; }
html [data-menu-ui] :is(button, a, input, select, textarea, summary):focus-visible { outline: 2px solid var(--menu-accent) !important; outline-offset: 2px; box-shadow: none !important; }
html [data-menu-ui] button:not([class*="primary"]):not([class*="danger"]):not(.active):not(.selected):not(.is-selected):not(.is-filtered):not([aria-expanded="true"]):not([aria-selected="true"]):not([aria-pressed="true"]):not([class*="accept"]):not([class*="decline"]):not([class*="success"]):not([type="submit"]):not([role="switch"]):not(.colour-swatch):not(.color-swatch) {
  color: var(--menu-ink); background: var(--menu-surface); border-color: var(--menu-border-strong);
}
/* A hover must survive the legacy component cascade without washing out an
   active navigation state. Semantic actions and colour swatches stay separate;
   no transform/size changes, so feedback never shifts the hit target. */
html [data-menu-ui] button:where(:not(:disabled, [aria-disabled="true"], [class*="primary"], [class*="danger"], [class*="accept"], [class*="decline"], [class*="success"], [type="submit"], [role="switch"], .colour-swatch, .color-swatch, .secondary-mini.active)):hover {
  background: var(--menu-hover) !important; border-color: var(--menu-hover-border) !important;
}
html [data-menu-ui] button:where(:not(:disabled, [aria-disabled="true"])):hover {
  --menu-selection-background: var(--menu-selected-hover);
  --menu-selection-border: var(--menu-accent);
}
html [data-menu-ui] button:where(:disabled, [aria-disabled="true"]) { transform: none !important; cursor: not-allowed; }
html [data-menu-ui] button:where(:disabled, [aria-disabled="true"]):where(:not([class*="primary"], [class*="danger"], [class*="accept"], [class*="decline"], [class*="success"], [type="submit"], [role="switch"], .colour-swatch, .color-swatch)) {
  color: var(--menu-muted) !important; background: var(--menu-subtle) !important; border-color: var(--menu-border) !important;
}
html [data-menu-ui] :is(.primary, .primary-btn, .primary-mini, .rz-primary, .commissioning-quick-save,
  .workspace-assistant-send, .my-day-field-comment-propose, .we-primary, .cad-primary, .rw-primary, .ep-primary,
  [data-design-bulk-action="apply"], .axm-drawing-preview-export, button[type="submit"]):not([class*="danger"]):not([class*="decline"]):not([class*="accept"]):not([class*="success"]) {
  background: var(--menu-primary) !important; border-color: var(--menu-primary) !important; color: #ffffff !important; box-shadow: none !important;
}
html [data-menu-ui] :is(.primary, .primary-btn, .primary-mini, .rz-primary, .commissioning-quick-save, .workspace-assistant-send, .my-day-field-comment-propose, .we-primary, .cad-primary, .rw-primary, .ep-primary, [data-design-bulk-action="apply"], .axm-drawing-preview-export, button[type="submit"]):not([class*="danger"]):not([class*="decline"]):not([class*="accept"]):not([class*="success"]):not(:disabled):not([aria-disabled="true"]):hover { background: var(--menu-primary-hover) !important; border-color: var(--menu-primary-hover) !important; }
html [data-menu-ui] :is(.danger, .danger-btn, .danger-mini, button[class*="decline"]) { color: var(--menu-danger) !important; background: var(--menu-danger-soft) !important; border-color: var(--menu-danger-border) !important; }
html [data-menu-ui] :is(button[class*="accept"], button.success) { color: var(--menu-success) !important; background: var(--menu-success-soft) !important; border-color: var(--menu-success-border) !important; }
html [data-menu-ui] :is(.danger, .danger-btn, .danger-mini, button[class*="decline"]):not(:disabled):not([aria-disabled="true"]):hover { background: var(--menu-danger-hover) !important; border-color: var(--menu-danger) !important; }
html [data-menu-ui] :is(button[class*="accept"], button.success):not(:disabled):not([aria-disabled="true"]):hover { background: var(--menu-success-hover) !important; border-color: var(--menu-success) !important; }

/* Only navigation selections are blue. Semantic status/demand swatches retain
   their own colours; this is deliberately not a global .active rule. */
html :is([data-menu-ui] :is([role="tab"], .project-settings-tabs > button, .account-menu-tabs > button,
  .product-library-category, .product-category-card, .product-subcategory-tabs > button,
  .tool-btn, .schematic-tool-btn, .rz-sidebar > button, .rz-tabs > button,
  .thermal-workbench > nav > button, .thermal-actions > button[data-overlay],
  .layer-item, .layer-row, .floor-row, .canvas-workbench-bar > button, .canvas-selection-tools > button, .canvas-move-launcher, .canvas-search-scope > button,
  .ghost-btn, .ghost-icon, .mode-tab,
  .bottom-tools > button, .view-tools > button, .snap-menu-anchor > button,
  .snap-menu-master, .snap-menu-option,
  .plant-room-product-library-categories > button, .plant-room-product-library-subcategories > button,
  [data-du-mode], [data-we-page], [data-plant-maker-group], [data-cad-action^="tool:"],
  [data-pricing-optimiser-mode], [data-pricing-optimiser-objective], [data-pricing-optimiser-category-expand],
  .block-studio-toolbar > button, .cad-library-tabs > button, .ep-tabs > button, .ep-equipment-list > button),
  .canvas-workbench-bar[data-menu-ui] > button, .modebar[data-menu-ui] > button,
  .thermal-workbench[data-menu-ui] > nav > button):is(.active, .selected, .is-selected, .is-filtered, .menu-open, [aria-expanded="true"], [aria-selected="true"], [aria-pressed="true"]) {
  color: var(--menu-accent) !important; background: var(--menu-selection-background, var(--menu-selected)) !important;
  border-color: var(--menu-selection-border, var(--menu-selected-border)) !important; box-shadow: inset 0 0 0 1px var(--menu-selection-border, var(--menu-selected-border)) !important;
  transform: none !important;
}
/* Keep the persistent filtered indicator even after its popover is closed. */
html .canvas-workbench-bar[data-menu-ui] > button.is-filtered { box-shadow: inset 0 -2px var(--menu-accent) !important; }
html [data-menu-ui] :is(.project-settings-tabs, .account-menu-tabs, .rz-tabs, .thermal-workbench-tabs, .product-library-rail-head) { background: var(--menu-subtle); border-color: var(--menu-border); }

/* Accordion titles are content, not fixed-height icon buttons. Keep longer
   titles and their descriptions inside the hit target at narrow/text-zoomed
   sizes; count badges and disclosure arrows must not squeeze the title out. */
html [data-menu-ui] :is(.collapsible-section-head, .room-type-category-head, .material-category-toggle) {
  height: auto; min-height: 36px; padding: 8px 10px; line-height: 1.4;
  white-space: normal; overflow-wrap: anywhere;
}
html [data-menu-ui] :is(.collapsible-section-head, .room-type-category-head, .material-category-toggle) > :is(span, small):not(.collapse-chevron) { min-width: 0; }
html [data-menu-ui] :is(.project-settings-head, .history-popover-head, .product-library-head, .export-popover-head) > div { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 720px) {
  html [data-menu-ui] :is(.settings-collapsible-section, .methodology-section, .export-section) > .collapsible-section-head,
  html [data-menu-ui] :is(.room-type-category-head, .material-category-toggle) {
    grid-template-columns: minmax(0, 1fr) auto; gap: 3px 10px;
  }
  html [data-menu-ui] :is(.settings-collapsible-section, .methodology-section, .export-section) > .collapsible-section-head > small,
  html [data-menu-ui] :is(.room-type-category-head, .material-category-toggle) > small {
    grid-column: 1; grid-row: 2; white-space: normal;
  }
  html [data-menu-ui] :is(.settings-collapsible-section, .methodology-section, .export-section) > .collapsible-section-head > .collapse-chevron,
  html [data-menu-ui] :is(.room-type-category-head, .material-category-toggle) > .collapse-chevron {
    grid-column: 2; grid-row: 1 / span 2;
  }
}

@media (max-width: 540px) {
  html [data-menu-ui].project-settings-popover .settings-grid { grid-template-columns: minmax(0, 1fr); }
}
html [data-menu-ui] .settings-toggle {
  height: auto; min-height: 34px; max-width: 100%; padding: 7px 8px;
  line-height: 1.4; white-space: normal;
}
html [data-menu-ui] .settings-toggle input { flex: 0 0 auto; }
html [data-menu-ui].project-settings-popover .settings-field :is(input, select):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]) { height: auto; line-height: 1.4; }
html [data-menu-ui].project-settings-popover .input-unit { grid-template-columns: minmax(0, 1fr) auto; }
html [data-menu-ui].project-settings-popover .input-unit > :is(span, small) { white-space: nowrap; }

html [data-menu-ui] :is(input, select, textarea):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="hidden"]) {
  color: var(--menu-ink) !important; background: var(--menu-control-background, var(--menu-surface)) !important;
  border: 1px solid var(--menu-border-strong); border-radius: var(--menu-control-radius) !important;
  box-shadow: none !important; text-shadow: none !important; min-width: 0; max-width: 100%;
}
html [data-menu-ui] :is(input, select):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="hidden"]):not([type="file"]) { min-height: 34px; padding: 7px 10px; }
html [data-menu-ui] textarea { padding: 10px 12px; resize: vertical; }
html [data-menu-ui] :is(input, textarea)::placeholder { color: var(--menu-muted) !important; opacity: 1; }
html [data-menu-ui] :is(input[type="checkbox"], input[type="radio"]) { accent-color: var(--menu-primary); }
html [data-menu-ui] select option { color: var(--menu-ink); background: var(--menu-surface); }
/* Keep native select behaviour and keyboard/type-ahead support. The field
   always receives feedback; option tint is progressive enhancement because
   operating-system popup menus may keep their own highlight treatment. */
html [data-menu-ui] select:not(:disabled):not([aria-disabled="true"]):not([aria-invalid="true"]):is(:hover, :focus-visible) {
  --menu-control-background: var(--menu-selected); border-color: var(--menu-selected-border) !important;
}
html [data-menu-ui] select:not(:disabled):not([aria-disabled="true"]):not([aria-invalid="true"]):focus-visible {
  --menu-control-background: var(--menu-selected-hover); border-color: var(--menu-accent) !important;
}
html [data-menu-ui] select:not(:disabled):not([aria-disabled="true"]) option:not(:disabled):checked {
  color: var(--menu-accent); background: var(--menu-selected);
}
html [data-menu-ui] select:not(:disabled):not([aria-disabled="true"]) option:not(:disabled):hover {
  color: var(--menu-accent); background: var(--menu-selected-hover);
}
/* AI Room Assist uses the same quiet surfaces and compact controls as the
   inspector. Keep checkboxes native: cloud consent is distinct from the
   verification preference, never implied by its selected state. */
html [data-menu-ui] .existing-room-ai-assist { gap: 10px; padding: 2px 0; }
html [data-menu-ui] .existing-room-ai-head { gap: 9px; }
html [data-menu-ui] .manual-room-ai-review-icon {
  flex: 0 0 30px; width: 30px; height: 30px; border-radius: 8px;
  border: 1px solid var(--menu-selected-border); background: var(--menu-selected);
  color: var(--menu-accent); font-size: 11px; font-weight: 700; box-shadow: none;
}
html [data-menu-ui] :is(.existing-room-ai-head, .existing-room-ai-premium-lock, .existing-room-ai-status) strong {
  color: var(--menu-ink); font-size: 12px; font-weight: 650; line-height: 1.4;
}
html [data-menu-ui] :is(.existing-room-ai-head, .existing-room-ai-premium-lock, .existing-room-ai-status) small,
html [data-menu-ui] .existing-room-ai-assist > p {
  color: var(--menu-muted); font-size: 11px; font-weight: 500; line-height: 1.45;
}
html [data-menu-ui] .existing-room-ai-assist > p {
  padding: 7px 9px; border-radius: 7px; background: var(--menu-subtle);
}
html [data-menu-ui] .existing-room-ai-actions {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 108px), 1fr)); gap: 6px; align-items: stretch;
}
html [data-menu-ui] .existing-room-ai-actions > button {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 34px; padding: 7px 8px; font-size: 12px; font-weight: 650; line-height: 1.3;
}
html [data-menu-ui] :is(#analyseExistingRoomWithAi, #analyseAllExistingRoomsWithAi):disabled {
  opacity: 1; color: var(--menu-muted) !important; background: var(--menu-subtle) !important;
  border-color: var(--menu-border) !important;
}
html [data-menu-ui] .existing-room-ai-count {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 5px; background: var(--menu-hover); color: var(--menu-muted);
  font-size: 10px; font-weight: 600; font-variant-numeric: tabular-nums;
}
html [data-menu-ui] .existing-room-ai-options {
  grid-template-columns: minmax(0, 1fr); gap: 0; padding: 2px 0;
  border-block: 1px solid var(--menu-border);
}
html [data-menu-ui] :is(.manual-room-ai-mode, .manual-room-ai-consent) {
  box-sizing: border-box; gap: 9px; min-height: 34px; margin: 0;
  padding: 7px 9px; border: 1px solid var(--menu-border); border-radius: 8px;
  background: var(--menu-surface); box-shadow: none; color: var(--menu-ink);
  transition: background-color 120ms ease, border-color 120ms ease;
}
html [data-menu-ui] .existing-room-ai-options > .manual-room-ai-mode {
  min-height: 36px; border-color: transparent; padding: 7px 4px;
}
html [data-menu-ui] :is(.manual-room-ai-mode, .manual-room-ai-consent) > input {
  flex: 0 0 16px; width: 16px; height: 16px; accent-color: var(--menu-primary);
}
html [data-menu-ui] .existing-room-ai-options > .manual-room-ai-mode > input { order: 2; margin-left: auto; }
html [data-menu-ui] :is(.manual-room-ai-mode, .manual-room-ai-consent) > span {
  display: grid; gap: 3px; min-width: 0; color: var(--menu-ink); font-size: 11px; font-weight: 500; line-height: 1.4;
}
html [data-menu-ui] :is(.manual-room-ai-mode, .manual-room-ai-consent) > span strong {
  color: var(--menu-ink); font-size: 11px; font-weight: 600; line-height: 1.4;
}
html [data-menu-ui] :is(.manual-room-ai-mode, .manual-room-ai-consent) > span small {
  color: var(--menu-muted); font-size: 10px; font-weight: 500; line-height: 1.45;
}
html [data-menu-ui] :is(.manual-room-ai-mode, .manual-room-ai-consent):not(:has(input:disabled)):hover {
  background: var(--menu-hover); border-color: var(--menu-hover-border);
}
html [data-menu-ui] :is(.manual-room-ai-mode, .manual-room-ai-consent):has(input:focus-visible) {
  outline: 2px solid var(--menu-accent); outline-offset: 1px;
}
html [data-menu-ui] .manual-room-ai-mode.disabled { opacity: 1; cursor: not-allowed; }
html [data-menu-ui] .manual-room-ai-mode.disabled > span strong { color: var(--menu-muted); }
html [data-menu-ui] .manual-room-ai-consent { align-items: flex-start; background: var(--menu-subtle); }
html [data-menu-ui] .manual-room-ai-consent > input { margin-top: 1px; }
html [data-menu-ui] .manual-room-ai-consent:has(input:checked) {
  background: var(--menu-selected); border-color: var(--menu-selected-border);
}
html [data-menu-ui] :is(.existing-room-ai-premium-lock, .existing-room-ai-status) {
  border: 1px solid var(--menu-border); border-radius: 8px; background: var(--menu-subtle); padding: 8px;
}
html [data-menu-ui] :is(.existing-room-ai-premium-lock, .existing-room-ai-status) > button { font-size: 11px; font-weight: 600; }
html [data-menu-ui] .existing-room-ai-status.complete { border-color: var(--menu-success-border); background: var(--menu-success-soft); }
html [data-menu-ui] .existing-room-ai-status.complete > strong { color: var(--menu-success); }
html [data-menu-ui] :is(.ai-room-assist-section > .collapsible-section-head > small, .manual-room-ai-premium-badge) {
  border-color: var(--menu-selected-border); background: var(--menu-selected); color: var(--menu-accent);
  font-weight: 650; letter-spacing: .02em;
}
html [data-menu-ui] .manual-room-ai-review {
  border-color: var(--menu-border); background: var(--menu-subtle); box-shadow: none;
}
html [data-menu-ui] .manual-room-ai-review :is(strong, p) { color: var(--menu-ink); }
html [data-menu-ui] .manual-room-ai-review :is(small, .manual-room-ai-empty) { color: var(--menu-muted); }
html [data-menu-ui] .manual-room-ai-review :is(.manual-room-ai-choice, .manual-room-ai-openings) {
  background: var(--menu-surface); border-color: var(--menu-border);
}
html [data-menu-ui] .manual-room-ai-review-footer { border-color: var(--menu-border); }
html [data-menu-ui] .manual-room-ai-review.error { border-color: var(--menu-danger-border); background: var(--menu-danger-soft); }
/* The drawing sidebar is one compact control family. Its headings, floors,
   layer toggles and zone launcher share dimensions; metadata and branded
   artwork retain their secondary treatment. Other panels are unaffected. */
html :is(.left-rail, .tool-palette)[data-menu-ui] { --canvas-control-height: 36px; }
html .left-rail[data-menu-ui] .rail-section { padding: 8px; }
html .left-rail[data-menu-ui] .rail-title { gap: 6px; margin-bottom: 4px; }
html .left-rail[data-menu-ui] .rail-section.is-collapsed > .rail-title { margin-bottom: 0; }
html .left-rail[data-menu-ui] :is(.rail-toggle, .rail-action, .floor-row, .layer-row, .room-zone-launch) {
  box-sizing: border-box; width: 100%; min-width: 0; height: var(--canvas-control-height); min-height: var(--canvas-control-height);
  padding: 2px 8px; font-family: var(--menu-font); font-size: 12px; font-weight: 760;
  line-height: 1.2; text-align: left; white-space: normal;
}
html .left-rail[data-menu-ui] .rail-toggle { width: auto; flex: 1 1 auto; }
html .left-rail[data-menu-ui] .rail-action { width: var(--canvas-control-height); flex: 0 0 var(--canvas-control-height); display: grid; place-items: center; padding: 2px; text-align: center; }
html .left-rail[data-menu-ui] :is(.floor-row, .layer-row) > span:first-child { flex: 1 1 auto; min-width: 0; justify-content: flex-start; }
html .left-rail[data-menu-ui] .floor-row > span > span { flex: 1 1 auto; min-width: 0; font-size: 12px; font-weight: 760; line-height: 1.2; }
html .left-rail[data-menu-ui] .floor-row > strong { flex: none; font-size: 12px; font-weight: 760; }
html .left-rail[data-menu-ui] :is(.floor-row small, .layer-premium-badge) { font-size: 10px; font-weight: 650; line-height: 1.2; }
html .left-rail[data-menu-ui] :is(.floor-row, .layer-row, .room-zone-launch) svg { width: 16px; height: 16px; flex: none; }
/* Zone management is a normal sidebar action. Share the neutral control
   finish and interaction states; the trailing chevron identifies its dialog. */
html .left-rail[data-menu-ui] .room-zone-launch {
  display: grid; grid-template-columns: 16px minmax(0, 1fr) 12px; gap: 8px;
  align-items: center; margin-bottom: 4px; text-align: left;
}
html .left-rail[data-menu-ui] .room-zone-launch-icon {
  display: grid; place-items: center; width: 16px; height: 16px;
  color: currentColor;
}
html .left-rail[data-menu-ui] .room-zone-launch-label { min-width: 0; font: inherit; overflow-wrap: break-word; }
html .left-rail[data-menu-ui] .room-zone-launch-arrow { display: grid; place-items: center; color: var(--menu-muted); }
html .left-rail[data-menu-ui] .room-zone-launch-arrow svg { width: 12px; height: 12px; }
/* The inspector uses the same compact zone action as the navigation rail,
   with a local, immediate assignment control instead of a second large menu. */
html .room-zone-quick-assign {
  margin: 10px 0; padding: 8px; min-width: 0;
  border: 1px solid var(--menu-border); border-radius: var(--menu-card-radius,10px);
  background: var(--menu-subtle); color: var(--menu-ink); font-family: var(--menu-font);
}
html .room-zone-quick-assign .room-zone-inspector-launch {
  display: grid; grid-template-columns: 16px minmax(0,1fr) 12px; gap: 8px;
  align-items: center; width: 100%; min-width: 0; height: auto; min-height: 36px;
  padding: 6px 8px; margin: 0; border: 1px solid var(--menu-border-strong);
  border-radius: var(--menu-control-radius); background: var(--menu-surface); color: var(--menu-ink);
  font-family: var(--menu-font); font-size: 12px; font-weight: 760; line-height: 1.25; text-align: left;
}
html .room-zone-quick-assign .room-zone-launch-icon,
html .room-zone-quick-assign .room-zone-launch-arrow { display: grid; place-items: center; }
html .room-zone-quick-assign .room-zone-launch-icon svg { width: 16px; height: 16px; }
html .room-zone-quick-assign .room-zone-launch-label { min-width: 0; font: inherit; overflow-wrap: break-word; }
html .room-zone-quick-assign .room-zone-launch-arrow { color: var(--menu-muted); }
html .room-zone-quick-assign .room-zone-launch-arrow svg { width: 12px; height: 12px; }
html .room-zone-quick-body { padding: 10px 2px 2px; }
html .room-zone-quick-heading { display: grid; gap: 3px; margin-bottom: 9px; }
html .room-zone-quick-heading strong { font-size: 12px; font-weight: 760; line-height: 1.3; }
html .room-zone-quick-heading small { font-size: 11px; line-height: 1.4; color: var(--menu-muted); overflow-wrap: anywhere; }
html .room-zone-quick-fields { display: grid; grid-template-columns: minmax(0,1fr); gap: 8px; }
html .room-zone-quick-fields label { display: grid; gap: 4px; min-width: 0; font-size: 11px; font-weight: 650; }
html .room-zone-quick-fields select { width: 100%; min-width: 0; font-family: var(--menu-font); font-size: 12px; line-height: 1.3; font-weight: 650; }
html .room-zone-quick-body p { margin: 8px 0 0; font-size: 11px; line-height: 1.45; color: var(--menu-muted); overflow-wrap: anywhere; }
html .room-zone-quick-body .room-zone-quick-status { color: var(--menu-accent); }
/* Keep the floating helpers on the canvas, clear of the inspector dropdowns.
   The width comes from the existing layout, not a new resize/layout observer. */
@media (min-width: 901px) {
  html[data-workspace="floor"]:has(.room-zone-quick-assign) :is(.workspace-assistant-launcher, .my-day-designer-comments:not(.is-open)),
  html[data-workspace="three"]:has(.inspector .room-objects-section) :is(.workspace-assistant-launcher, .my-day-designer-comments:not(.is-open)) {
    right: calc(var(--room-inspector-clearance,280px) + max(12px, env(safe-area-inset-right,0px)));
  }
}
@media (pointer: coarse) {
  html .room-zone-quick-assign .room-zone-inspector-launch { min-height: 44px; }
  html .room-zone-quick-fields select { min-height: 44px; font-size: 16px; }
}
html .left-rail[data-menu-ui] :is(.floor-row + .floor-row, .layer-row + .layer-row) { margin-top: 4px; }
html .left-rail[data-menu-ui] .minimap { height: 104px; }
html .left-rail[data-menu-ui] .mini-zoom { right: 5px; bottom: 5px; gap: 4px; }
html .left-rail[data-menu-ui] .mini-zoom button { width: 28px; height: 28px; min-height: 28px; padding: 0; }

/* Keep the drawing tools as readable text rows, with less empty space. The
   minimum height can grow for unusually long labels rather than clip them. */
html .tool-palette[data-menu-ui]:not(.compact) { padding: 8px; gap: 4px; }
html .tool-palette[data-menu-ui]:not(.compact) .tool-palette-head { min-height: 24px; }
html .tool-palette[data-menu-ui]:not(.compact) .tool-palette-toggle { width: 28px; height: 24px; min-height: 24px; padding: 0; }
html .tool-palette[data-menu-ui]:not(.compact) :is(.tool-group, .tool-slot) { gap: 4px; }
html .tool-palette[data-menu-ui]:not(.compact) .tool-group { padding-top: 2px; }
html .tool-palette[data-menu-ui]:not(.compact) .tool-btn {
  min-height: var(--canvas-control-height); height: auto; padding: 2px 8px; gap: 6px;
  font-size: 12px; font-weight: 760; line-height: 1.2;
}
html .tool-palette[data-menu-ui]:not(.compact) .tool-btn span { min-width: 0; font-size: 12px; font-weight: 760; line-height: 1.2; white-space: normal; }
html .tool-palette[data-menu-ui]:not(.compact) .floor-selection-mode-control { padding: 4px; gap: 4px; }
html .tool-palette[data-menu-ui]:not(.compact) .floor-selection-mode-head small { display: none; }
html .tool-palette[data-menu-ui]:not(.compact) .floor-selection-mode-options .tool-btn { flex-direction: row; gap: 3px; padding: 2px; }
html .tool-palette[data-menu-ui]:not(.compact) .floor-selection-mode-options .tool-btn svg { width: 12px; height: 12px; }

/* Preserve generous tap targets on touch devices without enlarging desktop
   controls. The icon-only collapsed palette also remains accessible. */
@media (pointer: coarse) {
  html :is(.left-rail, .tool-palette)[data-menu-ui] { --canvas-control-height: 44px; }
  html .left-rail[data-menu-ui] .mini-zoom button { width: 44px; height: 44px; min-height: 44px; }
  html .tool-palette[data-menu-ui] :is(.tool-btn, .tool-palette-toggle) { min-height: 44px; }
  html .tool-palette[data-menu-ui]:not(.compact) .tool-palette-toggle { width: 44px; height: 44px; min-height: 44px; }
}
html [data-menu-ui] input[type="file"]::file-selector-button {
  font: 600 12px/1.4 var(--menu-font); padding: 7px 10px; margin-inline-end: 10px;
  color: var(--menu-ink); background: var(--menu-subtle); border: 1px solid var(--menu-border-strong); border-radius: 6px; cursor: pointer;
}

/* Independent workflow tools share the same screen-only menu contract. These
   are audited HTML roots, not a heuristic matching every panel or preview.
   Layout/scroll ownership stays in each tool; drawing colours stay untouched. */
html :is(.design-upgrade-panel, .design-bulk-inspector, .workflow-engineering-review,
  .three-workbench-popover, .schematic-workbench-popover, .plant-room-workbench-popover,
  .cad-workbench-panel, .cad-symbol-dialog, .plant-maker-browser, .rw-inspector, .rw-preview-card,
  .room-tidy-dialog, .project-item-finder, .field-delivery-photo-dialog)[data-menu-ui] {
  --panel: var(--menu-surface); --surface: var(--menu-surface); --surface-solid: var(--menu-surface);
  --surface-alt: var(--menu-subtle); --input-bg: var(--menu-surface);
  --border: var(--menu-border); --line-strong: var(--menu-border); --glass-border: var(--menu-border);
  --menu-line: var(--menu-border); --bulk-border: var(--menu-border);
  --text: var(--menu-ink); --muted: var(--menu-muted); --text-muted: var(--menu-muted);
  --plant-maker-surface: var(--menu-surface);
  font-size: 12px; font-weight: 500; line-height: 1.5; box-sizing: border-box;
}
html :is(.design-upgrade-panel, .design-bulk-inspector, .workflow-engineering-review,
  .three-workbench-popover, .schematic-workbench-popover, .plant-room-workbench-popover,
  .cad-workbench-panel, .cad-symbol-dialog, .plant-maker-browser, .rw-inspector,
  .room-tidy-dialog, .project-item-finder, .field-delivery-photo-dialog)[data-menu-ui] :is(button, input, select, textarea) {
  font-size: 12px; line-height: 1.35; font-weight: 650;
}
html :is(.design-upgrade-panel, .design-bulk-inspector, .workflow-engineering-review,
  .cad-workbench-panel, .cad-symbol-dialog, .plant-maker-browser)[data-menu-ui] :is(p, footer) {
  font-size: 12px; line-height: 1.5; font-weight: 500;
}
html :is(.design-upgrade-panel, .design-bulk-inspector, .workflow-engineering-review,
  .cad-symbol-dialog, .plant-maker-browser)[data-menu-ui] > header {
  gap: 12px; align-items: center; color: var(--menu-ink); border-color: var(--menu-border);
}
html :is(.design-upgrade-panel, .workflow-engineering-review)[data-menu-ui] > header strong,
html .cad-workbench-panel[data-menu-ui] .cad-panel-head > strong,
html .design-bulk-inspector[data-menu-ui] > header h3 {
  font-size: 16px; font-weight: 800; line-height: 1.3; margin: 0;
}
html :is(.cad-symbol-dialog, .plant-maker-browser)[data-menu-ui] > header h2 {
  font-size: 18px; font-weight: 800; line-height: 1.3;
}
html .design-upgrade-panel[data-menu-ui] :is(p, small) { color: var(--menu-muted); }
html .design-upgrade-panel[data-menu-ui] button {
  border: 1px solid var(--menu-border-strong); background: var(--menu-surface); color: var(--menu-ink);
}
html .design-upgrade-panel[data-menu-ui] .row { align-items: stretch; }
html .design-upgrade-panel[data-menu-ui] .preview { color: var(--menu-ink); }
/* The task is visible first; detailed guidance stays available without
   competing with the action or consuming the canvas at every opening. */
html .design-upgrade-panel[data-menu-ui] .design-upgrade-selection { display: grid; gap: 3px; margin: 2px 0 12px; }
html .design-upgrade-panel[data-menu-ui] .design-upgrade-selection > strong { font-size: 13px; font-weight: 750; color: var(--menu-ink); }
html .design-upgrade-panel[data-menu-ui] .design-upgrade-selection > span,
html .design-upgrade-panel[data-menu-ui] .design-upgrade-hint { font-size: 12px; font-weight: 500; line-height: 1.5; color: var(--menu-muted); }
html .design-upgrade-panel[data-menu-ui] .design-upgrade-main-action { width: 100%; }
html .design-upgrade-panel[data-menu-ui] .design-upgrade-hint { margin: 9px 0 14px; }
html .design-upgrade-panel[data-menu-ui] .design-upgrade-help { border-top: 1px solid var(--menu-border); padding-top: 10px; }
html .design-upgrade-panel[data-menu-ui] .design-upgrade-help > summary { cursor: pointer; min-height: 32px; line-height: 1.5; color: var(--menu-ink); font-weight: 650; }
html .design-upgrade-panel[data-menu-ui] .design-upgrade-help p { margin: 7px 0; }
html .design-upgrade-panel[data-menu-ui] .design-upgrade-help dl { display: grid; gap: 8px; margin: 12px 0 0; }
html .design-upgrade-panel[data-menu-ui] .design-upgrade-help dl > div { display: grid; grid-template-columns: 54px minmax(0,1fr); gap: 8px; }
html .design-upgrade-panel[data-menu-ui] .design-upgrade-help dt { color: var(--menu-ink); font-weight: 650; }
html .design-upgrade-panel[data-menu-ui] .design-upgrade-help dd { margin: 0; color: var(--menu-muted); font-weight: 500; }
html .design-upgrade-panel[data-menu-ui] [data-design-upgrade-message]:empty { display: none; }
html .design-upgrade-panel[data-menu-ui] [data-du-delete] {
  color: var(--menu-danger) !important; background: var(--menu-danger-soft) !important;
  border-color: var(--menu-danger-border) !important;
}
html .design-upgrade-panel[data-menu-ui] [data-du-delete]:not(:disabled):hover {
  background: var(--menu-danger-hover) !important; border-color: var(--menu-danger) !important;
}
html .workflow-engineering-review[data-menu-ui] :is(section, .we-metrics > div),
html .design-bulk-inspector[data-menu-ui] .design-bulk-review,
html .plant-maker-browser[data-menu-ui] .plant-maker-models > li {
  background: var(--menu-subtle); border-color: var(--menu-border); border-radius: var(--menu-card-radius);
}
html .workflow-engineering-review[data-menu-ui] .error,
html .design-bulk-inspector[data-menu-ui] :is(.design-bulk-error, .design-bulk-field-error) { color: var(--menu-danger); }
html .workflow-engineering-review[data-menu-ui] td a,
html .plant-maker-browser[data-menu-ui] a { color: var(--menu-accent); }
html .plant-maker-browser[data-menu-ui] .plant-maker-heading h3 { font-size: 18px; }
html .plant-maker-browser[data-menu-ui] :is(header small, .plant-maker-heading > div > small) { color: var(--menu-accent); }
html .plant-maker-browser[data-menu-ui] .plant-maker-heading { flex-wrap: wrap; }
html .plant-maker-browser[data-menu-ui] .plant-maker-status { flex-shrink: 1; }
/* Secondary readers were outside the inspector inventory. Decorate only
   their application chrome, not the image pixels or contractor CAD scene. */
html :is(.product-finder-compare-sheet, .commissioning-evidence-viewer)[data-menu-ui] {
  --surface-solid: var(--menu-surface); --text: var(--menu-ink);
  --muted: var(--menu-muted); --line: var(--menu-border);
  --blue-soft: var(--menu-selected); --blue: var(--menu-accent);
  box-sizing: border-box; font-size: 12px; line-height: 1.5; font-weight: 500;
}
html .product-finder-compare-sheet[data-menu-ui] header h2 { font-size: 18px; line-height: 1.3; color: var(--menu-ink); }
/* A percentage max-height was indefinite in the nested catalogue grid,
   letting long comparisons extend below the viewport. Keep the existing
   table/list scroll owner and give its grid a definite viewport ceiling. */
html .product-finder-compare-sheet[data-menu-ui] { max-height: calc(100dvh - 120px); min-height: 0; }
/* Keep the completed PDF retry available, but do not let its high-z-index
   notice cover a foreground modal's inputs or primary action. The original
   link, blob and handlers remain retained and return when the modal closes. */
html:has([role="dialog"][aria-modal="true"]:not(.export-popover)) .drawing-export-download-notice { display: none !important; }
html .product-finder-compare-sheet[data-menu-ui] header span { color: var(--menu-accent); }
html .product-finder-compare-sheet[data-menu-ui] :is(th, td) { border-color: var(--menu-border); }
html .product-finder-compare-sheet[data-menu-ui] thead th { background: var(--menu-selected); }
html .commissioning-evidence-viewer[data-menu-ui] .commissioning-evidence-viewer-head { gap: 12px; min-width: 0; }
html .commissioning-evidence-viewer[data-menu-ui] .commissioning-evidence-viewer-head strong { min-width: 0; color: var(--menu-ink); font-size: 15px; }
html .commissioning-evidence-viewer[data-menu-ui] .commissioning-evidence-viewer-head button { flex: 0 0 auto; color: var(--menu-ink); background: var(--menu-surface); border-color: var(--menu-border-strong); }
html .my-day-review-overlay[data-menu-ui] {
  --my-day-card: var(--menu-surface); --my-day-card-solid: var(--menu-surface);
  --my-day-card-subtle: var(--menu-subtle); --my-day-control: var(--menu-surface);
  --my-day-line: var(--menu-border); --my-day-line-strong: var(--menu-border-strong);
  --my-day-ink: var(--menu-ink); --my-day-muted: var(--menu-muted);
  --my-day-blue: var(--menu-accent); --my-day-blue-soft: var(--menu-selected);
  --my-day-blue-border: var(--menu-selected-border);
}
html .my-day-review-overlay[data-menu-ui] > header strong { font-size: 16px; line-height: 1.3; }
html .my-day-review-overlay[data-menu-ui] :is(button, input, select, textarea) { font-size: 12px; line-height: 1.4; font-weight: 650; }
html .contractor-design-review-head[data-menu-ui] { background: var(--menu-surface); border-color: var(--menu-border); color: var(--menu-ink); gap: 12px; }
html .contractor-design-review-head[data-menu-ui] h2 { font-size: 18px; line-height: 1.3; color: var(--menu-ink); }
html .contractor-design-review-head[data-menu-ui] :is(p, div > span) { color: var(--menu-muted); font-size: 12px; line-height: 1.5; font-weight: 500; }
/* Export application controls opt in separately. The sheet canvas, title
   block, schedules and Word preview have no decorated ancestor here. */
html :is(.axm-drawing-preview-header, .axm-drawing-preview-toolbar, .axm-drawing-preview-sidebar,
  .axm-drawing-preview-footer, .plant-document-header, .plant-document-controls, .plant-document-footer)[data-menu-ui] {
  font-size: 12px; line-height: 1.5; font-weight: 500;
  color: var(--menu-ink); background: var(--menu-surface) !important; border-color: var(--menu-border);
}
html :is(.axm-drawing-preview-header, .plant-document-header)[data-menu-ui] h2 {
  font-size: 18px; font-weight: 800; line-height: 1.3;
}
html :is(.axm-drawing-preview-sidebar, .plant-document-controls)[data-menu-ui] :is(h3, legend, summary) {
  font-size: 13px; font-weight: 750; line-height: 1.4;
}
html :is(.axm-drawing-preview-header, .axm-drawing-preview-toolbar, .axm-drawing-preview-sidebar,
  .axm-drawing-preview-footer, .plant-document-header, .plant-document-controls, .plant-document-footer)[data-menu-ui] :is(button, input, select, textarea) {
  font-size: 12px; font-weight: 650; line-height: 1.35;
}
html :is(.axm-drawing-preview-header, .axm-drawing-preview-sidebar, .axm-drawing-preview-footer,
  .plant-document-header, .plant-document-controls, .plant-document-footer)[data-menu-ui] p { color: var(--menu-muted); font-weight: 500; }
html .axm-drawing-preview-sidebar[data-menu-ui] :is(.axm-drawing-preview-card, .axm-drawing-preview-tabs) {
  background: var(--menu-subtle); border-color: var(--menu-border);
}
html .axm-drawing-preview-sidebar[data-menu-ui] .axm-drawing-preview-tabs { gap: 4px; }
html .axm-drawing-preview-sidebar[data-menu-ui] .axm-drawing-preview-tabs > button {
  min-width: 0; padding: 7px 5px; font-size: 11px;
}
html .plant-document-controls[data-menu-ui] details { border-color: var(--menu-border); }
/* Commercial review choices are navigation/filter states, not engineering
   status colours. The old service-blue palette had low dark-mode contrast. */
html .pricing-portal-optimiser-dialog[data-menu-ui] :is(.pricing-portal-optimiser-header, .pricing-portal-optimiser-footer) {
  background: var(--menu-surface) !important; border-color: var(--menu-border);
}
html .pricing-portal-optimiser-dialog[data-menu-ui] .pricing-portal-optimiser-header h2 {
  font-size: 18px; font-weight: 800; line-height: 1.3;
}
html .pricing-portal-optimiser-dialog[data-menu-ui] :is(.pricing-portal-optimiser-header > div > span,
  .pricing-portal-optimiser-section-title > span, .pricing-portal-optimiser-scope-head > div > span,
  .pricing-portal-optimiser-bulk-intro > span, .pricing-portal-optimiser-preview-head > div > span) { color: var(--menu-accent); }
html .pricing-portal-optimiser-dialog[data-menu-ui] :is(.pricing-portal-optimiser-header p,
  .pricing-portal-optimiser-bulk-intro p) { color: var(--menu-muted); font-weight: 500; }
html .pricing-portal-optimiser-dialog[data-menu-ui] :is(.pricing-portal-optimiser-tabs button small,
  .pricing-portal-optimiser-objective-grid button small) { color: var(--menu-muted); opacity: 1; font-weight: 500; }
html .pricing-portal-optimiser-dialog[data-menu-ui] .pricing-portal-optimiser-chip span {
  color: var(--menu-muted); background: var(--menu-surface); border-color: var(--menu-border-strong);
  border-radius: var(--menu-control-radius); box-shadow: none;
}
html .pricing-portal-optimiser-dialog[data-menu-ui] .pricing-portal-optimiser-chip input:checked + span {
  color: var(--menu-accent); background: var(--menu-selected); border-color: var(--menu-selected-border);
}
html .equipment-passport-workspace[data-menu-ui] { font-size: 12px; font-weight: 500; }
html .equipment-passport-workspace[data-menu-ui] .ep-header { background: var(--menu-surface); }
html .equipment-passport-workspace[data-menu-ui] .ep-header h2 { font-size: 18px; line-height: 1.3; }
html .equipment-passport-workspace[data-menu-ui] .ep-asset-head h3 { font-size: 16px; }
html .equipment-passport-workspace[data-menu-ui] :is(.ep-header small, .ep-reference, .ep-list-reference, .ep-stats button) { color: var(--menu-accent); }
html .equipment-passport-workspace[data-menu-ui] .ep-list-reference { background: var(--menu-selected); }
html :is(.axio-shortcut-panel, .app-software-update-panel)[data-menu-ui] {
  --shortcut-bg: var(--menu-surface); --shortcut-soft: var(--menu-subtle);
  --shortcut-text: var(--menu-ink); --shortcut-muted: var(--menu-muted); --shortcut-line: var(--menu-border);
  font-size: 12px; font-weight: 500;
}
html .axio-shortcut-panel[data-menu-ui] .axio-shortcut-eyebrow { color: var(--menu-accent); }

/* Equipment handover entry: a quiet menu card, not a full-width generic
   field-work panel. Queries follow the card width, including narrow exports. */
html .equipment-passport-entry {
  container-type: inline-size; min-width: 0; margin-top: 12px;
  border: 1px solid var(--menu-border); border-radius: var(--menu-card-radius);
  background: var(--menu-surface); color: var(--menu-ink); font-family: var(--menu-font);
}
html .equipment-passport-card { display: grid; grid-template-columns: 40px minmax(0,1fr) auto; align-items: center; gap: 14px; padding: 16px; }
html .equipment-passport-icon { display: grid; place-items: center; width: 40px; height: 40px; align-self: start; border-radius: var(--menu-control-radius); background: var(--menu-selected); color: var(--menu-accent); border: 1px solid var(--menu-selected-border); }
html .equipment-passport-icon svg { width: 22px; height: 22px; }
html .equipment-passport-copy { min-width: 0; }
html .equipment-passport-copy h3 { margin: 0; color: var(--menu-ink); font-size: 15px; font-weight: 800; line-height: 1.35; }
html .equipment-passport-copy p { margin: 5px 0 0; max-width: 68ch; color: var(--menu-muted); font-size: 12px; font-weight: 450; line-height: 1.5; }
html .equipment-passport-features { display: flex; flex-wrap: wrap; gap: 5px 14px; list-style: none; padding: 0; margin: 10px 0 0; }
html .equipment-passport-features li { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--menu-muted); font-size: 11px; font-weight: 600; line-height: 1.4; }
html .equipment-passport-features li::before { content: ""; width: 4px; height: 4px; flex: none; border-radius: 50%; background: var(--menu-accent); }
html .equipment-passport-action { display: grid; gap: 7px; width: 194px; min-width: 0; }
html .equipment-passport-action button { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: auto; min-height: 36px; padding: 8px 12px; font-size: 12px; font-weight: 700; line-height: 1.3; border-radius: var(--menu-control-radius); }
html .equipment-passport-action button span { display: grid; place-items: center; }
html .equipment-passport-action button svg { width: 14px; height: 14px; }
html .equipment-passport-action small { display: block; margin: 0; color: var(--menu-muted); font-size: 11px; font-weight: 450; line-height: 1.4; text-align: center; overflow-wrap: anywhere; }
@container (max-width: 620px) {
  html .equipment-passport-card { grid-template-columns: 32px minmax(0,1fr); padding: 12px; gap: 10px; }
  html .equipment-passport-icon { width: 32px; height: 32px; }
  html .equipment-passport-icon svg { width: 18px; height: 18px; }
  html .equipment-passport-action { grid-column: 2; width: 100%; }
  html .equipment-passport-action small { text-align: left; }
}
@media (pointer: coarse) {
  html .equipment-passport-action button { min-height: 44px; }
}

/* Passive cards only: no alert, product media, chart, metric, SVG, status strip
   or branded sharing/export preview selectors here. */
html [data-menu-ui] :is(.settings-section, .settings-card, .floor-plan-card, .project-settings-section,
  .plant-room-menu-section, .pipe-panel-menu-section, .room-geometry-summary, .export-section,
  .export-card, .account-menu-card, .account-profile-card, .account-menu-section, .account-popout,
  .team-activity-item, .team-activity-project-card,
  .my-day-field-comment-card, .my-day-field-comment-form, .workspace-assistant-composer,
  .rz-assign, .thermal-context-card, .thermal-schedule-editor) {
  border-color: var(--menu-border) !important; border-radius: var(--menu-card-radius) !important;
  background: var(--menu-subtle) !important; box-shadow: none !important;
}
html [data-menu-ui] :is(.product-library-main, .product-library-detail, .product-library-rail, .account-menu-body, .project-settings-tab-panel, .rz-main, .rz-sidebar) { color: var(--menu-ink); background: var(--menu-surface) !important; border-color: var(--menu-border) !important; }
html [data-menu-ui] :is(.muted, .rz-muted, .hint, .help-text, .field-help, .unit, .input-unit > span) { color: var(--menu-muted); }

/* Thermal's contextual inspector uses the same quiet inset cards and selected
   states as the other workspace menus, not its former separate blue palette. */
html [data-menu-ui].thermal-workbench > nav { background: var(--menu-surface); }
html [data-menu-ui].thermal-workbench > header > div { min-width: 0; }
html [data-menu-ui].thermal-workbench .thermal-context-title { padding: 10px; border: 1px solid var(--menu-border); border-radius: var(--menu-card-radius); background: var(--menu-subtle); }
html [data-menu-ui].thermal-workbench .thermal-context-icon { width: 32px; height: 32px; background: var(--menu-selected); border-color: var(--menu-selected-border); color: var(--menu-accent); border-radius: var(--menu-control-radius); }
html [data-menu-ui].thermal-workbench .thermal-context-icon svg { width: 18px; height: 18px; }
html [data-menu-ui].thermal-workbench .thermal-context-title small:first-child { color: var(--menu-muted); }
html [data-menu-ui].thermal-workbench :is(.thermal-preview, .thermal-lock) { color: var(--menu-ink); background: var(--menu-selected); border-color: var(--menu-selected-border); }
html [data-menu-ui].thermal-workbench .thermal-context-change { flex: none; flex-wrap: wrap; color: var(--menu-ink); background: var(--menu-selected); border-color: var(--menu-selected-border); }
html [data-menu-ui].thermal-workbench .thermal-context-change span { flex: 1 1 160px; }
html [data-menu-ui].thermal-workbench .thermal-note { color: var(--menu-muted); }
html [data-menu-ui].thermal-workbench :is(.thermal-tool-choices button, form details) { background: var(--menu-subtle); }
html [data-menu-ui].thermal-workbench .thermal-review-card.is-error { border-color: var(--menu-danger-border); }
html [data-menu-ui] .product-rich-description-head > span { color: var(--menu-accent); background: var(--menu-selected); border-color: var(--menu-selected-border); font-size: 11px; font-weight: 600 !important; }
/* The library reuses a thumbnail from a two-row equipment tile. Its inherited
   row span created an empty track and squeezed the specifications out of view. */
html [data-menu-ui].plant-room-product-library-panel .plant-room-product-library-card > .plant-room-product-thumb { grid-row: 1; }
html [data-menu-ui].plant-room-product-library-panel .plant-room-product-library-card .pipe-compact-spec { flex-shrink: 0; }
html [data-menu-ui] :is(summary, legend) { color: var(--menu-ink); }

/* Project setup is part of the same form system, including its newer thermal
   intake/options. Explicit classes keep these rules out of drawings/reports. */
html [data-menu-ui].project-setup-card {
  --text: var(--menu-ink); --muted: var(--menu-muted); --line: var(--menu-border);
  gap: 16px; padding: 24px; max-height: calc(100dvh - 48px);
}
html [data-menu-ui].project-setup-card .project-setup-header { gap: 24px; padding-bottom: 4px; }
html [data-menu-ui].project-setup-card .project-setup-kicker { color: var(--menu-accent); font-size: 11px; font-weight: 600 !important; }
html [data-menu-ui].project-setup-card .project-setup-header p { margin-top: 5px; max-width: 65ch; color: var(--menu-muted); font-size: 13px; }
html [data-menu-ui].project-setup-card :is(.project-setup-section, .project-setup-floor-guide, .project-setup-guide-list > :where(li),
  .project-system-selection, .project-setup-temperature-group, .pipe-system-selection-card, .project-setup-context-card) {
  background: var(--menu-subtle); border: 1px solid var(--menu-border); border-radius: var(--menu-card-radius); box-shadow: none;
}
html [data-menu-ui].project-setup-card .project-setup-section { padding: 16px; gap: 16px; min-width: 0; }
html [data-menu-ui].project-setup-card .project-setup-step-panel { animation: none; }
html [data-menu-ui].project-setup-card [data-project-setup-title]:focus { outline: none; }
html[data-theme="dark"] .project-setup-logo .brand-logo-image-light { display: none; }
html[data-theme="dark"] .project-setup-logo .brand-logo-image-dark { display: block; }
html [data-menu-ui].project-setup-card .project-setup-step {
  background: var(--menu-subtle); border-color: var(--menu-border); box-shadow: none;
  min-height: 42px; padding: 8px; color: var(--menu-muted);
}
html [data-menu-ui].project-setup-card .project-setup-step::before,
html [data-menu-ui].project-setup-card .project-setup-step::after { display: none; animation: none; }
html [data-menu-ui].project-setup-card .project-setup-step strong { font-size: 12px; }
html [data-menu-ui].project-setup-card .project-setup-step span { background: var(--menu-surface); border-color: var(--menu-border); color: var(--menu-muted); }
html [data-menu-ui].project-setup-card .project-setup-step:is(.active, .complete) { background: var(--menu-selected); border-color: var(--menu-selected-border); color: var(--menu-accent); }
html [data-menu-ui].project-setup-card .project-setup-step:is(.active, .complete) span { background: var(--menu-primary); border-color: var(--menu-primary); color: #fff; }
html [data-menu-ui].project-setup-card .project-setup-grid { gap: 14px; }
html [data-menu-ui].project-setup-card .settings-field { display: grid; align-content: start; gap: 6px; min-width: 0; }
html [data-menu-ui].project-setup-card .settings-field-label { color: var(--menu-ink); font-size: 12px; font-weight: 600 !important; min-height: 0; }
html [data-menu-ui].project-setup-card :is(.settings-field input, .settings-field select) { height: auto; width: 100%; }
html [data-menu-ui].project-setup-card .input-unit { min-width: 0; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
html [data-menu-ui].project-setup-card :is(.project-setup-temperature-group, .project-setup-context-card, .project-system-selection) { display: grid; padding: 14px; gap: 12px; }
html [data-menu-ui].project-setup-card .project-setup-context-card { background: var(--menu-surface); margin: 0; }
html [data-menu-ui].project-setup-card .project-setup-group-head { gap: 4px; }
html [data-menu-ui].project-setup-card .project-setup-group-head strong { font-size: 14px; line-height: 1.4; }
html [data-menu-ui].project-setup-card :is(.project-setup-group-head span, .project-setup-help, .settings-note, .project-system-selection-note) { font-size: 12px; line-height: 1.5; color: var(--menu-muted); font-weight: 400 !important; }
html [data-menu-ui].project-setup-card :is(.project-setup-help, .settings-note) { max-width: none; margin: 0; }
html [data-menu-ui].project-setup-card .settings-note { padding: 10px 12px; background: var(--menu-subtle); border-color: var(--menu-border); border-radius: var(--menu-control-radius); }
html [data-menu-ui].project-setup-card .project-setup-starting-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; align-items: start; }
html [data-menu-ui].project-setup-card .project-setup-template-option { display: grid; gap: 12px; padding-left: 24px; border-left: 1px solid var(--menu-border); }
html [data-menu-ui].project-setup-card .project-setup-template-option button { justify-self: start; }
html [data-menu-ui].project-setup-card .project-setup-context-card .settings-mini-btn { display: inline-flex; align-items: center; gap: 8px; white-space: normal; height: auto; }
html [data-menu-ui].project-setup-card .project-setup-context-card button svg { width: 16px; height: 16px; flex: none; }
html [data-menu-ui].project-setup-card .project-setup-context-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
html [data-menu-ui].project-setup-card .project-setup-intake-status { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
html [data-menu-ui].project-setup-card .project-setup-status-pill { border: 1px solid var(--menu-border); background: var(--menu-subtle); border-radius: 6px; padding: 4px 7px; font-size: 12px; color: var(--menu-ink); }
html [data-menu-ui].project-setup-card .thermal-intake-list { gap: 8px; max-height: 280px; }
html [data-menu-ui].project-setup-card .project-setup-sheet-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; border: 1px solid var(--menu-border); border-radius: 8px; padding: 8px; background: var(--menu-subtle); }
html [data-menu-ui].project-setup-card .project-setup-sheet-select { width: 100%; min-width: 0; padding: 4px; background: transparent; text-align: left; }
html [data-menu-ui].project-setup-card .project-setup-sheet-select > span:not(.project-setup-sheet-icon) { min-width: 0; display: grid; gap: 3px; overflow-wrap: anywhere; }
html [data-menu-ui].project-setup-card .project-setup-sheet-select strong { font-size: 12px; line-height: 1.4; }
html [data-menu-ui].project-setup-card .project-setup-sheet-icon { display: grid; place-items: center; width: 42px; height: 42px; flex: none; background: var(--menu-surface); border: 1px solid var(--menu-border); border-radius: 6px; color: var(--menu-accent); }
html [data-menu-ui].project-setup-card .project-setup-sheet-check { display: flex; align-items: center; gap: 8px; font-size: 12px; padding: 4px; cursor: pointer; }
html [data-menu-ui].project-setup-card .project-setup-sheet-check input { width: 18px; height: 18px; margin: 0; flex: none; }
html [data-menu-ui].project-setup-card :is(.project-setup-default-controls, .project-setup-compact-temperatures .project-setup-grid) { grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); }
html [data-menu-ui].project-setup-card .project-setup-cooling-assumptions .project-setup-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
html [data-menu-ui].project-setup-card .project-system-option { background: var(--menu-surface); border-color: var(--menu-border); transform: none; }
html [data-menu-ui].project-setup-card .project-system-option:has(input:checked) { background: var(--menu-selected); border-color: var(--menu-selected-border); }
html [data-menu-ui].project-setup-card :is(.settings-toggle, .project-setup-floor-guide, .project-setup-calibration-strip .cal-meta) { background: var(--menu-subtle); border-color: var(--menu-border); box-shadow: none; }
html [data-menu-ui].project-setup-card .project-setup-actions { border-top: 1px solid var(--menu-border); padding-top: 14px; }
html [data-menu-ui].project-setup-card.project-setup-floor-active { gap: 12px; padding: 18px; }
html [data-menu-ui].project-setup-card .project-setup-floor-manager { gap: 10px; }
html [data-menu-ui].project-setup-card .project-setup-floor-manager label { display: grid; gap: 6px; }
html [data-menu-ui].project-setup-card .project-setup-calibration-strip { gap: 12px; }
html [data-menu-ui].project-setup-card .project-setup-calibration-strip label { font-size: 12px; }
html [data-menu-ui].thermal-import-dialog :is(header, footer, .thermal-import-body, .thermal-import-page) { border-color: var(--menu-border); }
html [data-menu-ui].thermal-import-dialog :is(header, footer) { background: var(--menu-surface); }
html [data-menu-ui].thermal-import-dialog .thermal-import-page { background: var(--menu-subtle); gap: 12px; }
html [data-menu-ui].thermal-import-dialog label { display: grid; gap: 6px; }
html [data-menu-ui].thermal-import-dialog .thermal-import-include { display: flex; gap: 8px; align-items: flex-start; }
html [data-menu-ui].thermal-import-dialog .thermal-import-include input { width: 18px; height: 18px; margin: 0; flex: none; }
html [data-menu-ui].thermal-import-dialog input[type="file"] { padding: 8px; width: 100%; }
html [data-menu-ui].thermal-import-dialog .thermal-import-placeholder { display: grid; place-items: center; min-height: 80px; background: var(--menu-surface); border-radius: 8px; color: var(--menu-muted); }
html [data-menu-ui].thermal-setup-templates { inset: 0; margin: auto; width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); height: max-content; padding: 0; }
html [data-menu-ui].thermal-setup-templates::backdrop { background: rgb(24 35 51 / 38%); }
html [data-menu-ui].thermal-setup-templates > header { padding: 18px 20px; border-bottom: 1px solid var(--menu-border); }
html [data-menu-ui].thermal-setup-templates .thermal-workbench-body { padding: 18px 20px; }
html [data-menu-ui].thermal-setup-templates > footer { padding: 12px 20px; }
html [data-menu-ui].thermal-setup-templates input[type="file"] { width: 100%; padding: 8px; }
@media (max-width: 700px) {
  html [data-menu-ui].project-setup-card { width: calc(100vw - 24px); padding: 14px; gap: 12px; max-height: calc(100dvh - 24px); }
  html [data-menu-ui].project-setup-card .project-setup-header { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  html [data-menu-ui].project-setup-card .project-setup-logo .brand-logo-wordmark { width: 120px; }
  html [data-menu-ui].project-setup-card .project-setup-progress { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  html [data-menu-ui].project-setup-card .project-setup-floor-grid { grid-auto-rows: max-content; min-height: 0; }
  html [data-menu-ui].project-setup-card .project-setup-actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
  html [data-menu-ui].project-setup-card .project-setup-action-buttons > button { flex: 1 1 auto; }
  html [data-menu-ui].project-setup-card :is(.project-setup-section, .project-setup-context-card) { padding: 12px; }
  html [data-menu-ui].project-setup-card :is(.project-setup-starting-grid, .project-setup-grid, .project-setup-cooling-assumptions .project-setup-grid, .project-setup-floor-grid, .project-setup-sheet-row) { grid-template-columns: minmax(0, 1fr); }
  html [data-menu-ui].project-setup-card .project-setup-starting-grid { gap: 16px; }
  html [data-menu-ui].project-setup-card .project-setup-template-option { padding: 14px 0 0; border-left: 0; border-top: 1px solid var(--menu-border); }
  html [data-menu-ui].project-setup-card .project-setup-sheet-check { min-height: 36px; padding-left: 8px; }
  html [data-menu-ui].project-setup-card .project-setup-step { grid-template-columns: auto; gap: 4px; justify-items: center; padding: 6px 3px; }
  html [data-menu-ui].project-setup-card .project-setup-step strong { font-size: 10px; white-space: normal; text-align: center; }
  html [data-menu-ui].project-setup-card .project-system-selection-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html [data-menu-ui].project-setup-card .project-setup-calibration-strip :is(.cal-steps, .cal-meta, .cal-setup) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html [data-menu-ui].thermal-import-dialog :is(header, footer) { padding: 14px; gap: 10px; }
  html [data-menu-ui].thermal-import-dialog footer { flex-wrap: wrap; }
}

/* Full menus own input over compact-screen sticky chrome (which uses z=90).
   Desktop headers stay available for switching menus. No nodes are moved. */
@media (max-width: 900px) {
  html .studio-shell > :is(.settings-backdrop, .export-backdrop, .product-library-backdrop,
    .account-menu-backdrop, .brand-menu-backdrop, .workspace-more-backdrop,
    .history-backdrop, .share-backdrop, .team-activity-backdrop, .methodology-backdrop,
    .disclaimer-agreement-backdrop, .floor-plan-backdrop) { z-index: 120; }
}
html:has(.studio-shell.workspace-popup-active) :is(.workspace-assistant-launcher,
  .workspace-assistant-panel, .my-day-designer-comments) { visibility: hidden; pointer-events: none; }

@media (pointer: coarse) {
  html [data-menu-ui] button:not([role="switch"]):not(.colour-swatch):not(.color-swatch):not(.plant-room-product-library-card),
  html [data-menu-ui] :is(input, select):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="hidden"]) { min-height: 44px !important; }
  html [data-menu-ui] :is(input, select, textarea):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="hidden"]) { font-size: 16px !important; }
}
@media (prefers-reduced-motion: reduce) {
  html [data-menu-ui] :is(button, input, select, textarea) { transition: none !important; }
  html [data-menu-ui="surface"]:is(.tile-opening, .tile-closing) { animation: none; opacity: 1; transform: none; will-change: auto; }
}
@media (forced-colors: active) {
  html [data-menu-ui="surface"], html [data-menu-ui] :is(button, input, select, textarea) { border-color: ButtonText !important; }
  html [data-menu-ui] :is(button, a, input, select, textarea, summary):focus-visible { outline-color: Highlight !important; }
}

/* Compact snap settings: one master, quiet rows, a single consistent switch.
   Scoped to this popover; the dashboard font and other menu sizes stay intact. */
html .snap-menu-popover[data-menu-ui] {
  box-sizing: border-box; width: min(300px, calc(100vw - 16px));
  max-height: var(--snap-menu-fixed-max-height, calc(100dvh - 90px));
  display: flex; flex-direction: column; gap: 6px; padding: 8px;
  scrollbar-width: thin;
  overflow-y: auto;
}

.room-batch-assignment { margin: 10px 0; padding: 10px; border: 1px solid var(--menu-border, #d7e1ed); border-radius: 10px; }
.room-batch-assignment summary { cursor: pointer; font-size: 12px; font-weight: 600; }
.room-batch-targets { max-height: 190px; overflow-y: auto; margin: 8px 0; }
.room-batch-targets label { display: flex; align-items: center; gap: 8px; padding: 6px 2px; font-size: 12px; }
.room-batch-targets small { display: block; color: var(--menu-muted, #637089); font-size: 11px; }
.room-batch-targets input { width: 16px; height: 16px; flex: 0 0 auto; }
.room-batch-actions { display: flex; gap: 6px; }
.room-batch-assignment button { font-size: 12px; }
html .snap-menu-popover[data-menu-ui] :is(.snap-menu-master, .snap-menu-option) {
  box-sizing: border-box; flex: none; width: 100%; height: auto; min-height: 36px;
  padding: 7px 9px; gap: 10px; border: 1px solid transparent !important;
  border-radius: var(--menu-control-radius) !important;
  font: 600 13px/1.35 var(--menu-font) !important;
  letter-spacing: normal !important; color: var(--menu-ink) !important;
  background: transparent !important; box-shadow: none !important; text-shadow: none !important;
  transition: background-color 120ms ease, border-color 120ms ease;
}
html .snap-menu-popover[data-menu-ui] .snap-menu-master {
  min-height: 54px; background: var(--menu-subtle) !important;
  border-color: var(--menu-border) !important; font-size: 14px !important;
}
html .snap-menu-popover[data-menu-ui] .snap-menu-title { display: grid; gap: 2px; min-width: 0; }
html .snap-menu-popover[data-menu-ui] .snap-menu-title small { font-size: 11px; font-weight: 400; line-height: 1.35; }
html .snap-menu-popover[data-menu-ui] .snap-menu-option[aria-checked="true"] { color: var(--menu-accent) !important; }
html .snap-menu-popover[data-menu-ui] button:not(:disabled):hover {
  background: var(--menu-hover) !important; border-color: var(--menu-hover-border) !important;
}
html .snap-menu-popover[data-menu-ui] button[aria-checked="true"]:not(:disabled):hover { background: var(--menu-selected-hover) !important; }
html .snap-menu-popover[data-menu-ui] button:disabled { opacity: .55; color: var(--menu-muted) !important; }
html .snap-menu-popover[data-menu-ui] .snap-menu-option-main { gap: 10px; }
html .snap-menu-popover[data-menu-ui] .snap-menu-option-main > span:last-child { white-space: normal; overflow-wrap: anywhere; }
html .snap-menu-popover[data-menu-ui] :is(.snap-glyph, .snap-menu-master-icon svg) { width: 18px; height: 18px; flex-basis: 18px; color: var(--menu-muted); }
html .snap-menu-popover[data-menu-ui] .snap-glyph-red { stroke: currentColor; }
html .snap-menu-popover[data-menu-ui] [aria-checked="true"] :is(.snap-glyph, .snap-menu-master-icon svg) { color: var(--menu-accent); }
html .snap-menu-popover[data-menu-ui] .snap-menu-toggle {
  box-sizing: border-box; width: 32px; height: 20px; flex: 0 0 32px;
  border: 1px solid var(--menu-border-strong); background: var(--menu-hover);
}
html .snap-menu-popover[data-menu-ui] .snap-menu-toggle.active { border-color: var(--menu-primary); background: var(--menu-primary); }
html .snap-menu-popover[data-menu-ui] .snap-menu-toggle > span {
  top: 2px; left: 2px; width: 14px; height: 14px; background: #fff; transform: none;
}
html .snap-menu-popover[data-menu-ui] .snap-menu-toggle.active > span { transform: translateX(12px); background: #fff; }
html .snap-menu-popover[data-menu-ui] .snap-menu-hint {
  margin: 0; padding: 7px 9px 2px; border-top: 1px solid var(--menu-border);
  color: var(--menu-muted); font: 400 11px/1.45 var(--menu-font); flex: none;
}

/* Compact reference choice beside the other room-drawing controls. */
.wall-point-reference-control {
  display: flex; flex-direction: column; gap: 4px; min-width: 0;
  color: var(--menu-ink); font: 600 11px/1.4 var(--menu-font);
}
.thermal-inline-controls .wall-point-reference-control { flex: 0 1 122px; }
.wall-point-reference-control select {
  width: 100%; min-width: 110px; min-height: 34px; box-sizing: border-box;
  padding: 6px 9px; border: 1px solid var(--menu-border); border-radius: 8px;
  background: var(--menu-surface); color: var(--menu-ink); font: 600 12px/1.4 var(--menu-font);
}
.snap-menu-popover .wall-point-reference-control { flex: none; margin: 6px 9px; }
.wall-point-reference-control select:focus-visible { outline: 2px solid var(--menu-accent); outline-offset: 1px; }
@media (pointer: coarse) {
  html .snap-menu-popover[data-menu-ui] .snap-menu-option, .wall-point-reference-control select { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  html .snap-menu-popover[data-menu-ui] .snap-menu-toggle > span { transition: none; }
}
@media (forced-colors: active) {
  html .snap-menu-popover[data-menu-ui] .snap-menu-toggle.active { background: Highlight; forced-color-adjust: none; }
}

/* Share uses the same opaque menu palette throughout. Its legacy blue hero
   left white metadata and transparent control borders on the themed surface. */
html .share-popover[data-menu-ui] {
  --text: var(--menu-ink); --muted: var(--menu-muted); --surface: var(--menu-surface);
  --line: var(--menu-border); --control-border: var(--menu-border-strong);
  --control-bg: var(--menu-subtle); --input-bg: var(--menu-surface); --input-border: var(--menu-border-strong);
  --blue: var(--menu-primary); --blue-soft: var(--menu-selected); --blue-border: var(--menu-selected-border);
  width: min(880px, calc(100vw - 32px)); max-height: min(820px, calc(100dvh - 32px));
  font-size: 12px; font-weight: 500;
}
html .share-popover[data-menu-ui] *, html .share-popover[data-menu-ui] *::before, html .share-popover[data-menu-ui] *::after { box-sizing: border-box; min-width: 0; }
html .share-popover[data-menu-ui] .share-popover-head { min-height: 0; padding: 16px 18px; gap: 12px; }
html .share-popover[data-menu-ui] .share-popover-head::before, html .share-popover[data-menu-ui] .share-popover-head::after { content: none; }
html .share-popover[data-menu-ui] .share-hero-brand { grid-template-columns: 38px minmax(0, 1fr); gap: 10px; }
html .share-popover[data-menu-ui] .share-hero-icon { width: 38px; height: 38px; border: 1px solid var(--menu-selected-border); border-radius: 10px; background: var(--menu-selected); color: var(--menu-accent) !important; box-shadow: none; }
html .share-popover[data-menu-ui] .share-hero-icon svg { width: 20px; height: 20px; }
html .share-popover[data-menu-ui] .share-hero-brand > div > span { color: var(--menu-muted); font: 600 10px/1.4 var(--menu-font); letter-spacing: .04em; }
html .share-popover[data-menu-ui] .share-hero-brand strong { font-size: 17px !important; white-space: normal; overflow-wrap: anywhere; }
html .share-popover[data-menu-ui] .share-hero-brand small { color: var(--menu-muted); font-size: 11px; font-weight: 450; }
html .share-popover[data-menu-ui] .share-live-status { display: inline-flex; min-height: 28px; padding: 4px 8px; color: var(--menu-muted) !important; border: 1px solid var(--menu-border); background: var(--menu-subtle); font-size: 11px !important; font-weight: 600 !important; }
html .share-popover[data-menu-ui] .share-live-status i { background: var(--menu-muted); box-shadow: none; }
html .share-popover[data-menu-ui] .share-live-status.active { color: var(--menu-success) !important; border-color: var(--menu-success-border); background: var(--menu-success-soft); }
html .share-popover[data-menu-ui] .share-live-status.active i { background: var(--menu-success); }
html .share-popover[data-menu-ui] .share-popover-head-actions { gap: 8px; }
html .share-popover[data-menu-ui] .share-hero-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
html .share-popover[data-menu-ui] .share-hero-stats > div { min-height: 40px; padding: 7px 10px; display: flex; flex-wrap: wrap; gap: 2px 7px; border: 1px solid var(--menu-border); border-radius: 8px; background: var(--menu-subtle); }
html .share-popover[data-menu-ui] .share-hero-stats strong { color: var(--menu-ink); font-size: 13px !important; font-weight: 750 !important; }
html .share-popover[data-menu-ui] .share-hero-stats span { color: var(--menu-muted); font-size: 11px; font-weight: 450; line-height: 1.4; }
html .share-popover[data-menu-ui] .share-tabs { min-height: 0; padding: 8px 12px; background: var(--menu-subtle); }
html .share-popover[data-menu-ui] .share-tabs button { min-height: 40px; height: auto; padding: 8px 10px; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 7px; }
html .share-popover[data-menu-ui] .share-tabs button span { white-space: normal; font-size: 12px; font-weight: 650; line-height: 1.35; }
html .share-popover[data-menu-ui] .share-tabs button.active { background: var(--menu-selected); color: var(--menu-accent); border-color: var(--menu-selected-border); }
html .share-popover[data-menu-ui] .share-tabs button em { font-size: 10px; font-weight: 600; }
html .share-popover[data-menu-ui] .share-popover-body { padding: 16px 18px; }
html .share-popover[data-menu-ui] .share-settings-pane { gap: 14px; }
html .share-popover[data-menu-ui] .share-section-heading { gap: 12px; align-items: center; }
html .share-popover[data-menu-ui] .share-section-heading > div > span { color: var(--menu-muted); font-size: 10px; font-weight: 600; }
html .share-popover[data-menu-ui] .share-section-heading h3 { font-size: 15px; font-weight: 750; line-height: 1.35; }
html .share-popover[data-menu-ui] .share-section-heading p, html .share-popover[data-menu-ui] .share-section-heading > small { font-size: 11px; font-weight: 450; }
html .share-popover[data-menu-ui] .share-choice-columns { gap: 12px; }
html .share-popover[data-menu-ui] .share-choice-group legend { color: var(--menu-muted); font-size: 11px; font-weight: 600; }
html .share-popover[data-menu-ui] :is(.share-choice-card, .share-scope-card) { position: relative; min-height: 60px; grid-template-columns: 28px minmax(0, 1fr) 18px; gap: 8px; padding: 10px; border: 1px solid var(--menu-border); border-radius: 9px; background: var(--menu-surface); box-shadow: none; transform: none; }
html .share-popover[data-menu-ui] :is(.share-choice-card, .share-scope-card).selected { border-color: var(--menu-selected-border); background: var(--menu-selected); }
html .share-popover[data-menu-ui] :is(.share-choice-card, .share-scope-card):not(:has(input:disabled)):hover { border-color: var(--menu-hover-border); background: var(--menu-hover); }
html .share-popover[data-menu-ui] :is(.share-choice-card, .share-scope-card).selected:not(:has(input:disabled)):hover { background: var(--menu-selected-hover); }
html .share-popover[data-menu-ui] :is(.share-choice-card, .share-scope-card) strong { font-size: 12px; font-weight: 650; line-height: 1.35; overflow-wrap: anywhere; }
html .share-popover[data-menu-ui] :is(.share-choice-card, .share-scope-card) small { font-size: 11px; font-weight: 450; line-height: 1.4; }
html .share-popover[data-menu-ui] :is(.share-choice-icon, .share-scope-icon, .share-add-person-icon) { width: 28px; height: 28px; border-radius: 7px; color: var(--menu-accent); background: var(--menu-selected); }
html .share-popover[data-menu-ui] :is(.share-choice-card, .share-scope-card) > i { border: 1px solid var(--menu-border-strong); }
html .share-popover[data-menu-ui] :is(.share-choice-card, .share-scope-card).selected > i { border-color: var(--menu-primary); background: var(--menu-primary); color: white; }
html .share-popover[data-menu-ui] .share-scope-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
html .share-popover[data-menu-ui] .share-link-switch { position: relative; display: flex; flex: 0 0 auto; gap: 8px; min-height: 36px; }
html .share-popover[data-menu-ui] .share-link-switch > span { display: block; flex: 0 0 42px; width: 42px; height: 24px; border: 1px solid var(--menu-border-strong); background: var(--menu-subtle); transition: background-color 120ms ease, border-color 120ms ease; }
html .share-popover[data-menu-ui] .share-link-switch input:checked + span { border-color: var(--menu-primary); background: var(--menu-primary); }
html .share-popover[data-menu-ui] .share-link-switch > span::after { box-shadow: none; background: var(--menu-muted); }
html .share-popover[data-menu-ui] .share-link-switch input:checked + span::after { background: white; }
html .share-popover[data-menu-ui] .share-link-switch strong { font-size: 11px; font-weight: 650; }
html .share-popover[data-menu-ui] :is(.share-choice-card, .share-scope-card, .share-link-switch) > input { width: 1px; height: 1px; margin: 0; inset: 0 auto auto 0; }
html .share-popover[data-menu-ui] :is(.share-choice-card, .share-scope-card):has(input:focus-visible), html .share-popover[data-menu-ui] .share-link-switch:has(input:focus-visible) > span { outline: 2px solid var(--menu-accent); outline-offset: 2px; }
html .share-popover[data-menu-ui] .share-link-switch:has(input:disabled) { opacity: .55; cursor: not-allowed; }
html .share-popover[data-menu-ui] .share-add-person-card { grid-template-columns: minmax(0, 1fr) minmax(130px, .5fr) auto; border: 1px solid var(--menu-border); border-radius: 10px; padding: 12px; background: var(--menu-subtle); }
html .share-popover[data-menu-ui] .share-add-person-card.external { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
html .share-popover[data-menu-ui] .share-add-person-icon { display: none; }
html .share-popover[data-menu-ui] .share-add-person-card > :is(label, button) { grid-column: auto; }
html .share-popover[data-menu-ui] .share-add-person-card label > span { font-size: 11px; font-weight: 600; }
html .share-popover[data-menu-ui] .share-add-person-card :is(input, select, button), html .share-popover[data-menu-ui] .share-person-row select { font-size: 12px; font-weight: 500; }
html .share-popover[data-menu-ui] .share-person-row { border-color: var(--menu-border); border-radius: 9px; }
html .share-popover[data-menu-ui] .share-person-copy strong { font-size: 12px; font-weight: 650; }
html .share-popover[data-menu-ui] .share-person-copy span { font-size: 11px; font-weight: 450; white-space: normal; overflow-wrap: anywhere; }
html .share-popover[data-menu-ui] .share-people-empty { min-height: 110px; border-color: var(--menu-border-strong); border-radius: 9px; }
html .share-popover[data-menu-ui] .share-people-empty span { font-size: 11px; font-weight: 450; }
html .share-popover[data-menu-ui] .share-popover-footer { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 12px 16px; background: var(--menu-subtle); border-color: var(--menu-border); box-shadow: none; }
html .share-popover[data-menu-ui] .share-footer-status { grid-column: 1; grid-row: 1; }
html .share-popover[data-menu-ui] .share-footer-status strong { font-size: 12px; font-weight: 650; white-space: normal; overflow-wrap: anywhere; }
html .share-popover[data-menu-ui] .share-footer-status small { font-size: 11px; font-weight: 450; white-space: normal; }
html .share-popover[data-menu-ui] .share-footer-actions { grid-column: 2; grid-row: 1; display: flex; flex-wrap: wrap; gap: 8px; }
html .share-popover[data-menu-ui] .share-footer-actions :is(button, a) { font-size: 12px; font-weight: 650; min-height: 36px; height: auto; white-space: normal; }
html .share-popover[data-menu-ui] .share-footer-link { grid-column: 1 / -1; grid-row: 2; padding: 4px 8px; min-height: 38px; border: 1px solid var(--menu-border-strong); border-radius: 8px; background: var(--menu-surface); }
html .share-popover[data-menu-ui] .share-footer-link:not(.ready) { display: none; }
html .share-popover[data-menu-ui] .share-footer-link > input { font-size: 11px; font-weight: 450; border: 0; min-height: 28px; padding: 4px; }
@media (max-width: 720px) {
  html .share-popover[data-menu-ui] { width: 100%; max-height: calc(100dvh - 16px); }
  html .share-popover[data-menu-ui] .share-popover-head, html .share-popover[data-menu-ui] .share-popover-body { padding: 12px; }
  html .share-popover[data-menu-ui] .share-tabs { padding: 6px; }
  html .share-popover[data-menu-ui] .share-tabs button { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; gap: 4px; padding: 7px 5px; }
  html .share-popover[data-menu-ui] .share-tabs button :is(svg, em) { display: none; }
  html .share-popover[data-menu-ui] .share-hero-stats > div { padding: 6px 8px; flex-direction: column; align-items: flex-start; }
  html .share-popover[data-menu-ui] .share-choice-columns { grid-template-columns: minmax(0, 1fr); }
  html .share-popover[data-menu-ui] .share-add-person-card, html .share-popover[data-menu-ui] .share-add-person-card.external { grid-template-columns: minmax(0, 1fr); }
  html .share-popover[data-menu-ui] .share-popover-footer { padding: 10px 12px; }
}
@media (max-width: 480px) {
  html .share-popover[data-menu-ui] .share-hero-brand { grid-template-columns: minmax(0, 1fr); }
  html .share-popover[data-menu-ui] .share-hero-icon { display: none; }
  html .share-popover[data-menu-ui] .share-popover-head-actions { flex-direction: column-reverse; gap: 5px; }
  html .share-popover[data-menu-ui] .share-section-heading { flex-wrap: wrap; }
  html .share-popover[data-menu-ui] .share-scope-grid { grid-template-columns: minmax(0, 1fr); }
  html .share-popover[data-menu-ui] .share-footer-status { grid-column: 1 / -1; }
  html .share-popover[data-menu-ui] .share-footer-actions { grid-column: 1 / -1; grid-row: 3; }
  html .share-popover[data-menu-ui] .share-footer-actions > button { width: 100%; }
}
@media (pointer: coarse) {
  html .share-popover[data-menu-ui] :is(button, .share-link-switch, .share-footer-actions a) { min-height: 44px; }
}
@media (forced-colors: active) {
  html .share-popover[data-menu-ui] :is(.share-choice-card, .share-scope-card).selected { border: 2px solid Highlight; }
  html .share-popover[data-menu-ui] .share-link-switch input:checked + span { background: Highlight; forced-color-adjust: none; }
}
/* One quiet dismiss control throughout the app. Decoration preserves the
   original button, accessible name, action hooks and absolute positioning.
   A vector mask replaces font-dependent multiplication/cross glyphs. */
html button[data-menu-close], html [data-menu-ui] button[data-menu-close] {
  appearance: none !important; box-sizing: border-box !important;
  display: inline-grid !important; place-items: center !important;
  grid-template: 1fr / 1fr !important; flex: 0 0 auto !important;
  width: 32px !important; height: 32px !important;
  min-width: 32px !important; min-height: 32px !important;
  max-width: none !important; max-height: none !important;
  padding: 0 !important; gap: 0 !important; border: 1px solid transparent !important;
  border-radius: 8px !important; background: transparent !important;
  color: var(--menu-muted) !important; box-shadow: none !important;
  text-shadow: none !important; font-size: 0 !important; line-height: 1 !important;
  transform: none !important; cursor: pointer;
}
html button[data-menu-close] > * { display: none !important; }
html button[data-menu-close][hidden], html [data-menu-ui] button[data-menu-close][hidden] { display: none !important; }
html button[data-menu-close]::before {
  content: "" !important; display: block !important; position: static !important;
  grid-area: 1 / 1; width: 16px !important; height: 16px !important;
  padding: 0 !important; margin: 0 !important; border: 0 !important;
  background: currentColor !important; border-radius: 0 !important;
  transform: none !important; box-shadow: none !important; pointer-events: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 5l10 10M15 5L5 15' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 5l10 10M15 5L5 15' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
html button[data-menu-close]::after { content: none !important; }
html button[data-menu-close]:not(:disabled):hover, html [data-menu-ui] button[data-menu-close]:not(:disabled):hover {
  background: var(--menu-hover) !important; color: var(--menu-ink) !important; border-color: transparent !important;
}
html button[data-menu-close]:not(:disabled):active, html [data-menu-ui] button[data-menu-close]:not(:disabled):active { background: var(--menu-selected) !important; }
html button[data-menu-close]:focus, html [data-menu-ui] button[data-menu-close]:focus { outline: none !important; box-shadow: none !important; }
html button[data-menu-close]:focus-visible, html [data-menu-ui] button[data-menu-close]:focus-visible {
  outline: 2px solid var(--menu-accent) !important; outline-offset: -3px !important;
}
html button[data-menu-close]:disabled, html [data-menu-ui] button[data-menu-close]:disabled {
  opacity: .45; background: transparent !important; border-color: transparent !important; cursor: not-allowed;
}
@media (pointer: coarse) {
  html button[data-menu-close], html [data-menu-ui] button[data-menu-close] {
    width: 44px !important; height: 44px !important; min-width: 44px !important; min-height: 44px !important;
  }
  html button[data-menu-close]::before { width: 18px !important; height: 18px !important; }
}
@media (forced-colors: active) {
  html button[data-menu-close], html [data-menu-ui] button[data-menu-close] { color: ButtonText !important; }
  html button[data-menu-close]::before { forced-color-adjust: none; background: ButtonText !important; }
  html button[data-menu-close]:focus-visible, html [data-menu-ui] button[data-menu-close]:focus-visible { outline-color: Highlight !important; }
}
html .product-panel .demo-unit-heater-fan{margin:12px 0;padding:10px;border:1px solid var(--menu-border);border-radius:var(--menu-card-radius);background:var(--menu-subtle);color:var(--menu-ink)}
html .product-panel .demo-unit-heater-fan-heading{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:8px}
html .product-panel .demo-unit-heater-fan-heading strong{font-size:12px;font-weight:650}
html .product-panel .demo-unit-heater-fan-heading span{padding:2px 6px;border-radius:5px;background:var(--menu-selected);color:var(--menu-accent);font-size:10px;font-weight:600}
html .product-panel .demo-unit-heater-fan .field{margin:0;font-size:12px;font-weight:600}
html .product-panel .demo-unit-heater-fan select{width:100%;min-height:36px;font-size:12px;font-weight:600}
html .product-panel .demo-unit-heater-fan dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:10px 0}
html .product-panel .demo-unit-heater-fan dl div{display:block;min-width:0}
html .product-panel .demo-unit-heater-fan dt{font-size:10px;color:var(--menu-muted)}
html .product-panel .demo-unit-heater-fan dd{margin:3px 0 0;font-size:13px;font-weight:650;color:var(--menu-ink);white-space:nowrap}
html .product-panel .demo-unit-heater-fan p{margin:0;font-size:11px;font-weight:400;line-height:1.5;color:var(--menu-muted);overflow-wrap:anywhere}
@media(pointer:coarse){html .product-panel .demo-unit-heater-fan select{min-height:44px;font-size:16px}}

/* Project actions are one menu, not a stack of separate control buttons. */
html .dashboard-project-action-menu[data-menu-ui] {
  min-width: 218px;
  max-width: calc(100vw - 24px);
  padding: 5px;
  gap: 0;
  border: 1px solid var(--menu-border);
  border-radius: 12px;
  background: var(--menu-surface);
  box-shadow: var(--menu-shadow);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
html .dashboard-project-action-menu[data-menu-ui] button[role="menuitem"] {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 39px;
  padding: 9px 12px;
  border: 0 !important;
  border-radius: 7px !important;
  background: transparent !important;
  color: var(--menu-ink) !important;
  box-shadow: none !important;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.25;
  text-align: left;
  transform: none !important;
}
html .dashboard-project-action-menu[data-menu-ui] button[role="menuitem"]:hover,
html .dashboard-project-action-menu[data-menu-ui] button[role="menuitem"]:focus-visible {
  background: var(--menu-hover) !important;
  filter: none;
}
html .dashboard-project-action-menu[data-menu-ui] button.danger[role="menuitem"] {
  color: var(--menu-danger) !important;
}
html .dashboard-project-action-menu[data-menu-ui] button.danger[role="menuitem"]:hover,
html .dashboard-project-action-menu[data-menu-ui] button.danger[role="menuitem"]:focus-visible {
  background: var(--menu-danger-soft) !important;
}
html [data-menu-ui] .dashboard-project-menu-divider {
  display: block;
  height: 1px;
  margin: 5px 7px;
  background: var(--menu-border);
}
@media (pointer: coarse) {
  html .dashboard-project-action-menu[data-menu-ui] button[role="menuitem"] { min-height: 44px; }
}

/* The text wordmark is navigation, not a pill-shaped toolbar control. */
html [data-menu-ui] .brand-menu-button {
  min-width: 0;
  padding: 0;
  border-color: transparent !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
html [data-menu-ui] .brand-menu-button .brand-logo-wordmark {
  width: auto;
  min-width: 0;
}
html [data-menu-ui] .brand-menu-button:hover,
html [data-menu-ui] .brand-menu-button.active {
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
  filter: brightness(1.08);
  transform: none;
}
html [data-menu-ui] .brand-menu-button:focus-visible {
  outline: 2px solid var(--menu-accent) !important;
  outline-offset: 3px;
  border-radius: 4px !important;
}

/* Menu typography and text fit. These roles apply only to the audited HTML UI,
   not SVG labels, drawing sheets, reports or numeric table alignment. Legacy
   locked-floor rules otherwise give prose, labels and headings the same weight.
   Only conflicting type/fit properties are important; layout ownership stays
   with each native panel. Native selects remain single-line controls. */
:root {
  --menu-title-size: 15px;
  --menu-title-weight: 700;
  --menu-section-size: 13px;
  --menu-section-weight: 650;
  --menu-body-size: 12px;
  --menu-body-weight: 500;
  --menu-help-size: 11px;
  --menu-help-weight: 500;
  --menu-label-size: 12px;
  --menu-label-weight: 600;
  --menu-metric-size: 13px;
  --menu-metric-weight: 650;
}
html [data-menu-ui] :is(.panel-head, .project-settings-head, .export-popover-head,
  .product-library-head, .account-menu-head, .history-popover-head, .share-popover-head) :is(h2, h3),
html [data-menu-ui] :is(.panel-head, .project-settings-head, .export-popover-head,
  .product-library-head, .account-menu-head, .history-popover-head, .share-popover-head) > strong,
html [data-menu-ui] :is(.panel-head, .project-settings-head, .export-popover-head,
  .product-library-head, .account-menu-head, .history-popover-head, .share-popover-head) > div > strong {
  min-width: 0; max-width: 100%; margin-block: 0;
  font-size: var(--menu-title-size) !important; font-weight: var(--menu-title-weight) !important;
  line-height: 1.4 !important; text-align: left; text-transform: none !important;
  white-space: normal !important; overflow: visible !important; text-overflow: clip !important;
  overflow-wrap: anywhere;
}
/* Catalogue descriptions/editor content keep their authored type hierarchy;
   they are publication content, not menu help text. */
html [data-menu-ui] :is(h3, h4, legend):not(:where(.product-rich-description-body *, .dashboard-product-rich-surface *)) {
  min-width: 0; font-size: var(--menu-section-size); font-weight: var(--menu-section-weight);
  line-height: 1.4; white-space: normal; overflow-wrap: anywhere;
}
html [data-menu-ui] :is(p, .field-note, .settings-help, .settings-note):not(:where(.product-rich-description-body *, .dashboard-product-rich-surface *)) {
  min-width: 0; max-width: 100%; font-size: var(--menu-body-size) !important;
  font-weight: var(--menu-body-weight) !important; line-height: 1.5 !important;
  text-align: left; white-space: normal !important; overflow-wrap: anywhere;
}
html [data-menu-ui] :is(.field, .settings-field) {
  min-width: 0; max-width: 100%; box-sizing: border-box;
  font-size: var(--menu-label-size) !important; font-weight: var(--menu-label-weight) !important;
  line-height: 1.4 !important; text-align: left; white-space: normal; overflow-wrap: anywhere;
}
html [data-menu-ui] :is(.field, .settings-field) small,
html [data-menu-ui] :is(.product-selection-card, .valve-selection-card, .schematic-model-hero) > :is(small, em),
html [data-menu-ui] .schematic-model-hero > div > :is(small, em),
html [data-menu-ui] :is(.project-settings-head, .export-popover-head, .account-menu-head,
  .product-library-head, .history-popover-head, .share-popover-head) > div > span {
  min-width: 0; max-width: 100%; font-size: var(--menu-help-size) !important;
  font-weight: var(--menu-help-weight) !important; line-height: 1.5 !important;
  white-space: normal !important; text-align: left; overflow-wrap: anywhere;
}
html [data-menu-ui] :is(.product-selection-card, .valve-selection-card, .schematic-model-hero) > strong,
html [data-menu-ui] .schematic-model-hero > div > strong {
  min-width: 0; max-width: 100%; font-size: var(--menu-section-size) !important;
  font-weight: var(--menu-section-weight) !important; line-height: 1.4 !important;
  text-align: left; white-space: normal !important; overflow: visible !important;
  text-overflow: clip !important; overflow-wrap: anywhere;
}
html [data-menu-ui] .product-selection-eyebrow {
  min-width: 0; max-width: none; font-size: var(--menu-help-size) !important;
  font-weight: var(--menu-section-weight) !important; line-height: 1.4 !important;
  color: var(--menu-accent) !important; background: var(--menu-subtle) !important;
  border-color: var(--menu-border) !important; box-shadow: none !important;
  white-space: normal !important; overflow: visible !important; text-overflow: clip !important;
  text-align: left; overflow-wrap: anywhere;
}
html [data-menu-ui] :is(.field, .settings-field) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="hidden"]):not([type="file"]), select, textarea) {
  box-sizing: border-box; min-width: 0; max-width: 100%; width: 100%;
  font-size: var(--menu-body-size) !important; font-weight: var(--menu-label-weight) !important;
  line-height: 1.4 !important;
}
html [data-menu-ui] :is(.field, .settings-field) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="hidden"]):not([type="file"]), select) {
  height: auto !important; min-height: 36px;
}
html [data-menu-ui] :is(.field, .settings-field) select {
  white-space: nowrap !important; text-overflow: ellipsis;
  padding-right: 34px !important;
}
html [data-menu-ui] :is(.product-selection-facts, .pipe-selection-facts, .zone-node-facts, .schematic-model-facts) > div {
  min-width: 0; max-width: 100%; align-items: start;
}
html [data-menu-ui] :is(.product-selection-facts, .pipe-selection-facts, .zone-node-facts, .schematic-model-facts) dt {
  min-width: 0; font-size: var(--menu-help-size) !important; font-weight: var(--menu-help-weight) !important;
  line-height: 1.4 !important; color: var(--menu-muted); text-align: left;
  white-space: normal !important; overflow-wrap: anywhere;
}
html [data-menu-ui] :is(.product-selection-facts, .pipe-selection-facts, .zone-node-facts, .schematic-model-facts) dd {
  min-width: 0; margin: 0; font-size: var(--menu-metric-size) !important;
  font-weight: var(--menu-metric-weight) !important; line-height: 1.4 !important;
  text-align: left; white-space: normal !important; overflow-wrap: anywhere;
}
html [data-menu-ui] :is(.pipe-compatibility-warning, .zone-inline-warning) {
  align-items: start; min-width: 0; max-width: 100%; box-sizing: border-box;
}
html [data-menu-ui] :is(.pipe-compatibility-warning, .zone-inline-warning):has(> svg) {
  display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 8px;
}
/* Occupant warnings use a 28px badge wrapper, not a direct SVG. Retain that
   icon's column and keep typography rules on the adjacent copy only. */
html [data-menu-ui] :is(.pipe-compatibility-warning, .zone-inline-warning):has(> .zone-inline-warning-icon) {
  display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 8px;
}
html [data-menu-ui] :is(.pipe-compatibility-warning, .zone-inline-warning) > span:not(.zone-inline-warning-icon) {
  display: grid; gap: 5px; min-width: 0; text-align: left; overflow-wrap: anywhere;
}
html [data-menu-ui] :is(.pipe-compatibility-warning, .zone-inline-warning) strong {
  font-size: var(--menu-body-size) !important; font-weight: var(--menu-section-weight) !important;
  line-height: 1.4 !important; white-space: normal !important;
}
html [data-menu-ui] :is(.pipe-compatibility-warning, .zone-inline-warning) small {
  color: inherit !important; font-size: var(--menu-help-size) !important;
  font-weight: var(--menu-help-weight) !important; line-height: 1.5 !important;
  white-space: normal !important; overflow-wrap: anywhere;
}
html [data-menu-ui] :is(.pipe-compatibility-warning, .zone-inline-warning) > svg {
  width: 18px; height: 18px; margin-top: 1px;
}
html [data-menu-ui] .pipe-panel-actions.top-actions {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 120px), 1fr)) !important;
  gap: 8px !important; padding: 0 !important; border: 0 !important; background: transparent !important;
  box-shadow: none !important;
}
html [data-menu-ui] .pipe-panel-actions.top-actions .danger-btn { grid-column: 1 / -1; }
html [data-menu-ui] :is(.primary-mini, .secondary-mini, .settings-mini-btn,
  .primary-btn, .secondary-btn, .danger-btn):not([data-menu-close]):not(.tool-btn) {
  min-width: 0; max-width: 100%; height: auto !important;
  font-size: var(--menu-body-size); font-weight: var(--menu-label-weight) !important;
  line-height: 1.4 !important; white-space: normal !important; overflow-wrap: anywhere;
}
/* Touch fields remain readable and prevent browser auto-zoom. Do not shrink
   icon-only chrome or replace native selected-value/description semantics. */
@media (max-width: 759px), (pointer: coarse) {
  html [data-menu-ui] :is(.field, .settings-field) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="hidden"]):not([type="file"]), select, textarea) {
    font-size: 16px !important; min-height: 44px;
  }
  html [data-menu-ui] .pipe-panel-actions.top-actions button { min-height: 44px; }
}
