:root {
  color-scheme: dark;
  --app-bg: #0c0f13;
  --panel-bg: linear-gradient(180deg, rgba(25, 31, 41, 0.98) 0%, rgba(18, 23, 31, 0.96) 100%);
  --panel-border: rgba(133, 151, 176, 0.28);
  --panel-shadow: 0 20px 50px rgba(0, 0, 0, 0.34);
  --topbar-pill-bg: linear-gradient(180deg, rgba(31, 43, 57, 0.94) 0%, rgba(17, 25, 34, 0.94) 100%);
  --ribbon-row-bg: rgba(30, 40, 53, 0.2);
  --ribbon-row-border: rgba(139, 158, 182, 0.24);
  --ribbon-row-radius: 0;
  --ribbon-action-height: 30px;
  --wall-top-btn-height: 30px;
  --wall-top-btn-line-height: 1;
  --wall-top-btn-border-width: 1px;
  --wall-top-icon-size: 20px;
  --ribbon-action-icon-size: 16px;
  --ribbon-action-radius: 14px;
  --ribbon-action-padding-x: 12px;
  --ribbon-action-cluster-gap: 10px;
  --ribbon-action-group-gap: 24px;
  --ribbon-action-bg: linear-gradient(180deg, #6f8096 0%, #5e7187 52%, #55677d 100%);
  --ribbon-action-bg-hover: linear-gradient(180deg, #7b8ca2 0%, #66798f 52%, #5a6d83 100%);
  --ribbon-action-bg-active: linear-gradient(180deg, #586a80 0%, #4f6075 100%);
  --ribbon-action-bg-disabled: linear-gradient(180deg, rgba(98, 114, 134, 0.68) 0%, rgba(80, 96, 115, 0.7) 100%);
  --ribbon-action-border: rgba(210, 222, 236, 0.34);
  --ribbon-action-border-hover: rgba(228, 236, 246, 0.48);
  --ribbon-action-border-active: rgba(184, 199, 217, 0.44);
  --ribbon-action-surface-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(18, 28, 41, 0.28),
    0 1px 2px rgba(0, 0, 0, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.04);
  --ribbon-action-surface-shadow-hover:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    inset 0 -1px 0 rgba(18, 28, 41, 0.3),
    0 3px 10px rgba(16, 24, 36, 0.16),
    0 0 10px rgba(255, 255, 255, 0.06);
  --ribbon-action-surface-shadow-active:
    inset 0 1px 2px rgba(0, 0, 0, 0.18),
    inset 0 -1px 0 rgba(255, 255, 255, 0.05);
  --ribbon-action-primary-bg: rgba(69, 87, 109, 0.95);
  --ribbon-action-primary-bg-hover: rgba(79, 99, 123, 0.98);
  --ribbon-action-primary-border: rgba(194, 214, 236, 0.58);
  --ribbon-action-primary-border-hover: rgba(208, 226, 245, 0.64);
  --ribbon-action-text: #f1f7ff;
  --ribbon-action-text-muted: #eef4fb;
  --ribbon-save-bg: #242931;
  --ribbon-save-bg-hover: linear-gradient(180deg, #8a6f37 0%, #77602f 48%, #664f27 100%);
  --ribbon-save-bg-active: linear-gradient(180deg, #6a5529 0%, #594723 100%);
  --ribbon-save-border: rgba(214, 165, 73, 0.55);
  --ribbon-save-border-hover: rgba(228, 184, 104, 0.66);
  --ribbon-save-border-active: rgba(189, 146, 67, 0.62);
  --ribbon-save-text: var(--ribbon-action-text-muted);
  --ribbon-save-dirty-bg: rgba(92, 76, 49, 0.92);
  --ribbon-save-dirty-border: rgba(194, 156, 86, 0.55);
  --ribbon-save-dirty-text: var(--ribbon-save-text);
  --ribbon-save-icon-chip-bg: linear-gradient(180deg, #495a70 0%, #3e4d61 100%);
  --ribbon-save-icon-chip-bg-hover: linear-gradient(180deg, #556982 0%, #475a71 100%);
  --ribbon-save-icon-chip-border: rgba(214, 223, 235, 0.24);
  --ribbon-save-icon-chip-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 0 8px rgba(255, 255, 255, 0.04);
  --top-control-edge-border: rgba(255, 255, 255, 0.56);
  --top-control-edge-shadow:
    0 0 8px rgba(255, 255, 255, 0.16),
    0 0 18px rgba(255, 255, 255, 0.07);
  --top-control-radius: 10px;
  --text-main: #d9e3f0;
  --text-muted: #8ea0b7;
  --text-dim: #708096;
  --accent: #67c6ff;
  --code-bg: #081018;
  --code-text: #d5e8ff;
  --green: #59ff94;
  --amber: #ffc45d;
  --red: #ff687a;
  --grey: #6f7b8a;
  --hub-modal-overlay-z: 70;
  --hub-modal-overlay-padding: 32px;
  --hub-modal-default-width: min(980px, 92vw);
  --hub-modal-default-height: min(720px, 82vh);
  --hub-modal-default-padding: 18px;
  --hub-modal-frame-radius: 18px;
  --hub-modal-frame-border: 1px solid rgba(144, 166, 192, 0.24);
  --hub-modal-frame-background: linear-gradient(180deg, rgba(10, 14, 20, 0.99) 0%, rgba(6, 9, 14, 0.98) 100%);
  --hub-modal-frame-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 22px 48px rgba(0, 0, 0, 0.44);
  --admin-surface-shell: linear-gradient(180deg, rgba(42, 53, 69, 0.985) 0%, rgba(26, 35, 47, 0.975) 100%);
  --admin-surface-card: linear-gradient(180deg, rgba(78, 95, 118, 0.3) 0%, rgba(49, 63, 82, 0.9) 100%);
  --admin-surface-card-strong: linear-gradient(180deg, rgba(104, 125, 152, 0.34) 0%, rgba(58, 74, 95, 0.94) 100%);
  --admin-input-bg: linear-gradient(180deg, rgba(96, 118, 144, 0.26) 0%, rgba(55, 70, 89, 0.96) 100%);
  --admin-border: rgba(177, 199, 225, 0.28);
  --admin-border-strong: rgba(195, 214, 236, 0.4);
  --admin-text-main: #f3f8ff;
  --admin-text-muted: rgba(224, 234, 247, 0.8);
  --admin-text-soft: rgba(205, 220, 238, 0.68);
  --admin-button-bg: linear-gradient(180deg, rgba(126, 147, 175, 0.26) 0%, rgba(73, 89, 112, 0.95) 100%);
  --admin-button-bg-hover: linear-gradient(180deg, rgba(145, 168, 198, 0.34) 0%, rgba(83, 101, 126, 0.98) 100%);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }

body {
  background:
    radial-gradient(circle at top left, rgba(103, 198, 255, 0.08), transparent 25%),
    radial-gradient(circle at top right, rgba(255, 196, 93, 0.05), transparent 22%),
    linear-gradient(180deg, #0d1118 0%, var(--app-bg) 100%);
  color: var(--text-main);
  font-family: "Bahnschrift", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

button, input, select, textarea { font: inherit; }
code, pre { font-family: Consolas, "Courier New", monospace; }

.host-ribbon {
  position: sticky;
  top: 0;
  z-index: 1200;
  border-bottom: 1px solid #d6dde6;
  background: #eceff4;
}

.host-ribbon__inner {
  width: 100%;
  margin: 0;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.host-ribbon__meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  color: #4e5f77;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.host-ribbon__brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #20324d;
}

.host-ribbon__help {
  appearance: none;
  border: 0;
  background: transparent;
  color: #f97316;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.host-ribbon__headline {
  color: #4e6283;
  letter-spacing: 0.18em;
}

.host-ribbon__availability {
  appearance: none;
  border: 0;
  background: transparent;
  color: #1f2937;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: normal;
  text-transform: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 0;
}

.host-ribbon__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #f97316;
}

.host-ribbon__actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.host-ribbon__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: #1f2f47;
  font-size: 0.98rem;
  font-weight: 700;
  text-decoration: none;
  line-height: 1;
  transition: opacity 120ms ease;
  cursor: pointer;
}

.host-ribbon__link:hover,
.host-ribbon__link:focus-visible {
  opacity: 0.82;
}

.host-ribbon__link:focus-visible {
  outline: 2px solid rgba(30, 64, 175, 0.25);
  outline-offset: 2px;
}

.host-ribbon__link--primary {
  min-height: 40px;
  padding: 0 22px;
  border-radius: 999px;
  background: linear-gradient(180deg, #2f8fbb 0%, #1f6f98 100%);
  color: #eaf6ff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 1px 2px rgba(10, 36, 56, 0.32);
}

.host-ribbon__link--locked {
  color: #1f2f47;
  opacity: 0.94;
  cursor: not-allowed;
}

.host-ribbon__link i,
.host-ribbon__availability i {
  font-size: 0.98rem;
}

.host-ribbon-modal {
  position: fixed;
  inset: 0;
  z-index: 1300;
  background: rgba(255, 255, 255, 0.98);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.host-ribbon-modal[hidden] {
  display: none !important;
}

.host-ribbon-modal__close {
  position: absolute;
  right: 20px;
  top: 20px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  width: 40px;
  height: 40px;
  font-size: 22px;
  cursor: pointer;
}

.host-ribbon-modal__body {
  text-align: center;
}

.host-ribbon-modal__kicker {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #64748b;
}

.host-ribbon-modal__copy {
  margin: 10px 0 0;
  font-size: 1.05rem;
  color: #0f172a;
  font-weight: 700;
}

.fullscreen-launch-gate {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 15% 15%, rgba(47, 143, 187, 0.2), transparent 35%),
    radial-gradient(circle at 82% 8%, rgba(249, 115, 22, 0.18), transparent 30%),
    linear-gradient(180deg, rgba(7, 11, 18, 0.95) 0%, rgba(8, 13, 22, 0.97) 100%);
}

.fullscreen-launch-gate[hidden] {
  display: none !important;
}

.fullscreen-launch-gate__panel {
  width: min(720px, 96vw);
  border-radius: 20px;
  border: 1px solid rgba(138, 167, 196, 0.35);
  background: linear-gradient(180deg, rgba(16, 24, 36, 0.95) 0%, rgba(10, 16, 26, 0.96) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 20px 56px rgba(0, 0, 0, 0.5);
  padding: 28px;
  color: #e8f1fb;
}

.fullscreen-launch-gate__eyebrow {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #95aac3;
}

.fullscreen-launch-gate__title {
  margin: 14px 0 0;
  font-size: clamp(1.6rem, 2vw + 1rem, 2.4rem);
  line-height: 1.2;
  color: #ffffff;
}

.fullscreen-launch-gate__copy {
  margin: 10px 0 0;
  font-size: 1rem;
  line-height: 1.6;
  color: #c9d8ea;
}

.fullscreen-launch-gate__actions {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.fullscreen-launch-gate__primary,
.fullscreen-launch-gate__secondary {
  border-radius: 999px;
  min-height: 44px;
  padding: 0 22px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

.fullscreen-launch-gate__primary {
  border: 1px solid rgba(123, 191, 228, 0.56);
  background: linear-gradient(180deg, #2f8fbb 0%, #1f6f98 100%);
  color: #ecf8ff;
}

.fullscreen-launch-gate__secondary {
  border: 1px solid rgba(148, 170, 194, 0.5);
  background: rgba(16, 24, 36, 0.45);
  color: #d8e6f6;
}

.app-shell {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 12px 6px 0 8px;
  --workspace-shell-bg: transparent;
  --workspace-shell-shadow: 0 0 0 rgba(0, 0, 0, 0);
  --workspace-topbar-bg:
    radial-gradient(circle at 18% 0%, rgba(120, 174, 226, 0.08), transparent 28%),
    radial-gradient(circle at 82% 2%, rgba(139, 198, 255, 0.05), transparent 24%),
    linear-gradient(180deg, rgba(24, 33, 45, 0.9) 0%, rgba(13, 19, 27, 0.84) 100%);
  --workspace-topbar-border: rgba(138, 160, 186, 0.2);
  --workspace-topbar-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 14px 24px rgba(164, 205, 247, 0.02),
    0 12px 22px rgba(0, 0, 0, 0.16);
  --workspace-project-bar-bg:
    radial-gradient(circle at 16% 0%, rgba(120, 174, 226, 0.05), transparent 24%),
    linear-gradient(180deg, rgba(22, 30, 41, 0.88) 0%, rgba(12, 17, 24, 0.82) 100%);
  --workspace-project-bar-border: rgba(138, 160, 186, 0.18);
  --workspace-project-bar-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 12px 20px rgba(164, 205, 247, 0.015),
    0 14px 26px rgba(0, 0, 0, 0.18);
  --workspace-schematic-shell-bg: linear-gradient(180deg, rgba(22, 29, 38, 0.985) 0%, rgba(10, 14, 20, 0.97) 100%);
  --workspace-schematic-shell-border: rgba(145, 163, 186, 0.18);
  --workspace-schematic-shell-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 26px 46px rgba(0, 0, 0, 0.28);
  --workspace-schematic-heading-bg: transparent;
  --workspace-schematic-heading-border: rgba(0, 0, 0, 0);
  --workspace-schematic-heading-shadow: 0 0 0 rgba(0, 0, 0, 0);
  --workspace-schematic-heading-copy-color: rgba(181, 196, 215, 0.76);
  background: var(--workspace-shell-bg);
  box-shadow: var(--workspace-shell-shadow);
  border-radius: 0;
}

body.is-focus-fullscreen {
  overflow: hidden;
  overscroll-behavior: none;
}

body.is-focus-fullscreen .app-shell {
  padding: 6px 6px 0;
  min-height: 100svh;
}

body.is-focus-fullscreen .schematic-shell {
  padding: 6px 0 0;
}

body.is-focus-fullscreen .schematic-shell > .section-heading {
  padding: 6px 6px 8px;
}

body.is-focus-fullscreen .schematic-shell > .section-heading .schematic-primary-col {
  display: none;
}

body.is-focus-fullscreen .schematic-shell > .section-heading .schematic-command-row > .schematic-utility-col {
  width: 100%;
  max-width: none;
}

body.is-focus-fullscreen .schematic-shell > .section-heading .schematic-menu-group--utility,
body.is-focus-fullscreen .schematic-shell > .section-heading .schematic-menu-group--utility .schematic-menu-cluster--utility {
  width: 100%;
  justify-content: flex-end;
}

body.is-focus-fullscreen .schematic-board {
  min-height: calc(100svh - 72px);
  height: calc(100svh - 72px);
}

@supports not (height: 100svh) {
  body.is-focus-fullscreen .app-shell {
    min-height: 100vh;
  }

  body.is-focus-fullscreen .schematic-board {
    min-height: calc(100vh - 72px);
    height: calc(100vh - 72px);
  }
}

.app-shell[data-wall-colour-mode="light"] {
  --workspace-shell-bg:
    linear-gradient(180deg, rgba(251, 252, 254, 0.985) 0%, rgba(247, 249, 252, 0.975) 100%);
  --workspace-shell-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    0 18px 30px rgba(63, 93, 126, 0.05);
  --workspace-topbar-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(251, 252, 254, 0.98) 100%);
  --workspace-topbar-border: rgba(215, 224, 234, 0.92);
  --workspace-topbar-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.99),
    0 10px 16px rgba(74, 105, 138, 0.05);
  --workspace-project-bar-bg: linear-gradient(180deg, rgba(251, 252, 254, 0.99) 0%, rgba(247, 249, 252, 0.98) 100%);
  --workspace-project-bar-border: rgba(227, 233, 240, 0.94);
  --workspace-project-bar-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.99),
    0 10px 18px rgba(74, 105, 138, 0.05);
  --workspace-schematic-shell-bg: linear-gradient(180deg, rgba(251, 252, 254, 0.995) 0%, rgba(247, 249, 252, 0.985) 100%);
  --workspace-schematic-shell-border: rgba(227, 233, 240, 0.94);
  --workspace-schematic-shell-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.99),
    0 16px 28px rgba(74, 105, 138, 0.05);
  --workspace-schematic-heading-bg: linear-gradient(180deg, rgba(251, 252, 254, 0.99) 0%, rgba(247, 249, 252, 0.98) 100%);
  --workspace-schematic-heading-border: rgba(215, 224, 234, 0.92);
  --workspace-schematic-heading-shadow: 0 8px 14px rgba(74, 105, 138, 0.05);
  --workspace-schematic-heading-copy-color: #5a6b7f;
  --ribbon-row-bg: rgba(251, 252, 254, 0.9);
  --ribbon-row-border: rgba(227, 233, 240, 0.9);
  --ribbon-action-bg: linear-gradient(180deg, #7d8ea3 0%, #6c7f95 52%, #617388 100%);
  --ribbon-action-bg-hover: linear-gradient(180deg, #8799ae 0%, #74889f 52%, #677b92 100%);
  --ribbon-action-bg-active: linear-gradient(180deg, #64778d 0%, #586a80 100%);
  --ribbon-action-bg-disabled: linear-gradient(180deg, rgba(132, 147, 166, 0.64) 0%, rgba(110, 126, 145, 0.68) 100%);
  --ribbon-action-border: rgba(213, 225, 238, 0.56);
  --ribbon-action-border-hover: rgba(228, 237, 248, 0.68);
  --ribbon-action-border-active: rgba(187, 202, 219, 0.62);
  --ribbon-action-surface-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    inset 0 -1px 0 rgba(18, 28, 41, 0.26),
    0 1px 2px rgba(54, 78, 105, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.08);
  --ribbon-action-surface-shadow-hover:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -1px 0 rgba(18, 28, 41, 0.28),
    0 3px 10px rgba(36, 58, 84, 0.18),
    0 0 10px rgba(255, 255, 255, 0.08);
  --ribbon-action-surface-shadow-active:
    inset 0 1px 2px rgba(0, 0, 0, 0.2),
    inset 0 -1px 0 rgba(255, 255, 255, 0.08);
  --ribbon-action-primary-bg: linear-gradient(180deg, rgba(251, 252, 254, 0.995) 0%, rgba(247, 249, 252, 0.995) 100%);
  --ribbon-action-primary-bg-hover: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(251, 252, 254, 1) 100%);
  --ribbon-action-primary-border: rgba(215, 224, 234, 0.96);
  --ribbon-action-primary-border-hover: rgba(227, 233, 240, 1);
  --ribbon-action-text: #233246;
  --ribbon-action-text-muted: #eef4fb;
  --ribbon-save-bg: #242931;
  --ribbon-save-bg-hover: linear-gradient(180deg, #997c3f 0%, #856935 48%, #735c2d 100%);
  --ribbon-save-bg-active: linear-gradient(180deg, #755d2e 0%, #654f28 100%);
  --ribbon-save-border: rgba(206, 162, 84, 0.68);
  --ribbon-save-border-hover: rgba(224, 184, 112, 0.76);
  --ribbon-save-border-active: rgba(184, 144, 72, 0.74);
  --ribbon-save-text: #f2f8ff;
  --ribbon-save-dirty-bg: linear-gradient(180deg, rgba(94, 112, 135, 0.95) 0%, rgba(62, 79, 100, 0.97) 100%);
  --ribbon-save-dirty-border: rgba(214, 154, 66, 0.62);
  --ribbon-save-dirty-text: #f2f8ff;
  --ribbon-save-icon-chip-bg: linear-gradient(180deg, #52667f 0%, #44576d 100%);
  --ribbon-save-icon-chip-bg-hover: linear-gradient(180deg, #5f7591 0%, #50657e 100%);
  --ribbon-save-icon-chip-border: rgba(222, 232, 244, 0.32);
  --text-main: #233246;
  --text-muted: #5a6b7f;
  --text-dim: #74869a;
}

.app-shell[data-wall-colour-mode="light"] .project-manager-bar .project-manager-label {
  color: #5a6b7f;
}

.app-shell[data-wall-colour-mode="light"] .project-manager-project--topbar .project-manager-label {
  color: #5a6b7f;
}

.app-shell[data-wall-colour-mode="light"] .project-manager-bar .project-manager-divider {
  background: rgba(215, 224, 234, 0.92);
}

.app-shell[data-wall-colour-mode="light"] .project-manager-project select,
.app-shell[data-wall-colour-mode="light"] .project-manager-git select,
.app-shell[data-wall-colour-mode="light"] .project-manager-framework select,
.app-shell[data-wall-colour-mode="light"] .project-manager-user select,
.app-shell[data-wall-colour-mode="light"] .project-manager-static-value {
  color: #dfe8f4;
  -webkit-text-fill-color: #dfe8f4;
}

.app-shell[data-wall-colour-mode="light"] .project-manager-project select:disabled,
.app-shell[data-wall-colour-mode="light"] .project-manager-git select:disabled,
.app-shell[data-wall-colour-mode="light"] .project-manager-framework select:disabled,
.app-shell[data-wall-colour-mode="light"] .project-manager-user select:disabled {
  opacity: 1;
  color: #dfe8f4;
  -webkit-text-fill-color: #dfe8f4;
}

.app-shell[data-wall-colour-mode="light"] .project-manager-git select.is-yes,
.app-shell[data-wall-colour-mode="light"] .project-manager-git select.is-yes:disabled {
  color: var(--green);
  -webkit-text-fill-color: var(--green);
}

.app-shell[data-wall-colour-mode="light"] .project-scout-status {
  border-color: rgba(205, 216, 228, 0.9);
  background: linear-gradient(180deg, rgba(251, 253, 255, 0.98) 0%, rgba(245, 249, 253, 0.98) 100%);
  color: #294864;
}

.app-shell[data-wall-colour-mode="light"] .project-scout-report-button {
  border-color: rgba(131, 154, 181, 0.22);
  background: linear-gradient(180deg, rgba(46, 58, 76, 0.92) 0%, rgba(28, 37, 49, 0.92) 100%);
  color: var(--text-main);
}

.top-chrome-section[hidden] { display: none; }
.topbar {
  display: block;
  padding: 14px 18px;
  margin-top: -2px;
  margin-bottom: 14px;
  position: relative;
  border-radius: 0;
  background: var(--workspace-topbar-bg);
  box-shadow:
    inset 0 0 0 1px var(--workspace-topbar-border),
    var(--workspace-topbar-shadow);
}

.topbar-grid-row,
.project-manager-grid-row,
.schematic-command-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  --bs-gutter-x: 18px;
  --bs-gutter-y: 12px;
  margin: 0;
  padding-left: 8px;
  padding-right: 6px;
}

@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) and (hover: none) and (pointer: coarse) {
  .topbar-grid-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "project project"
      "wall status";
    column-gap: 10px;
    row-gap: 10px;
    align-items: center;
  }

  .topbar-project-col {
    grid-area: project;
    width: 100%;
    max-width: none;
    flex: none;
  }

  .topbar-project-col .project-manager-item {
    width: 100%;
  }

  .project-manager-project--topbar {
    width: 100%;
    max-width: none;
  }

  .project-manager-project--topbar select,
  .project-manager-project--topbar .project-manager-static-value {
    width: 100%;
    max-width: none;
    min-width: 0;
  }

  .topbar-wall-col {
    grid-area: wall;
    width: auto;
    max-width: none;
    flex: none;
    justify-self: start;
    justify-content: flex-start;
  }

  .topbar-wall-col .wall-colour-control--topbar {
    margin-left: 0;
  }

  .topbar-status-col {
    grid-area: status;
    width: auto;
    max-width: none;
    flex: none;
    margin-left: 0;
    justify-self: end;
  }

  .topbar-status-wrap {
    width: auto;
    justify-content: flex-end;
  }

  .status-chip-row {
    gap: 8px;
    flex-wrap: nowrap;
  }

  .project-manager-grid-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 34%);
    grid-template-areas:
      "framework framework"
      "git users";
    column-gap: 12px;
    row-gap: 10px;
    align-items: start;
  }

  .project-manager-grid-row > :nth-child(1) {
    grid-area: framework;
    width: 100%;
    max-width: none;
  }

  .project-manager-grid-row > :nth-child(2) {
    grid-area: git;
    width: 100%;
    max-width: none;
  }

  .project-manager-grid-row > :nth-child(3) {
    grid-area: users;
    width: 100%;
    max-width: none;
    margin-left: 0;
  }

  .project-manager-framework,
  .project-manager-git,
  .project-manager-user,
  .project-manager-user-cluster {
    flex: none;
  }

  .project-manager-framework select,
  .project-manager-git select,
  .project-manager-user select {
    width: 100%;
    max-width: none;
  }

  .project-manager-user-cluster {
    margin-left: 0;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
  }

  .project-manager-users-wrap {
    margin-right: 0;
    flex: 0 0 auto;
    justify-content: flex-start;
  }

  .project-manager-user-cluster .project-manager-user {
    flex: 1 1 auto;
    min-width: 0;
  }

  .schematic-shell > .section-heading .schematic-command-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "utility"
      "primary";
    row-gap: 8px;
    align-items: center;
  }

  .schematic-shell > .section-heading .schematic-command-row > .schematic-primary-col {
    grid-area: primary;
    width: 100%;
    max-width: none;
    min-width: 0;
  }

  .schematic-shell > .section-heading .schematic-command-row > .schematic-utility-col {
    grid-area: utility;
    width: 100%;
    max-width: none;
    min-width: 0;
    display: flex;
    justify-content: flex-end;
  }

  .schematic-shell > .section-heading .schematic-menu-group--utility,
  .schematic-shell > .section-heading .schematic-menu-group--utility .schematic-menu-cluster--utility {
    width: auto;
    min-width: 0;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: nowrap;
  }

  .schematic-shell > .section-heading #fullscreenToggleButton,
  .schematic-shell > .section-heading #refreshTopologyButton,
  .schematic-shell > .section-heading #topChromeToggle {
    width: auto;
    min-width: 0;
    padding-left: 10px;
    padding-right: 10px;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
  }

  .schematic-shell > .section-heading #refreshTopologyButton .responsive-copy--desktop,
  .schematic-shell > .section-heading #refreshTopologyButton .responsive-copy--tablet {
    display: none;
  }

  .schematic-shell > .section-heading #refreshTopologyButton::after {
    content: "Refactor";
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1;
  }

  .schematic-shell > .section-heading #topChromeToggle .top-chrome-toggle-content {
    transform: none;
    padding-bottom: 0;
    gap: 7px;
  }

  .schematic-shell > .section-heading #topChromeToggle .top-chrome-toggle-label i,
  .schematic-shell > .section-heading #topChromeToggle .top-chrome-toggle-label .top-chrome-toggle-icon-asset {
    display: inline-block !important;
  }

  .schematic-shell > .section-heading #topChromeToggle .top-chrome-toggle-label::after {
    content: none !important;
    display: none !important;
  }

  .schematic-shell > .section-heading #topChromeToggle .top-chrome-toggle-state {
    display: none;
  }

  .schematic-shell > .section-heading .schematic-menu-group--primary {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
    column-gap: 8px;
    row-gap: 0;
    width: 100%;
    min-width: 0;
  }

  .schematic-shell > .section-heading .schematic-menu-group--primary .schematic-menu-cluster--save,
  .schematic-shell > .section-heading .schematic-menu-group--primary .schematic-menu-cluster--scheme,
  .schematic-shell > .section-heading .schematic-menu-group--primary .schematic-menu-cluster--creation {
    display: contents;
  }

  .schematic-shell > .section-heading #schemaSaveTrigger {
    width: auto;
    min-width: 0;
    padding-left: 10px;
    padding-right: 10px;
    gap: 4px;
  }

  .schematic-shell > .section-heading #publishSchemeTrigger {
    width: auto;
    min-width: 0;
    padding-left: 10px;
    padding-right: 10px;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
  }

  .schematic-shell > .section-heading #schemeLibrary {
    width: auto;
    min-width: 0;
    margin-left: auto;
  }

  .schematic-shell > .section-heading #schemeLibraryButton {
    width: auto;
    min-width: 0;
    justify-content: space-between;
    padding-left: 10px;
    padding-right: 10px;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
  }

  .schematic-shell > .section-heading .schematic-menu-cluster--creation .chip-menu {
    width: auto;
    min-width: 0;
    margin-right: auto;
  }

  .schematic-shell > .section-heading #hubMenuSelect {
    width: auto;
    min-width: 0;
    padding-left: 10px;
    padding-right: 26px;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
  }
}

.topbar-grid-row > *,
.project-manager-grid-row > *,
.schematic-command-row > * {
  min-width: 0;
}

.project-manager-grid-row > * {
  flex: 1 1 220px;
}

.project-manager-grid-row > :last-child {
  flex: 0 0 auto;
  margin-left: auto;
}

.topbar-project-col {
  flex: 1 1 520px;
}

.topbar-wall-col,
.topbar-status-col,
.schematic-utility-col {
  flex: 0 0 auto;
}

.schematic-primary-col {
  flex: 1 1 auto;
  min-width: 0;
}

.eyebrow { margin: 0 0 8px; color: var(--accent); font-size: clamp(1.45rem, 2.7vw, 2.2rem); font-weight: 700; letter-spacing: 0.16em; text-transform: none; }
.eyebrow .eyebrow-main {
  font-size: 0.82em;
}
.eyebrow .eyebrow-app-mini {
  font-size: 0.54em;
  letter-spacing: 0.08em;
}
.topbar h1 { margin: 0; font-size: 0.8rem; line-height: 1; letter-spacing: 0.02em; }
.topbar-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.topbar-help-button {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--top-control-radius);
  border: 1px solid rgba(103, 198, 255, 0.26);
  background: linear-gradient(180deg, rgba(46, 58, 76, 0.92) 0%, rgba(28, 37, 49, 0.92) 100%);
  color: var(--accent);
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 10px 18px rgba(0, 0, 0, 0.16);
}
.topbar-help-button-label {
  color: var(--accent);
}
.topbar-help-button:hover:not(:disabled),
.topbar-help-button:focus-visible {
  border-color: rgba(103, 198, 255, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 0 1px rgba(103, 198, 255, 0.18),
    0 12px 20px rgba(0, 0, 0, 0.2);
}
.topbar-help-button:focus-visible {
  outline: none;
}

.panel {
  border: 1px solid var(--panel-border);
  border-radius: 0;
  background: var(--panel-bg);
  box-shadow: var(--panel-shadow);
  backdrop-filter: blur(16px);
}

.status-card {
  min-width: 300px;
  margin-left: auto;
  flex: 0 0 auto;
  padding: 16px 18px;
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(20, 28, 38, 0.94) 0%, rgba(11, 17, 24, 0.9) 100%);
}
.topbar .status-card {
  min-width: 0;
  width: auto;
  margin-left: 0;
  padding: 0;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.topbar-status-wrap {
  display: flex;
  justify-content: flex-end;
  width: 100%;
}

.status-chip-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: var(--top-control-radius);
  border: 1px solid rgba(131, 154, 181, 0.22);
  background: rgba(103, 124, 148, 0.12);
  color: #d8e4f1;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.status-chip.has-status-led {
  gap: 10px;
}

.status-chip-inline-led {
  width: 12px;
  height: 12px;
}

.status-chip-lead {
  color: #d8e4f1;
}

.status-chip-value {
  color: inherit;
}

.status-chip.is-admin {
  color: var(--green);
  border-color: rgba(89, 255, 148, 0.22);
  background: rgba(89, 255, 148, 0.1);
}

.status-chip.is-user {
  color: var(--amber);
  border-color: rgba(255, 196, 93, 0.24);
  background: rgba(255, 196, 93, 0.1);
}

.status-chip.is-solo {
  color: #d8e4f1;
  border-color: rgba(131, 154, 181, 0.22);
  background: rgba(103, 124, 148, 0.12);
}
.status-users-chip {
  color: var(--green);
  border-color: rgba(89, 255, 148, 0.22);
  background: rgba(89, 255, 148, 0.1);
}

.topbar .status-chip.is-admin,
.topbar .status-users-chip {
  background: var(--topbar-pill-bg);
}

.topbar .status-chip.is-admin,
.topbar .status-users-chip,
.topbar .status-menu-button,
.topbar .status-admin-button,
.topbar .status-admin-button.secondary-button {
  min-height: 35px;
  height: 35px;
  line-height: 1.1;
}

.topbar .status-chip.is-admin,
.topbar .status-users-chip,
.topbar .status-admin-button,
.topbar .status-admin-button.secondary-button {
  padding-top: 5px;
  padding-bottom: 5px;
}

.topbar .status-chip.is-admin,
.topbar .status-users-chip,
.topbar .status-admin-button,
.topbar .status-admin-button.secondary-button {
  padding-left: 14px;
  padding-right: 14px;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
}

.topbar .status-chip.is-admin .status-chip-lead,
.topbar .status-chip.is-admin .status-chip-value,
.topbar .status-users-chip .status-chip-lead,
.topbar .status-users-chip .status-chip-value {
  line-height: 1;
}

.topbar .status-chip.is-admin.has-status-led {
  gap: 10px;
}

.status-menu-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--top-control-radius);
  border: 1px solid rgba(103, 198, 255, 0.26);
  background: linear-gradient(180deg, rgba(46, 58, 76, 0.92) 0%, rgba(28, 37, 49, 0.92) 100%);
  color: var(--accent);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 10px 18px rgba(0, 0, 0, 0.14);
}

.status-menu-button:hover:not(:disabled),
.status-menu-button:focus-visible {
  border-color: rgba(103, 198, 255, 0.4);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(103, 198, 255, 0.16),
    0 10px 20px rgba(0, 0, 0, 0.18);
}

.status-menu-button:focus-visible {
  outline: none;
}

.status-menu-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.status-menu-icon {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}

.status-menu-icon span {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 8px rgba(103, 198, 255, 0.22);
}

.status-admin-button,
.status-admin-button.secondary-button {
  margin-left: auto;
  min-width: 108px;
  color: var(--accent);
  line-height: 1.1;
}

.status-detail { display: block; margin-top: 12px; color: var(--text-muted); }
.project-manager-bar {
  display: block;
  padding: 12px 18px;
  margin-bottom: 14px;
  border-color: var(--workspace-project-bar-border);
  background: var(--workspace-project-bar-bg);
  box-shadow: var(--workspace-project-bar-shadow);
}
.project-manager-line {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 42px;
  flex-wrap: wrap;
}
.project-manager-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 32px;
  min-width: 0;
  width: 100%;
}
.project-manager-project {
  flex: 0 1 280px;
}
.project-manager-project--topbar {
  position: static;
  align-self: center;
  transform: none;
  margin-left: 0;
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
  width: 100%;
}
.project-manager-project--topbar .project-manager-label {
  color: var(--accent);
  font-size: 0.8rem;
}
.project-manager-static-value {
  display: inline-flex;
  align-items: center;
  width: clamp(190px, 20vw, 260px);
  min-width: 0;
  min-height: 35px;
  padding: 8px 14px;
  border: 1px solid rgba(131, 154, 181, 0.2);
  border-radius: var(--top-control-radius);
  background: linear-gradient(180deg, rgba(24, 31, 41, 0.9) 0%, rgba(13, 18, 25, 0.92) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.1;
  opacity: 1;
  cursor: default;
  pointer-events: none;
  user-select: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-manager-static-value[hidden] {
  display: none !important;
}
.project-manager-project--demo select {
  display: none;
}
.project-manager-project--demo .project-manager-static-value {
  display: inline-flex;
}
.project-manager-project--topbar .project-manager-static-value {
  flex: 0 1 auto;
  width: 30vw;
  min-width: 240px;
  max-width: 560px;
  min-height: 35px;
  height: 35px;
  padding-top: 5px;
  padding-bottom: 5px;
  border-color: rgba(103, 198, 255, 0.26);
}
.project-manager-label-pill {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
.responsive-copy--tablet {
  display: none;
}

.responsive-copy.responsive-copy--desktop {
  padding-top: 2px;
}

.project-manager-scout {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.project-scout-trigger {
  min-height: 35px;
  height: 35px;
  padding: 0 12px;
  border-radius: var(--top-control-radius);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: none;
  flex: 0 0 auto;
}

.project-manager-scout .project-scout-trigger.secondary-button {
  color: #F2F8FF !important;
}

.project-scout-status {
  display: inline-flex;
  align-items: center;
  min-height: 35px;
  height: 35px;
  flex: 1 1 auto;
  min-width: 0;
  padding: 6px 12px;
  border-radius: var(--top-control-radius);
  border: 1px solid rgba(131, 154, 181, 0.2);
  background: linear-gradient(180deg, rgba(24, 31, 41, 0.9) 0%, rgba(13, 18, 25, 0.92) 100%);
  color: var(--text-main);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-scout-status[data-state="loading"] {
  border-color: rgba(99, 185, 255, 0.48);
  color: #c6e7ff;
}

.project-scout-status[data-state="success"] {
  border-color: rgba(89, 255, 148, 0.32);
  color: #9cf3c3;
}

.project-scout-status[data-state="warning"] {
  border-color: rgba(255, 198, 93, 0.4);
  color: #ffd99b;
}

.project-scout-status[data-state="failure"] {
  border-color: rgba(255, 124, 142, 0.4);
  color: #ffbec8;
}

.project-scout-report-button {
  min-width: 24px;
  width: 24px;
  min-height: 24px;
  height: 24px;
  padding: 0;
  border-radius: var(--top-control-radius);
  border: 1px solid rgba(131, 154, 181, 0.22);
  background: linear-gradient(180deg, rgba(46, 58, 76, 0.92) 0%, rgba(28, 37, 49, 0.92) 100%);
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: 0 0 auto;
}

.project-scout-report-button:hover:not(:disabled),
.project-scout-report-button:focus-visible {
  border-color: rgba(103, 198, 255, 0.38);
  color: var(--text-main);
  background: linear-gradient(180deg, rgba(46, 58, 76, 0.92) 0%, rgba(28, 37, 49, 0.92) 100%);
  box-shadow: 0 0 0 1px rgba(103, 198, 255, 0.18);
}

.project-scout-report-button:disabled {
  opacity: 0.52;
  cursor: default;
}

.project-scout-report-button i {
  font-size: 0.58rem;
  color: #edf4fb;
  line-height: 1;
}

.project-scout-report-button .project-scout-report-icon-svg {
  width: 0.72rem;
  height: 0.72rem;
  display: inline-block;
  color: #edf4fb;
}

.project-manager-git {
  flex: 0 1 160px;
}
.project-manager-user {
  flex: 0 1 190px;
}
.project-manager-user-cluster {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  min-width: 0;
  margin-left: -40px;
}
.project-manager-users-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 35px;
  flex: 0 0 auto;
  margin-right: 25px;
}
.project-manager-users-wrap .status-users-chip {
  display: inline-flex;
  align-items: center;
  min-height: 35px;
  height: 35px;
  padding-top: 5px;
  padding-bottom: 5px;
  border-color: rgba(89, 255, 148, 0.22);
  background: var(--topbar-pill-bg);
  color: #d8e4f1;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 10px 18px rgba(0, 0, 0, 0.14);
}

.project-manager-users-wrap .status-users-chip .status-chip-value {
  color: var(--green);
}

.project-manager-user-cluster .project-manager-user {
  flex: 0 1 320px;
}
.project-manager-label {
  color: rgba(188, 202, 220, 0.82);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}
.project-manager-value {
  color: #f1f7ff;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: none;
}
.project-manager-value.is-yes {
  color: var(--green);
}
.project-manager-value.is-no {
  color: var(--text-muted);
}
.project-manager-value.is-unknown {
  color: var(--amber);
}
.project-manager-divider {
  width: 1px;
  align-self: stretch;
  background: rgba(131, 154, 181, 0.18);
}
.project-manager-project select,
.project-manager-git select,
.project-manager-framework select,
.project-manager-user select {
  appearance: none;
  width: clamp(190px, 20vw, 260px);
  min-width: 0;
  padding: 8px 36px 8px 14px;
  border-radius: var(--top-control-radius);
  border: 1px solid rgba(131, 154, 181, 0.2);
  background:
    linear-gradient(45deg, transparent 50%, rgba(210, 223, 239, 0.86) 50%) calc(100% - 18px) calc(50% - 2px) / 8px 8px no-repeat,
    linear-gradient(135deg, rgba(210, 223, 239, 0.86) 50%, transparent 50%) calc(100% - 12px) calc(50% - 2px) / 8px 8px no-repeat,
    linear-gradient(180deg, rgba(24, 31, 41, 0.9) 0%, rgba(13, 18, 25, 0.92) 100%);
  color: var(--text-main);
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-manager-project--topbar select {
  flex: 1 1 auto;
  min-height: 35px;
  height: 35px;
  padding-top: 5px;
  padding-bottom: 5px;
  line-height: 1.1;
  width: 100%;
  max-width: 560px;
  border-color: rgba(103, 198, 255, 0.26);
}

.topbar .project-manager-framework select,
.topbar .project-manager-git select,
.topbar .project-manager-user select {
  min-height: 35px;
  height: 35px;
  padding-top: 5px;
  padding-bottom: 5px;
  font-size: 0.82rem;
  line-height: 1.1;
}
.project-manager-git select {
  width: clamp(120px, 10vw, 150px);
}
.project-manager-framework select {
  width: clamp(180px, 20vw, 360px);
}
.project-manager-user select {
  width: clamp(140px, 14vw, 180px);
}
.project-manager-git select:disabled {
  opacity: 1;
  cursor: default;
}
.project-manager-project select:hover,
.project-manager-git select:hover,
.project-manager-framework select:hover,
.project-manager-user select:hover {
  border-color: rgba(103, 198, 255, 0.3);
}
.project-manager-project select:focus,
.project-manager-git select:focus,
.project-manager-framework select:focus,
.project-manager-user select:focus {
  outline: none;
  border-color: rgba(103, 198, 255, 0.46);
  box-shadow: 0 0 0 1px rgba(103, 198, 255, 0.16);
}

.project-manager-project select option,
.project-manager-framework select option,
.project-manager-git select option,
.project-manager-user select option {
  color: #deebf8;
  background: #1a2735;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 6px 10px;
}

.project-manager-project select option:hover,
.project-manager-framework select option:hover,
.project-manager-git select option:hover,
.project-manager-user select option:hover {
  color: #f4f9ff;
  background: #355a78;
}

.project-manager-project select option:checked,
.project-manager-framework select option:checked,
.project-manager-git select option:checked,
.project-manager-user select option:checked {
  color: #ffffff;
  background: #2e4f6b;
}

.project-manager-project select option:disabled,
.project-manager-framework select option:disabled,
.project-manager-git select option:disabled,
.project-manager-user select option:disabled {
  color: #8ba3bb;
  background: #233242;
  opacity: 1;
}
.project-manager-git select.is-yes {
  color: var(--green);
}
.project-manager-git select.is-no {
  color: var(--text-muted);
}
.project-manager-git select.is-unknown {
  color: var(--amber);
}

.app-shell[data-wall-colour-mode="light"] .project-manager-project select option,
.app-shell[data-wall-colour-mode="light"] .project-manager-framework select option,
.app-shell[data-wall-colour-mode="light"] .project-manager-git select option,
.app-shell[data-wall-colour-mode="light"] .project-manager-user select option {
  color: #163652;
  background: #edf3f9;
}

.app-shell[data-wall-colour-mode="light"] .project-manager-project select option:hover,
.app-shell[data-wall-colour-mode="light"] .project-manager-framework select option:hover,
.app-shell[data-wall-colour-mode="light"] .project-manager-git select option:hover,
.app-shell[data-wall-colour-mode="light"] .project-manager-user select option:hover {
  color: #0f2f48;
  background: #d6e8f5;
}

.app-shell[data-wall-colour-mode="light"] .project-manager-project select option:checked,
.app-shell[data-wall-colour-mode="light"] .project-manager-framework select option:checked,
.app-shell[data-wall-colour-mode="light"] .project-manager-git select option:checked,
.app-shell[data-wall-colour-mode="light"] .project-manager-user select option:checked {
  color: #0d2b44;
  background: #c8deef;
}

.app-shell[data-wall-colour-mode="light"] .project-manager-project select option:disabled,
.app-shell[data-wall-colour-mode="light"] .project-manager-framework select option:disabled,
.app-shell[data-wall-colour-mode="light"] .project-manager-git select option:disabled,
.app-shell[data-wall-colour-mode="light"] .project-manager-user select option:disabled {
  color: #6b8299;
  background: #e3ebf3;
  opacity: 1;
}
.project-manager-admin-wrap {
  display: flex;
  justify-content: flex-end;
  width: 100%;
}

.project-manager-admin-wrap .status-admin-button {
  margin-left: 0;
}

.topbar .status-admin-button,
.topbar .status-admin-button.secondary-button,
.project-manager-admin-wrap .status-admin-button {
  border-radius: var(--top-control-radius);
}

.topbar .status-chip.is-admin,
.topbar .status-users-chip,
.topbar .status-menu-button,
.topbar .status-admin-button,
.topbar .status-admin-button.secondary-button,
.project-manager-project select,
.project-manager-git select,
.project-manager-framework select,
.project-manager-user select,
.project-manager-static-value,
.project-manager-users-wrap .status-users-chip,
.project-manager-admin-wrap .status-admin-button,
.wall-colour-control--topbar,
.wall-colour-toggle-button.is-active {
  border-color: var(--top-control-edge-border);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    var(--top-control-edge-shadow);
}

.project-access-overlay {
  position: fixed;
  inset: 0;
  z-index: 82;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(6, 10, 15, 0.7);
  backdrop-filter: blur(10px);
}
.project-access-overlay[hidden] {
  display: none;
}
.project-access-panel {
  width: min(860px, 96vw);
  max-height: min(88vh, 980px);
  overflow: auto;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid var(--admin-border-strong);
  background: var(--admin-surface-shell);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 26px 48px rgba(0, 0, 0, 0.42);
}
.project-access-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(205, 220, 238, 0.16);
}
.project-access-kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.project-access-header h2 {
  margin: 0;
  font-size: 1.22rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--admin-text-main);
}
.project-access-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.project-access-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}
.project-access-summary-item {
  padding: 12px 14px;
  border: 1px solid var(--admin-border);
  border-radius: 16px;
  background: var(--admin-surface-card-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.project-access-summary-item span {
  display: block;
  margin-bottom: 6px;
  color: var(--admin-text-soft);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.project-access-summary-item strong {
  color: var(--admin-text-main);
  font-size: 0.96rem;
}
.project-access-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  min-height: 42px;
  color: var(--admin-text-main);
  cursor: pointer;
}
.project-access-helper {
  margin: -6px 0 0;
  color: var(--admin-text-muted);
  line-height: 1.55;
}
.project-access-helper.is-error {
  color: var(--amber);
}

.project-access-section {
  padding: 16px;
  border: 1px solid var(--admin-border);
  border-radius: 18px;
  background: var(--admin-surface-card);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.project-access-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.project-access-section-heading h3 {
  margin: 0;
  font-size: 0.88rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--admin-text-main);
}
.project-access-inline-note {
  margin: -2px 0 12px;
  color: var(--admin-text-muted);
  line-height: 1.5;
}
.project-access-policy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.project-access-policy-item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--admin-border);
  background: rgba(70, 87, 110, 0.48);
}
.project-access-policy-item span {
  color: var(--admin-text-soft);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.project-access-policy-item strong {
  color: var(--admin-text-main);
}
.project-access-user-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.project-access-user-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--admin-border);
  background: rgba(70, 87, 110, 0.48);
}
.project-access-user-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.project-access-user-id {
  font-weight: 700;
  color: var(--admin-text-main);
}
.project-access-user-role {
  color: var(--admin-text-muted);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.project-access-user-connectivity {
  color: var(--admin-text-soft);
  font-size: 0.8rem;
  line-height: 1.35;
}
.project-access-target-tunnel-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.project-access-target-status {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(184, 198, 218, 0.28);
  background: rgba(20, 28, 40, 0.7);
  color: var(--admin-text-main);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.project-access-target-status--healthy {
  border-color: rgba(98, 255, 172, 0.32);
  color: #68ffb0;
  background: rgba(20, 64, 43, 0.34);
}
.project-access-target-status--connected {
  border-color: rgba(103, 198, 255, 0.32);
  color: #8fd9ff;
  background: rgba(22, 52, 77, 0.34);
}
.project-access-target-status--pending {
  border-color: rgba(255, 195, 106, 0.36);
  color: #ffd489;
  background: rgba(86, 60, 18, 0.34);
}
.project-access-target-status--error {
  border-color: rgba(255, 112, 112, 0.38);
  color: #ff9494;
  background: rgba(88, 28, 32, 0.34);
}
.project-access-target-status--inactive {
  border-color: rgba(184, 198, 218, 0.28);
  color: var(--admin-text-muted);
  background: rgba(34, 44, 58, 0.5);
}
.project-access-target-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}
.project-access-target-actions .secondary-button {
  white-space: nowrap;
}
.project-access-permission-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}
.project-access-permission-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--admin-border);
  background: rgba(70, 87, 110, 0.48);
  cursor: pointer;
}
.project-access-permission-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.project-access-permission-copy strong {
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  color: var(--admin-text-main);
}
.project-access-permission-copy span {
  color: var(--admin-text-muted);
  font-size: 0.76rem;
  line-height: 1.45;
}
.project-access-add-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}
.project-access-default-row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.project-access-default-row label {
  color: var(--admin-text-muted);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.project-access-default-row select {
  width: 100%;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--admin-border-strong);
  background: var(--admin-input-bg);
  color: var(--admin-text-main);
}
.project-access-remote-add-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) 120px 140px auto;
  gap: 10px;
  margin-top: 12px;
}
.project-access-remote-tunnel-row {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 10px;
  margin-top: 10px;
}
.project-access-remote-tunnel-row[hidden] {
  display: none;
}
.project-access-add-row input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--admin-border-strong);
  background: var(--admin-input-bg);
  color: var(--admin-text-main);
}
.project-access-remote-add-row input,
.project-access-remote-add-row select,
.project-access-remote-tunnel-row input,
.project-access-remote-tunnel-row select {
  width: 100%;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--admin-border-strong);
  background: var(--admin-input-bg);
  color: var(--admin-text-main);
}
.project-access-empty {
  color: var(--admin-text-muted);
  font-style: italic;
}
.project-access-panel .secondary-button,
.project-access-panel button:not(.secondary-button) {
  border-color: var(--admin-border-strong);
  background: var(--admin-button-bg);
  color: var(--admin-text-main);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.project-access-panel .secondary-button:hover:not(:disabled),
.project-access-panel button:not(.secondary-button):hover:not(:disabled) {
  background: var(--admin-button-bg-hover);
  border-color: rgba(211, 226, 244, 0.52);
}
.project-access-panel input::placeholder {
  color: rgba(223, 234, 247, 0.48);
}
.project-access-panel input:focus,
.project-access-panel select:focus {
  outline: none;
  border-color: rgba(103, 198, 255, 0.62);
  box-shadow:
    0 0 0 1px rgba(103, 198, 255, 0.24),
    0 0 0 5px rgba(103, 198, 255, 0.08);
}
.project-access-panel input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
  flex-shrink: 0;
  filter: drop-shadow(0 0 4px rgba(103, 198, 255, 0.18));
  cursor: pointer;
}
.project-access-panel input[type="checkbox"]:disabled {
  filter: none;
}
.schematic-shell {
  padding: 13px 6px 28px 8px;
  margin-bottom: 0;
  border-radius: 0;
  border-color: var(--workspace-schematic-shell-border);
  background: var(--workspace-schematic-shell-bg);
  box-shadow: var(--workspace-schematic-shell-shadow);
}
.schematic-shell > .section-heading {
  display: block;
  margin-bottom: 0;
  padding: 14px 6px 14px 8px;
  border-radius: 0;
  background: var(--workspace-schematic-heading-bg);
  box-shadow:
    inset 0 0 0 1px var(--workspace-schematic-heading-border),
    var(--workspace-schematic-heading-shadow);
}
.schematic-menu-group {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  width: 100%;
  min-width: 0;
  gap: var(--ribbon-action-group-gap);
}
.schematic-menu-cluster {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  min-width: 0;
  gap: var(--ribbon-action-cluster-gap);
}
.schematic-menu-group--utility {
  justify-content: flex-end;
}
.schematic-menu-group--utility .schematic-menu-cluster--utility {
  justify-content: flex-end;
}
.schematic-menu-cluster--save {
  min-width: 0;
}
.scheme-library {
  position: relative;
  min-width: 184px;
}
.scheme-library-trigger {
  display: inline-flex;
  align-items: center;
  min-width: 184px;
  justify-content: space-between;
}
.scheme-library-trigger-label {
  display: inline-flex;
  align-items: center;
}
.scheme-library-trigger-chevron {
  flex: 0 0 auto;
  display: inline-block;
  width: 14px;
  height: 8px;
  margin-left: 12px;
  background:
    linear-gradient(45deg, transparent 50%, rgba(210, 223, 239, 0.86) 50%) left top / 8px 8px no-repeat,
    linear-gradient(135deg, rgba(210, 223, 239, 0.86) 50%, transparent 50%) right top / 8px 8px no-repeat;
  opacity: 0.72;
  transition: transform 140ms ease, opacity 140ms ease;
}
.top-chrome-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  padding-left: 12px;
  padding-right: 12px;
}
.top-chrome-toggle-content {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 3px;
  transform: translateY(2px);
}
.top-chrome-toggle-led {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 999px;
  border: 1px solid rgba(18, 26, 33, 0.3);
  background: radial-gradient(circle at 35% 35%, rgba(227, 248, 234, 0.98) 0%, rgba(120, 225, 149, 0.96) 44%, rgba(37, 136, 74, 0.98) 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12),
    0 0 6px rgba(84, 208, 120, 0.28);
}
.top-chrome-toggle[data-hq-active="true"] .top-chrome-toggle-led {
  background: radial-gradient(circle at 35% 35%, rgba(255, 215, 220, 0.98) 0%, rgba(255, 120, 131, 0.96) 44%, rgba(164, 35, 53, 0.98) 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12),
    0 0 6px rgba(255, 94, 111, 0.28);
}
.top-chrome-toggle-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.top-chrome-toggle-label .fa-solid {
  font-size: 0.84rem;
  line-height: 1;
  display: inline-block;
  color: rgba(230, 241, 252, 0.98);
  opacity: 1;
  text-shadow: 0 0 3px rgba(8, 14, 22, 0.35);
}

.top-chrome-toggle-label .top-chrome-toggle-icon-svg,
.top-chrome-toggle-label .top-chrome-toggle-icon-asset {
  width: 0.96rem;
  height: 0.96rem;
  display: inline-block;
  filter: drop-shadow(0 0 2px rgba(8, 14, 22, 0.35));
}

.top-chrome-toggle-label .top-chrome-toggle-icon-asset {
  background-color: currentColor;
  -webkit-mask-image: var(--top-chrome-toggle-icon-url);
  mask-image: var(--top-chrome-toggle-icon-url);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

#topChromeToggle .top-chrome-toggle-label i.fa-solid {
  display: inline-block !important;
}

#topChromeToggle .top-chrome-toggle-label .top-chrome-toggle-icon-asset {
  display: inline-block !important;
}

#topChromeToggle .top-chrome-toggle-label::after {
  content: none !important;
  display: none !important;
}
.top-chrome-toggle-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0.7em;
  line-height: 1;
  flex: 0 0 auto;
}
.scheme-library-trigger[aria-expanded="true"] .scheme-library-trigger-chevron {
  transform: rotate(180deg);
}
.scheme-library-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 18;
  width: min(220px, calc(100vw - 48px));
  padding: 4px;
  border-radius: 14px;
  border: 1px solid rgba(140, 158, 183, 0.18);
  background: linear-gradient(180deg, rgba(16, 22, 30, 0.98) 0%, rgba(10, 15, 21, 0.98) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 18px 28px rgba(0, 0, 0, 0.26);
}
.scheme-library-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: 280px;
  overflow: auto;
}
.scheme-library-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}
.scheme-library-item {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(231, 238, 246, 0.94);
  text-align: left;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.scheme-library-item:hover,
.scheme-library-item:focus-visible {
  transform: none;
  background: rgba(103, 198, 255, 0.07);
  color: #f1f7ff;
  outline: none;
}
.scheme-library-item.is-current {
  background: rgba(103, 198, 255, 0.1);
  color: #f1f7ff;
}
.scheme-library-version-badge {
  min-width: 42px;
  padding: 7px 8px;
  border: 1px solid rgba(103, 198, 255, 0.2);
  border-radius: 999px;
  background: rgba(103, 198, 255, 0.08);
  color: rgba(231, 238, 246, 0.94);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
}
.scheme-library-version-badge:hover,
.scheme-library-version-badge:focus-visible,
.scheme-library-version-badge.is-open {
  transform: none;
  background: rgba(103, 198, 255, 0.16);
  border-color: rgba(103, 198, 255, 0.32);
  color: #f1f7ff;
  outline: none;
}
.scheme-version-history {
  position: absolute;
  top: 4px;
  left: calc(100% + 8px);
  min-width: 78px;
  padding: 4px;
  border-radius: 14px;
  border: 1px solid rgba(140, 158, 183, 0.18);
  background: linear-gradient(180deg, rgba(16, 22, 30, 0.98) 0%, rgba(10, 15, 21, 0.98) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 18px 28px rgba(0, 0, 0, 0.26);
}
.scheme-version-history-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: 280px;
  overflow: auto;
}
.scheme-version-history-item {
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(231, 238, 246, 0.94);
  text-align: left;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.scheme-version-history-item:hover,
.scheme-version-history-item:focus-visible {
  transform: none;
  background: rgba(103, 198, 255, 0.07);
  color: #f1f7ff;
  outline: none;
}
.scheme-version-history-item.is-current {
  background: rgba(103, 198, 255, 0.1);
  color: #f1f7ff;
}
.chip-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 168px;
}
.chip-menu-label {
  color: rgba(188, 202, 220, 0.82);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.chip-menu select {
  appearance: none;
  width: 168px;
  padding: 10px 34px 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(131, 154, 181, 0.22);
  background:
    linear-gradient(45deg, transparent 50%, rgba(210, 223, 239, 0.86) 50%) calc(100% - 16px) calc(50% - 2px) / 8px 8px no-repeat,
    linear-gradient(135deg, rgba(210, 223, 239, 0.86) 50%, transparent 50%) calc(100% - 10px) calc(50% - 2px) / 8px 8px no-repeat,
    linear-gradient(180deg, rgba(46, 58, 76, 0.92) 0%, rgba(28, 37, 49, 0.92) 100%);
  color: var(--text-main);
  cursor: pointer;
}
.chip-menu select:hover {
  border-color: rgba(103, 198, 255, 0.3);
}
.chip-menu select:focus {
  outline: none;
  border-color: rgba(103, 198, 255, 0.46);
  box-shadow: 0 0 0 1px rgba(103, 198, 255, 0.16);
}
.wall-colour-control {
  min-width: 0;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}
.wall-colour-control--topbar {
  margin-left: auto;
  flex: 0 0 auto;
  min-height: 35px;
  padding: 0 8px 0 12px;
  border: 1px solid var(--top-control-edge-border);
  border-radius: var(--top-control-radius);
  background: var(--topbar-pill-bg);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    var(--top-control-edge-shadow);
}
.wall-colour-control .chip-menu-label {
  margin-top: 1px;
  letter-spacing: 0.12em;
}
.wall-colour-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border: 1px solid rgba(131, 154, 181, 0.22);
  border-radius: var(--top-control-radius);
  background: linear-gradient(180deg, rgba(18, 26, 36, 0.78) 0%, rgba(11, 17, 24, 0.82) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 0 0 1px rgba(8, 13, 19, 0.22);
}
.wall-colour-toggle-button {
  min-width: 58px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: var(--top-control-radius);
  background: transparent;
  color: rgba(205, 217, 233, 0.8);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: none;
  transition: color 120ms ease, background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}
.wall-colour-toggle-button:hover:not(:disabled),
.wall-colour-toggle-button:focus-visible {
  border-color: rgba(103, 198, 255, 0.2);
  background: rgba(103, 198, 255, 0.06);
  color: rgba(228, 238, 249, 0.92);
  box-shadow: none;
}
.wall-colour-toggle-button.is-active {
  border-color: rgba(152, 171, 196, 0.24);
  background: linear-gradient(180deg, rgba(94, 112, 135, 0.92) 0%, rgba(62, 79, 100, 0.94) 100%);
  color: #f2f8ff;
  cursor: default;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    inset 0 -1px 0 rgba(8, 13, 19, 0.24),
    0 1px 2px rgba(0, 0, 0, 0.22);
}
.wall-colour-control--topbar .chip-menu-label {
  font-size: 0.68rem;
  color: #d9e3f0;
  margin-top: 0;
  line-height: 1;
}
.wall-colour-control--topbar .wall-colour-toggle {
  min-width: 120px;
}
.schematic-shell > .section-heading h2 {
  font-size: clamp(1.45rem, 2.3vw, 2.15rem);
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}
.schematic-title-group {
  display: flex;
  line-height: 1;
  margin: 0;
  min-width: 0;
}
.schema-save-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 14px 0 16px;
  border: 1px solid rgba(131, 154, 181, 0.24);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(46, 58, 76, 0.92) 0%, rgba(28, 37, 49, 0.92) 100%);
  color: rgba(224, 235, 247, 0.92);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
  text-transform: none;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 10px 18px rgba(0, 0, 0, 0.18);
  transition:
    transform 120ms ease,
    border-color 120ms ease,
    box-shadow 120ms ease,
    background 120ms ease,
    color 120ms ease,
    opacity 120ms ease;
}
.schema-save-trigger-label {
  display: inline-flex;
  align-items: center;
  font: inherit;
  color: #d8e4f1;
  letter-spacing: inherit;
  line-height: inherit;
  text-transform: inherit;
}
.schema-save-trigger-icon {
  position: relative;
  display: inline-flex;
  width: var(--wall-top-icon-size);
  height: var(--wall-top-icon-size);
  min-height: var(--wall-top-icon-size);
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  align-self: center;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--green);
  box-shadow: none;
  box-sizing: border-box;
}
.schema-save-trigger-symbol {
  position: absolute;
  inset: 0;
  width: 16px;
  height: 16px;
  margin: auto;
  font-size: 12.5px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: opacity 160ms ease, transform 160ms ease;
}
.schema-save-trigger-symbol-check {
  opacity: 0;
  transform: scale(0.62);
}
.schema-save-trigger:hover:not(:disabled),
.schema-save-trigger:focus-visible {
  color: #f1f7ff;
  border-color: rgba(103, 198, 255, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 0 1px rgba(103, 198, 255, 0.18),
    0 12px 22px rgba(0, 0, 0, 0.22);
}
.schema-save-trigger:hover:not(:disabled) .schema-save-trigger-icon,
.schema-save-trigger:focus-visible .schema-save-trigger-icon {
  background: rgba(103, 198, 255, 0.08);
}
.schema-save-trigger:active:not(:disabled) {
  transform: translateY(0);
  background: linear-gradient(180deg, rgba(39, 50, 66, 0.96) 0%, rgba(22, 29, 39, 0.96) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 6px 14px rgba(0, 0, 0, 0.22);
}
.schema-save-trigger:active:not(:disabled) .schema-save-trigger-icon {
  background: rgba(103, 198, 255, 0.11);
}
.schema-save-trigger:focus-visible {
  outline: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 0 2px rgba(103, 198, 255, 0.24),
    0 12px 22px rgba(0, 0, 0, 0.24);
}
.schema-save-trigger.is-dirty {
  color: #ffd991;
  border-color: rgba(255, 196, 93, 0.42);
  background: linear-gradient(180deg, rgba(64, 52, 31, 0.95) 0%, rgba(36, 30, 18, 0.94) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(255, 196, 93, 0.18),
    0 0 18px rgba(255, 196, 93, 0.18),
    0 12px 22px rgba(0, 0, 0, 0.2);
}
.schema-save-trigger.is-dirty .schema-save-trigger-icon {
  color: var(--amber);
  background: rgba(255, 196, 93, 0.09);
}
.schema-save-trigger.is-dirty .schema-save-trigger-label {
  color: #d8e4f1;
}
.schema-save-trigger.is-saving {
  color: rgba(139, 221, 255, 0.96);
  border-color: rgba(103, 198, 255, 0.56);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(103, 198, 255, 0.16),
    0 0 18px rgba(103, 198, 255, 0.16),
    0 12px 22px rgba(0, 0, 0, 0.2);
}
.schema-save-trigger.is-saving .schema-save-trigger-icon {
  background: rgba(103, 198, 255, 0.1);
}
.schema-save-trigger.is-saving .schema-save-trigger-symbol-save {
  animation: schema-save-trigger-pulse 900ms ease-in-out infinite;
}
.schema-save-trigger.is-saved {
  color: #8ff2b1;
  border-color: rgba(89, 255, 148, 0.42);
  background: linear-gradient(180deg, rgba(35, 73, 58, 0.95) 0%, rgba(20, 46, 36, 0.95) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(89, 255, 148, 0.14),
    0 0 20px rgba(89, 255, 148, 0.16);
}
.schema-save-trigger.is-saved .schema-save-trigger-icon {
  background: rgba(89, 255, 148, 0.1);
}
.schema-save-trigger.is-saved .schema-save-trigger-symbol-save {
  opacity: 0;
  transform: scale(0.6) rotate(-12deg);
}
.schema-save-trigger.is-saved .schema-save-trigger-symbol-check {
  opacity: 1;
  transform: scale(1);
}
.schema-save-trigger:disabled {
  color: rgba(180, 195, 214, 0.5);
  cursor: not-allowed;
  transform: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 8px 16px rgba(0, 0, 0, 0.14);
}
.schema-save-trigger:disabled .schema-save-trigger-icon {
  background: rgba(255, 255, 255, 0.03);
}

/* Clean, flat action ribbon controls in the scheme heading row only. */
.schematic-shell > .section-heading {
  margin-bottom: 12px;
  border-radius: var(--ribbon-row-radius);
  background: var(--ribbon-row-bg);
  box-shadow: inset 0 0 0 1px var(--ribbon-row-border);
}

.schematic-shell > .section-heading .schematic-menu-group {
  gap: var(--ribbon-action-group-gap);
}

.schematic-shell > .section-heading .schematic-menu-group .schematic-menu-cluster {
  gap: var(--ribbon-action-cluster-gap);
}

/* Top wall controls use a deterministic fixed-height system:
   vertical rhythm comes from explicit height + line-height + border, not padding-block. */
.schematic-shell > .section-heading .wall-top-btn,
.schematic-shell > .section-heading .wall-top-select {
  min-height: var(--wall-top-btn-height);
  height: var(--wall-top-btn-height);
  border-radius: var(--ribbon-action-radius);
  border: var(--wall-top-btn-border-width) solid var(--ribbon-action-border);
  background: var(--ribbon-action-bg);
  color: var(--ribbon-action-text-muted);
  padding-left: var(--ribbon-action-padding-x);
  padding-right: var(--ribbon-action-padding-x);
  padding-block: 0;
  box-shadow: var(--ribbon-action-surface-shadow);
  text-shadow: none;
  font-size: 13px;
  letter-spacing: 0.03em;
  line-height: var(--wall-top-btn-line-height);
  box-sizing: border-box;
}

.schematic-shell > .section-heading .wall-top-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.schematic-shell > .section-heading .wall-top-select {
  display: block;
}

.schematic-shell > .section-heading .schema-save-trigger {
  min-height: var(--wall-top-btn-height);
  height: var(--wall-top-btn-height);
  gap: 6px;
  padding-left: 12px;
  border-color: var(--ribbon-save-border);
  background: var(--ribbon-save-bg);
  color: var(--ribbon-save-text);
  box-shadow: var(--ribbon-action-surface-shadow);
}

.schematic-shell > .section-heading .schema-save-trigger-label {
  color: inherit;
}

.schematic-shell > .section-heading .schematic-menu-group .chip-menu {
  position: relative;
  color: var(--ribbon-action-text-muted);
}

.schematic-shell > .section-heading .scheme-library-trigger-chevron {
  width: 10px;
  height: 6px;
  margin-left: 10px;
  background: currentColor;
  opacity: 0.72;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.schematic-shell > .section-heading .schematic-menu-group .chip-menu::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 12px;
  width: 10px;
  height: 6px;
  transform: translateY(-50%);
  background: currentColor;
  opacity: 0.72;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  pointer-events: none;
}

.schematic-shell > .section-heading .schematic-menu-group .chip-menu select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  min-height: var(--wall-top-btn-height);
  height: var(--wall-top-btn-height);
  border-width: var(--wall-top-btn-border-width);
  border-style: solid;
  border-color: var(--ribbon-action-border);
  padding-top: 0;
  padding-bottom: 0;
  padding-block: 0;
  padding-left: var(--ribbon-action-padding-x);
  padding-right: 30px;
  line-height: var(--wall-top-btn-line-height);
  background: var(--ribbon-action-bg);
  box-sizing: border-box;
}

/* Hub Menu: enforce high-contrast closed control and designed option panel. */
.schematic-shell > .section-heading #hubMenuSelect {
  color: var(--ribbon-action-text-muted);
  -webkit-text-fill-color: var(--ribbon-action-text-muted);
  font-family: inherit;
  font-style: normal;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: var(--wall-top-btn-line-height);
}

.schematic-shell > .section-heading #hubMenuSelect:hover {
  color: var(--ribbon-action-text-muted);
  -webkit-text-fill-color: var(--ribbon-action-text-muted);
}

.schematic-shell > .section-heading #hubMenuSelect:focus,
.schematic-shell > .section-heading #hubMenuSelect:focus-visible {
  border-color: var(--ribbon-action-border);
  box-shadow: var(--ribbon-action-surface-shadow);
}

.schematic-shell > .section-heading #hubMenuSelect option {
  color: #e7f2ff;
  background: #1b2735;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 6px 10px;
}

.schematic-shell > .section-heading #hubMenuSelect option[data-custom-hub="true"],
.schematic-shell > .section-heading #hubMenuSelect option[data-custom-hub="true"]:checked,
.schematic-shell > .section-heading #hubMenuSelect option[data-custom-hub="true"]:hover {
  color: #ffb253;
}

.schematic-shell > .section-heading #hubMenuSelect option:checked {
  color: #ffffff;
  background: #2f5372;
}

.schematic-shell > .section-heading #hubMenuSelect option:hover {
  color: #ffffff;
  background: #3a6589;
}

.schematic-shell > .section-heading #hubMenuSelect option:disabled {
  color: #95abc1;
  background: #233242;
  opacity: 1;
}

.schematic-shell > .section-heading #hubMenuSelect optgroup {
  color: #a7c4df;
  background: #16212d;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.app-shell[data-wall-colour-mode="light"] .schematic-shell > .section-heading #hubMenuSelect {
  color: var(--ribbon-action-text-muted);
  -webkit-text-fill-color: var(--ribbon-action-text-muted);
}

.app-shell[data-wall-colour-mode="light"] .schematic-shell > .section-heading #hubMenuSelect:hover {
  color: var(--ribbon-action-text-muted);
  -webkit-text-fill-color: var(--ribbon-action-text-muted);
}

.app-shell[data-wall-colour-mode="light"] .schematic-shell > .section-heading #hubMenuSelect option {
  color: #1e3e5b;
  background: #edf3f9;
}

.app-shell[data-wall-colour-mode="light"] .schematic-shell > .section-heading #hubMenuSelect option[data-custom-hub="true"],
.app-shell[data-wall-colour-mode="light"] .schematic-shell > .section-heading #hubMenuSelect option[data-custom-hub="true"]:checked,
.app-shell[data-wall-colour-mode="light"] .schematic-shell > .section-heading #hubMenuSelect option[data-custom-hub="true"]:hover {
  color: #c86c00;
}

.app-shell[data-wall-colour-mode="light"] .schematic-shell > .section-heading #hubMenuSelect option:checked {
  color: #0f2f48;
  background: #c8deef;
}

.app-shell[data-wall-colour-mode="light"] .schematic-shell > .section-heading #hubMenuSelect option:hover {
  color: #0f2f48;
  background: #d6e8f5;
}

.app-shell[data-wall-colour-mode="light"] .schematic-shell > .section-heading #hubMenuSelect option:disabled {
  color: #6b8299;
  background: #e3ebf3;
}

.app-shell[data-wall-colour-mode="light"] .schematic-shell > .section-heading #hubMenuSelect optgroup {
  color: #3a5c79;
  background: #dfe9f2;
}

.schematic-shell > .section-heading #schemeLibraryButton .scheme-library-trigger-label {
  position: relative;
  display: inline-block;
  text-decoration: none;
}

.schematic-shell > .section-heading .schema-save-trigger:hover:not(:disabled),
.schematic-shell > .section-heading .schema-save-trigger:focus-visible {
  background: var(--ribbon-save-bg-hover);
  border-color: var(--ribbon-save-border-hover);
  box-shadow: var(--ribbon-action-surface-shadow-hover);
  transform: translateY(-1px);
}

.schematic-shell > .section-heading .secondary-button:hover:not(:disabled),
.schematic-shell > .section-heading .secondary-button:focus-visible,
.schematic-shell > .section-heading .schematic-menu-group .chip-menu select:hover {
  background: var(--ribbon-action-bg-hover);
  border-color: var(--ribbon-action-border-hover);
  box-shadow: var(--ribbon-action-surface-shadow-hover);
  transform: translateY(-1px);
}

.schematic-shell > .section-heading .schematic-menu-group .chip-menu select:focus {
  background: var(--ribbon-action-bg);
  border-color: var(--ribbon-action-border);
  box-shadow: var(--ribbon-action-surface-shadow);
  transform: none;
}

.schematic-shell > .section-heading .schematic-menu-group .chip-menu select:focus-visible {
  background: var(--ribbon-action-bg);
  border-color: var(--ribbon-action-border);
  box-shadow: var(--ribbon-action-surface-shadow);
}

.schematic-shell > .section-heading .schema-save-trigger:focus-visible,
.schematic-shell > .section-heading .secondary-button:focus-visible,
.schematic-shell > .section-heading .schematic-menu-group .chip-menu select:focus {
  outline: 2px solid rgba(103, 198, 255, 0.24);
  outline-offset: 1px;
}

.schematic-shell > .section-heading .schema-save-trigger:active:not(:disabled),
.schematic-shell > .section-heading .secondary-button:active:not(:disabled) {
  transform: translateY(0);
  background: var(--ribbon-action-bg-active);
  border-color: var(--ribbon-action-border-active);
  box-shadow: var(--ribbon-action-surface-shadow-active);
}

.schematic-shell > .section-heading .schema-save-trigger:active:not(:disabled) {
  background: var(--ribbon-save-bg-active);
  border-color: var(--ribbon-save-border-active);
}

.schematic-shell > .section-heading .schema-save-trigger:disabled,
.schematic-shell > .section-heading .secondary-button:disabled,
.schematic-shell > .section-heading .schematic-menu-group .chip-menu select:disabled {
  background: var(--ribbon-action-bg-disabled);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(22, 34, 47, 0.2);
}

.schematic-shell > .section-heading .secondary-button.is-locked-control:disabled {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  opacity: 1;
  color: var(--ribbon-action-text-muted);
  text-align: center;
  white-space: nowrap;
}

.schematic-shell > .section-heading .secondary-button.is-locked-control:disabled::after {
  content: "";
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  background-color: currentColor;
  opacity: 0.82;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5.5' y='10.5' width='13' height='10' rx='2.5'/%3E%3Cpath d='M8.5 10.5V8a3.5 3.5 0 0 1 7 0v2.5'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5.5' y='10.5' width='13' height='10' rx='2.5'/%3E%3Cpath d='M8.5 10.5V8a3.5 3.5 0 0 1 7 0v2.5'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: 14px 14px;
  mask-size: 14px 14px;
}

.schematic-shell.is-layout-locked > .section-heading .secondary-button.is-locked-control:disabled::after {
  background-color: #ff6c7d;
  opacity: 0.96;
  filter: drop-shadow(0 0 5px rgba(255, 108, 125, 0.2));
}

.schematic-shell > .section-heading #schemeLibraryButton.is-locked-control:disabled .scheme-library-trigger-chevron {
  display: none;
}

.schematic-shell > .section-heading .schematic-menu-group .chip-menu.is-locked-control::after {
  width: 14px;
  height: 14px;
  right: 11px;
  transform: translateY(-50%);
  background-color: currentColor;
  opacity: 0.82;
  clip-path: none;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5.5' y='10.5' width='13' height='10' rx='2.5'/%3E%3Cpath d='M8.5 10.5V8a3.5 3.5 0 0 1 7 0v2.5'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5.5' y='10.5' width='13' height='10' rx='2.5'/%3E%3Cpath d='M8.5 10.5V8a3.5 3.5 0 0 1 7 0v2.5'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: 14px 14px;
  mask-size: 14px 14px;
}

.schematic-shell.is-layout-locked > .section-heading .schematic-menu-group .chip-menu.is-locked-control::after {
  background-color: #ff6c7d;
  opacity: 0.96;
  filter: drop-shadow(0 0 5px rgba(255, 108, 125, 0.2));
}

.schematic-shell > .section-heading .schematic-menu-group .chip-menu.is-locked-control select {
  padding-right: 34px;
  opacity: 1;
}

html.ui-demo-mode .schematic-shell > .section-heading #schemaSaveTrigger:disabled,
html.ui-demo-mode .schematic-shell > .section-heading #publishSchemeTrigger:disabled,
html.ui-demo-mode .schematic-shell > .section-heading #refreshTopologyButton:disabled {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  opacity: 1;
  color: var(--ribbon-action-text-muted);
  text-align: center;
  white-space: nowrap;
}

html.ui-demo-mode .schematic-shell > .section-heading #schemaSaveTrigger:disabled {
  background: linear-gradient(180deg, rgba(172, 185, 201, 0.82) 0%, rgba(158, 172, 188, 0.82) 100%);
  border-color: rgba(108, 129, 152, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 -1px 0 rgba(96, 118, 142, 0.08);
  color: rgba(28, 46, 68, 0.84);
}

html.ui-demo-mode .schematic-shell > .section-heading #publishSchemeTrigger:disabled,
html.ui-demo-mode .schematic-shell > .section-heading #refreshTopologyButton:disabled {
  background: linear-gradient(180deg, rgba(172, 185, 201, 0.82) 0%, rgba(158, 172, 188, 0.82) 100%);
  border-color: rgba(108, 129, 152, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 -1px 0 rgba(96, 118, 142, 0.08);
  color: rgba(28, 46, 68, 0.84);
}

html.ui-demo-mode .schematic-shell > .section-heading #schemeLibraryButton,
html.ui-demo-mode .schematic-shell > .section-heading #schemeLibraryButton:hover:not(:disabled),
html.ui-demo-mode .schematic-shell > .section-heading #schemeLibraryButton:focus-visible,
html.ui-demo-mode .schematic-shell > .section-heading #schemeLibraryButton[aria-expanded="true"] {
  background: var(--ribbon-action-bg);
  border-color: var(--ribbon-action-border);
  box-shadow: var(--ribbon-action-surface-shadow);
  color: var(--ribbon-action-text-muted);
  -webkit-text-fill-color: var(--ribbon-action-text-muted);
}

html.ui-demo-mode .schematic-shell > .section-heading #schemaSaveTrigger:disabled .schema-save-trigger-icon {
  display: none;
}

html.ui-demo-mode .schematic-shell > .section-heading #schemaSaveTrigger:disabled::after,
html.ui-demo-mode .schematic-shell > .section-heading #publishSchemeTrigger:disabled::after,
html.ui-demo-mode .schematic-shell > .section-heading #refreshTopologyButton:disabled::after {
  content: "";
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  background-color: currentColor;
  opacity: 0.82;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5.5' y='10.5' width='13' height='10' rx='2.5'/%3E%3Cpath d='M8.5 10.5V8a3.5 3.5 0 0 1 7 0v2.5'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5.5' y='10.5' width='13' height='10' rx='2.5'/%3E%3Cpath d='M8.5 10.5V8a3.5 3.5 0 0 1 7 0v2.5'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: 14px 14px;
  mask-size: 14px 14px;
}

.schematic-shell > .section-heading .schema-save-trigger.is-locked-control:disabled,
.schematic-shell > .section-heading .secondary-button.is-locked-control:disabled,
.schematic-shell > .section-heading .schematic-menu-group .chip-menu.is-locked-control select:disabled {
  opacity: 1;
  background: linear-gradient(180deg, rgba(172, 185, 201, 0.82) 0%, rgba(158, 172, 188, 0.82) 100%);
  border-color: rgba(108, 129, 152, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 -1px 0 rgba(96, 118, 142, 0.08);
  color: rgba(28, 46, 68, 0.84);
  -webkit-text-fill-color: rgba(28, 46, 68, 0.84);
}

.schematic-shell > .section-heading .schematic-menu-group .chip-menu.is-locked-control #hubMenuSelect:disabled {
  color: rgba(28, 46, 68, 0.84);
  -webkit-text-fill-color: rgba(28, 46, 68, 0.84);
}

.schematic-shell > .section-heading .schema-save-trigger.is-locked-control:disabled,
.schematic-shell > .section-heading .secondary-button.is-locked-control:disabled {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  white-space: nowrap;
}

.schematic-shell > .section-heading .schema-save-trigger.is-locked-control:disabled::after,
.schematic-shell > .section-heading .secondary-button.is-locked-control:disabled::after {
  content: "";
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  background-color: currentColor;
  opacity: 0.82;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5.5' y='10.5' width='13' height='10' rx='2.5'/%3E%3Cpath d='M8.5 10.5V8a3.5 3.5 0 0 1 7 0v2.5'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5.5' y='10.5' width='13' height='10' rx='2.5'/%3E%3Cpath d='M8.5 10.5V8a3.5 3.5 0 0 1 7 0v2.5'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: 14px 14px;
  mask-size: 14px 14px;
}

.schematic-shell > .section-heading #schemeLibraryButton.is-locked-control:disabled {
  justify-content: space-between;
  background: linear-gradient(180deg, rgba(172, 185, 201, 0.82) 0%, rgba(158, 172, 188, 0.82) 100%);
  border-color: rgba(108, 129, 152, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 -1px 0 rgba(96, 118, 142, 0.08);
  color: rgba(28, 46, 68, 0.84);
  -webkit-text-fill-color: rgba(28, 46, 68, 0.84);
}

.schematic-shell > .section-heading #schemeLibraryButton.is-locked-control:disabled::after {
  content: none;
}

.schematic-shell > .section-heading #schemeLibraryButton.is-locked-control:disabled .scheme-library-trigger-chevron,
.schematic-shell > .section-heading .schematic-menu-group .chip-menu.is-locked-control::after {
  background-color: currentColor;
  opacity: 0.82;
  clip-path: none;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5.5' y='10.5' width='13' height='10' rx='2.5'/%3E%3Cpath d='M8.5 10.5V8a3.5 3.5 0 0 1 7 0v2.5'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5.5' y='10.5' width='13' height='10' rx='2.5'/%3E%3Cpath d='M8.5 10.5V8a3.5 3.5 0 0 1 7 0v2.5'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: 14px 14px;
  mask-size: 14px 14px;
}

.schematic-shell > .section-heading #schemeLibraryButton.is-locked-control:disabled .scheme-library-trigger-chevron {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 10px;
  color: var(--ribbon-action-text-muted);
  background-color: var(--ribbon-action-text-muted);
  opacity: 0.82;
}

.schematic-shell.is-layout-locked > .section-heading #schemeLibraryButton.is-locked-control:disabled .scheme-library-trigger-chevron {
  color: #ff6c7d;
  background-color: #ff6c7d;
  opacity: 0.96;
  filter: drop-shadow(0 0 5px rgba(255, 108, 125, 0.2));
}

.schematic-shell > .section-heading .schematic-menu-group .chip-menu.is-locked-control::after {
  width: 14px;
  height: 14px;
  right: 11px;
  transform: translateY(-50%);
}

.schematic-shell > .section-heading .schema-save-trigger-icon {
  border: none;
  background: transparent;
  box-shadow: none;
}

.schematic-shell > .section-heading .schema-save-trigger:hover:not(:disabled) .schema-save-trigger-icon,
.schematic-shell > .section-heading .schema-save-trigger:focus-visible .schema-save-trigger-icon,
.schematic-shell > .section-heading .schema-save-trigger:active:not(:disabled) .schema-save-trigger-icon {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.schematic-shell > .section-heading .schema-save-trigger.is-dirty {
  background: var(--ribbon-save-dirty-bg);
  border-color: var(--ribbon-save-dirty-border);
  color: var(--ribbon-save-dirty-text);
  box-shadow: var(--ribbon-action-surface-shadow);
}

.schematic-shell > .section-heading .schema-save-trigger.is-saving {
  background: rgba(67, 103, 132, 0.92);
  border-color: rgba(124, 181, 224, 0.56);
  box-shadow: var(--ribbon-action-surface-shadow);
}

.schematic-shell > .section-heading .schema-save-trigger.is-saved {
  background: rgba(63, 109, 87, 0.93);
  border-color: rgba(112, 198, 150, 0.54);
  box-shadow: var(--ribbon-action-surface-shadow);
}

@keyframes schema-save-trigger-pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.88);
  }
}
.schematic-shell > .section-heading p {
  max-width: 760px;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--workspace-schematic-heading-copy-color);
}

.schematic-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin-top: 0;
}
.schematic-panel { padding: 18px; }

.schematic-panel {
  border: 1px solid rgba(135, 151, 176, 0.18);
  border-radius: 0;
  background: linear-gradient(180deg, rgba(16, 22, 31, 0.98) 0%, rgba(10, 14, 20, 0.96) 100%);
}

.schematic-panel {
  position: relative;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}

.schematic-board {
  position: relative;
  min-height: clamp(880px, 79vh, 1080px);
  border-radius: 0;
  overflow: hidden;
  isolation: isolate;
  --wall-board-bg:
    radial-gradient(circle at center, rgba(120, 180, 255, 0.1) 0%, rgba(120, 180, 255, 0.04) 28%, rgba(0, 0, 0, 0) 60%),
    linear-gradient(180deg, #0c1420 0%, #111c2b 100%);
  --wall-board-border: rgba(198, 216, 239, 0.26);
  --wall-board-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    inset 0 0 0 1px rgba(8, 12, 16, 0.52),
    0 24px 36px rgba(0, 0, 0, 0.32);
  --wall-grid-overlay:
    linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px) 0 0 / 20px 20px,
    linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px) 0 0 / 20px 20px,
    linear-gradient(to right, rgba(255, 255, 255, 0.08) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(to bottom, rgba(255, 255, 255, 0.08) 1px, transparent 1px) 0 0 / 40px 40px;
  --wall-legend-border: rgba(108, 124, 145, 0.22);
  --wall-legend-bg: linear-gradient(180deg, rgba(11, 15, 20, 0.96) 0%, rgba(6, 9, 13, 0.94) 100%);
  --wall-legend-text: rgba(188, 202, 219, 0.88);
  --wall-instrument-pod-height: 38px;
  --wall-instrument-pod-radius: 999px;
  --wall-instrument-pod-border: rgba(114, 133, 157, 0.34);
  --wall-instrument-pod-bg: linear-gradient(180deg, rgba(12, 18, 26, 0.96) 0%, rgba(8, 12, 18, 0.95) 100%);
  --wall-instrument-pod-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    inset 0 -1px 0 rgba(0, 0, 0, 0.38),
    0 8px 16px rgba(0, 0, 0, 0.26);
  --wall-instrument-label-text: rgba(186, 203, 224, 0.92);
  --wall-instrument-segment-height: 30px;
  --wall-instrument-segment-radius: 999px;
  --wall-instrument-segment-bg: linear-gradient(180deg, rgba(33, 46, 62, 0.9) 0%, rgba(21, 31, 44, 0.9) 100%);
  --wall-instrument-segment-border: rgba(127, 149, 176, 0.3);
  --wall-instrument-segment-text: rgba(214, 226, 241, 0.94);
  --wall-instrument-segment-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(12, 20, 30, 0.28),
    0 1px 0 rgba(0, 0, 0, 0.24);
  --wall-instrument-segment-hover-bg: linear-gradient(180deg, rgba(44, 59, 76, 0.94) 0%, rgba(29, 41, 55, 0.94) 100%);
  --wall-instrument-segment-hover-border: rgba(147, 173, 203, 0.56);
  --wall-instrument-segment-hover-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 0 1px rgba(145, 181, 219, 0.16),
    0 6px 12px rgba(8, 15, 24, 0.28);
  --wall-instrument-segment-active-bg: linear-gradient(180deg, rgba(187, 219, 240, 0.98) 0%, rgba(160, 196, 222, 0.98) 100%);
  --wall-instrument-segment-active-border: rgba(112, 163, 199, 0.66);
  --wall-instrument-segment-active-text: #1a3e59;
  --wall-instrument-segment-active-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.62),
    0 0 0 1px rgba(103, 173, 214, 0.16),
    0 6px 12px rgba(33, 76, 109, 0.2);
  --wall-zone-surface-border: rgba(255, 255, 255, 0.62);
  --wall-zone-surface-bg: linear-gradient(180deg, rgba(31, 40, 52, 0.98) 0%, rgba(17, 24, 33, 0.98) 100%);
  --wall-zone-surface-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 0 1px rgba(202, 218, 237, 0.08),
    inset 0 -1px 0 rgba(0, 0, 0, 0.32),
    0 10px 18px rgba(0, 0, 0, 0.24);
  --wall-zone-title-color: #d8e4f2;
  --wall-zone-copy-color: #ffffff;
  --wall-zone-tag-border: rgba(112, 131, 155, 0.34);
  --wall-zone-tag-bg: rgba(21, 29, 38, 0.82);
  --wall-zone-tag-text: #9fb4cd;
  --wall-link-channel-color: rgba(164, 177, 194, 0.26);
  --wall-link-channel-selected-color: rgba(186, 222, 255, 0.34);
  --wall-link-green: rgba(89, 255, 148, 0.9);
  --wall-link-neutral: rgba(204, 191, 146, 0.9);
  --wall-link-red: rgba(255, 104, 122, 0.92);
  --wall-link-amber: rgba(255, 196, 93, 0.94);
  --wall-link-grey: rgba(168, 180, 194, 0.9);
  --wall-link-arrow-green: rgba(132, 255, 183, 0.99);
  --wall-link-arrow-neutral: rgba(228, 211, 164, 0.99);
  --wall-link-arrow-red: rgba(255, 136, 151, 0.99);
  --wall-link-arrow-amber: rgba(255, 219, 124, 0.99);
  --wall-link-arrow-grey: rgba(196, 207, 220, 0.99);
  --wall-link-hitarea-width: 14;
  --wall-link-route-channel-width: 6.2;
  --wall-link-route-line-width: 2.35;
  --wall-link-channel-width: 7.2;
  --wall-link-channel-selected-width: 9.2;
  --wall-link-path-width: 2.2;
  --wall-link-path-selected-width: 2.9;
  --wall-link-preview-width: 2.1;
  --wall-link-arrow-edge: rgba(6, 11, 18, 0.64);
  --wall-link-arrow-edge-width: 0.86;
  --wall-caption-color: rgba(178, 192, 212, 0.54);
  --wall-caption-shadow: 0 1px 0 rgba(0, 0, 0, 0.45);
  --board-zoom-scale: 1;
  --board-toolbar-pill-height: 38px;
  --board-toolbar-scale: 0.8;
  background: var(--wall-board-bg);
  border: 1px solid var(--wall-board-border);
  box-shadow: var(--wall-board-shadow);
}

.schematic-board[data-wall-colour-mode="light"] {
  --wall-board-bg:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(251, 252, 254, 0.58) 12%, transparent 13%),
    linear-gradient(180deg, #fbfcfe 0%, #f7f9fc 58%, #f3f6fa 100%);
  --wall-board-border: rgba(215, 224, 234, 0.96);
  --wall-board-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.98),
    inset 0 1px 0 rgba(255, 255, 255, 1),
    inset 0 0 0 1px rgba(227, 233, 240, 0.82),
    0 18px 28px rgba(74, 105, 138, 0.05);
  --wall-grid-overlay:
    linear-gradient(rgba(90, 107, 127, 0.05) 1px, transparent 1px) 0 0 / 12px 12px,
    linear-gradient(90deg, rgba(90, 107, 127, 0.05) 1px, transparent 1px) 0 0 / 12px 12px,
    linear-gradient(rgba(90, 107, 127, 0.075) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, rgba(90, 107, 127, 0.075) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(rgba(90, 107, 127, 0.1) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, rgba(90, 107, 127, 0.1) 1px, transparent 1px) 0 0 / 48px 48px;
  --wall-legend-border: rgba(215, 224, 234, 0.96);
  --wall-legend-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(247, 249, 252, 0.94) 100%);
  --wall-legend-text: #233246;
  --wall-instrument-pod-height: 38px;
  --wall-instrument-pod-radius: 999px;
  --wall-instrument-pod-border: rgba(205, 218, 232, 0.96);
  --wall-instrument-pod-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(246, 249, 252, 0.98) 100%);
  --wall-instrument-pod-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 1),
    inset 0 -1px 0 rgba(191, 205, 221, 0.5),
    0 8px 14px rgba(82, 107, 136, 0.14);
  --wall-instrument-label-text: #2b4058;
  --wall-instrument-segment-height: 30px;
  --wall-instrument-segment-radius: 999px;
  --wall-instrument-segment-bg: linear-gradient(180deg, rgba(233, 239, 247, 0.99) 0%, rgba(212, 223, 235, 0.99) 100%);
  --wall-instrument-segment-border: rgba(117, 138, 162, 0.42);
  --wall-instrument-segment-text: #33495f;
  --wall-instrument-segment-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    inset 0 -1px 0 rgba(178, 193, 212, 0.44),
    0 1px 0 rgba(255, 255, 255, 0.8);
  --wall-instrument-segment-hover-bg: linear-gradient(180deg, rgba(225, 234, 244, 1) 0%, rgba(201, 214, 229, 1) 100%);
  --wall-instrument-segment-hover-border: rgba(96, 120, 147, 0.56);
  --wall-instrument-segment-hover-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 0 0 1px rgba(111, 143, 176, 0.14),
    0 6px 12px rgba(75, 102, 132, 0.18);
  --wall-instrument-segment-active-bg: linear-gradient(180deg, rgba(188, 220, 240, 0.98) 0%, rgba(164, 202, 228, 0.98) 100%);
  --wall-instrument-segment-active-border: rgba(96, 155, 196, 0.7);
  --wall-instrument-segment-active-text: #1a425d;
  --wall-instrument-segment-active-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.76),
    0 0 0 1px rgba(100, 157, 196, 0.14),
    0 6px 12px rgba(66, 118, 158, 0.18);
  --wall-zone-surface-border: rgba(255, 255, 255, 0.58);
  --wall-zone-surface-bg: linear-gradient(180deg, rgba(33, 43, 56, 0.98) 0%, rgba(24, 32, 43, 0.98) 100%);
  --wall-zone-surface-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 0 1px rgba(202, 218, 237, 0.08),
    inset 0 -1px 0 rgba(0, 0, 0, 0.28),
    0 8px 14px rgba(24, 38, 52, 0.14);
  --wall-zone-title-color: #d8e4f2;
  --wall-zone-copy-color: #ffffff;
  --wall-zone-tag-border: rgba(112, 131, 155, 0.34);
  --wall-zone-tag-bg: rgba(21, 29, 38, 0.82);
  --wall-zone-tag-text: #9fb4cd;
  --wall-link-channel-color: rgba(67, 87, 110, 0.42);
  --wall-link-channel-selected-color: rgba(67, 126, 183, 0.54);
  --wall-link-green: rgba(44, 184, 114, 0.95);
  --wall-link-neutral: rgba(165, 139, 90, 0.94);
  --wall-link-red: rgba(206, 82, 101, 0.95);
  --wall-link-amber: rgba(210, 145, 47, 0.96);
  --wall-link-grey: rgba(114, 131, 151, 0.96);
  --wall-link-arrow-green: rgba(72, 210, 145, 0.99);
  --wall-link-arrow-neutral: rgba(196, 169, 116, 0.99);
  --wall-link-arrow-red: rgba(234, 110, 130, 0.99);
  --wall-link-arrow-amber: rgba(238, 179, 80, 0.99);
  --wall-link-arrow-grey: rgba(145, 162, 182, 0.99);
  --wall-link-arrow-edge: rgba(26, 39, 56, 0.62);
  --wall-link-arrow-edge-width: 0.82;
  --wall-caption-color: #5a6b7f;
  --wall-caption-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
}

.schematic-board::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: none;
}

.schematic-board::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--wall-grid-overlay);
}

.schematic-nameplate,
.schematic-chip-layer,
.schematic-zone,
.schematic-caption,
.schematic-chip-links,
.schematic-routes,
.schematic-route-lights,
.schematic-nodes,
.schematic-control-mounts {
  position: absolute;
}

.schematic-chip-layer {
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.schematic-chip-layer > * {
  pointer-events: auto;
}

.schematic-nameplate {
  top: 18px;
  left: 18px;
  right: 250px;
  z-index: 8;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(156, 173, 194, 0.16);
  background: linear-gradient(180deg, rgba(24, 31, 40, 0.88) 0%, rgba(14, 20, 27, 0.84) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.schematic-kicker {
  margin: 0 0 6px;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(178, 195, 216, 0.7);
}

.schematic-nameplate h3 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.schematic-status-ribbon {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
  text-align: right;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.schematic-board-toolbar {
  position: absolute;
  top: 52px;
  left: 16px;
  right: 16px;
  z-index: 8;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto auto;
  grid-template-areas:
    "lock legend flow route zoom"
    "trend trend trend trend trend";
  align-items: flex-start;
  gap: 16px;
  pointer-events: none;
}

.schematic-lock-controls {
  grid-area: lock;
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-height: var(--board-toolbar-pill-height);
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--wall-legend-border);
  background: var(--wall-legend-bg);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 10px 18px rgba(0, 0, 0, 0.24);
  pointer-events: auto;
  transform: scale(var(--board-toolbar-scale));
  transform-origin: left top;
}

.schematic-lock-button {
  min-width: 74px;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(126, 146, 170, 0.24);
  background: rgba(15, 21, 28, 0.34);
  color: var(--wall-legend-text);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: none;
}

.schematic-lock-move-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 84px;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(126, 146, 170, 0.24);
  background: rgba(15, 21, 28, 0.34);
  color: #ffd25f;
  box-shadow: none;
}

.schematic-lock-move-button:hover:not(:disabled),
.schematic-lock-move-button:focus-visible {
  transform: none;
  border-color: rgba(255, 180, 86, 0.4);
  background: rgba(255, 170, 58, 0.14);
  box-shadow: 0 0 0 1px rgba(255, 170, 58, 0.18);
}

.schematic-lock-move-button.is-active {
  border-color: rgba(255, 178, 74, 0.56);
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 225, 176, 0.24), transparent 58%),
    rgba(255, 148, 34, 0.34);
  color: #fff0cb;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 0 1px rgba(255, 178, 74, 0.2),
    0 0 14px rgba(255, 148, 34, 0.18);
}

.schematic-lock-move-button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.schematic-board[data-wall-colour-mode="light"] .schematic-lock-move-button {
  border-color: rgba(88, 105, 126, 0.34);
  background:
    linear-gradient(180deg, rgba(77, 91, 109, 0.94) 0%, rgba(55, 68, 84, 0.96) 100%);
  color: #ffc94a;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 8px 16px rgba(49, 63, 79, 0.14);
}

.schematic-board[data-wall-colour-mode="light"] .schematic-lock-move-button:hover:not(:disabled),
.schematic-board[data-wall-colour-mode="light"] .schematic-lock-move-button:focus-visible {
  border-color: rgba(255, 182, 76, 0.42);
  background:
    linear-gradient(180deg, rgba(95, 111, 130, 0.96) 0%, rgba(66, 81, 98, 0.98) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 0 1px rgba(255, 182, 76, 0.12),
    0 10px 18px rgba(49, 63, 79, 0.16);
}

.schematic-board[data-wall-colour-mode="light"] .schematic-lock-move-button.is-active {
  border-color: rgba(220, 128, 30, 0.66);
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 226, 174, 0.18), transparent 56%),
    linear-gradient(180deg, rgba(205, 124, 31, 0.94) 0%, rgba(163, 88, 15, 0.97) 100%);
  color: #fff4d6;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 0 0 1px rgba(220, 128, 30, 0.14),
    0 10px 18px rgba(168, 97, 24, 0.2);
}

.schematic-lock-move-button-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 19px;
  height: 19px;
}

.schematic-lock-move-button-label {
  display: inline-flex;
  align-items: center;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.62rem;
  font-weight: 800;
  padding-top: 1.5px;
  line-height: 1;
}

.schematic-lock-move-button-icon svg {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.schematic-lock-button:hover:not(:disabled),
.schematic-lock-button:focus-visible {
  transform: none;
  border-color: rgba(103, 198, 255, 0.3);
  background: rgba(103, 198, 255, 0.1);
  box-shadow: 0 0 0 1px rgba(103, 198, 255, 0.14);
}

.schematic-lock-button.is-active {
  color: #e7f4ff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(103, 198, 255, 0.16);
}

.schematic-lock-button[data-board-layout-lock="unlocked"].is-active {
  border-color: rgba(108, 255, 176, 0.58);
  background:
    radial-gradient(circle at 50% 35%, rgba(209, 255, 228, 0.28), transparent 58%),
    rgba(55, 210, 116, 0.34);
  color: #f3fff8;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 0 1px rgba(108, 255, 176, 0.22),
    0 0 14px rgba(108, 255, 176, 0.18);
}

.schematic-lock-button[data-board-layout-lock="locked"].is-active {
  border-color: rgba(255, 118, 132, 0.6);
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 214, 219, 0.24), transparent 58%),
    rgba(221, 61, 84, 0.36);
  color: #fff5f6;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 0 1px rgba(255, 118, 132, 0.22),
    0 0 14px rgba(255, 118, 132, 0.18);
}

.schematic-board-toolbar > .schematic-legend {
  grid-area: legend;
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  justify-self: start;
  margin-left: 1.2vw;
  min-height: var(--board-toolbar-pill-height);
  gap: 10px;
  max-width: min(100%, 960px);
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--wall-legend-border);
  background: var(--wall-legend-bg);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--wall-legend-text);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 10px 18px rgba(0, 0, 0, 0.24);
  pointer-events: none;
  white-space: nowrap;
  transform: scale(var(--board-toolbar-scale));
  transform-origin: center top;
}

.schematic-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.schematic-legend-metric {
  text-transform: none;
  letter-spacing: 0.02em;
}

.schematic-zoom-controls {
  grid-area: zoom;
  display: inline-flex;
  align-items: center;
  justify-self: end;
  min-height: var(--board-toolbar-pill-height);
  gap: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--wall-legend-border);
  background: var(--wall-legend-bg);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 10px 18px rgba(0, 0, 0, 0.24);
  pointer-events: auto;
  transform: scale(var(--board-toolbar-scale));
  transform-origin: right top;
}

.schematic-board-toolbar > .schematic-route-style-controls {
  grid-area: route;
  display: inline-flex;
  align-items: center;
  justify-self: start;
  /* margin-left: -200px; */
  left: -4vw;
  position: relative;
  min-height: var(--board-toolbar-pill-height);
  gap: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--wall-legend-border);
  background: var(--wall-legend-bg);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 10px 18px rgba(0, 0, 0, 0.24);
  pointer-events: auto;
  transform: scale(var(--board-toolbar-scale));
  transform-origin: right top;
}

.schematic-board-toolbar > .schematic-flow-style-controls {
  grid-area: flow;
  display: none;
  align-items: center;
  justify-self: end;
  position: relative;
  right: 6vw;
  min-height: var(--board-toolbar-pill-height);
  gap: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--wall-legend-border);
  background: var(--wall-legend-bg);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 10px 18px rgba(0, 0, 0, 0.24);
  pointer-events: auto;
  transform: scale(var(--board-toolbar-scale));
  transform-origin: right top;
}

.schematic-board-toolbar > .schematic-flow-style-controls {
  display: inline-flex;
}

.schematic-route-style-label,
.schematic-flow-style-label {
  color: var(--wall-legend-text);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.schematic-route-style-button,
.schematic-flow-style-button {
  min-width: 74px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(126, 146, 170, 0.26);
  background: linear-gradient(180deg, rgba(30, 40, 52, 0.88) 0%, rgba(19, 27, 37, 0.9) 100%);
  color: rgba(212, 224, 238, 0.94);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 1px 0 rgba(0, 0, 0, 0.24);
  transition:
    background 120ms ease,
    border-color 120ms ease,
    color 120ms ease,
    box-shadow 120ms ease,
    transform 120ms ease;
}

.schematic-route-style-button:hover:not(:disabled),
.schematic-route-style-button:focus-visible,
.schematic-flow-style-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(129, 179, 219, 0.52);
  background: linear-gradient(180deg, rgba(42, 56, 72, 0.92) 0%, rgba(27, 38, 51, 0.94) 100%);
  color: #eef6ff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 0 1px rgba(129, 179, 219, 0.16),
    0 8px 14px rgba(10, 18, 27, 0.28);
}

.schematic-route-style-button.is-active,
.schematic-flow-style-button.is-active {
  border-color: rgba(137, 202, 248, 0.62);
  background: linear-gradient(180deg, rgba(194, 231, 255, 0.98) 0%, rgba(164, 214, 248, 0.98) 100%);
  color: #17324a;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 0 0 1px rgba(103, 198, 255, 0.2),
    0 8px 16px rgba(53, 115, 160, 0.22);
}

.schematic-route-style-button.is-active:hover:not(:disabled),
.schematic-route-style-button.is-active:focus-visible,
.schematic-flow-style-button.is-active:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(121, 189, 239, 0.72);
  background: linear-gradient(180deg, rgba(204, 236, 255, 1) 0%, rgba(174, 220, 250, 1) 100%);
  color: #123149;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.76),
    0 0 0 1px rgba(103, 198, 255, 0.24),
    0 10px 18px rgba(53, 115, 160, 0.24);
}

.schematic-board[data-wall-colour-mode="light"] .schematic-route-style-button,
.schematic-board[data-wall-colour-mode="light"] .schematic-flow-style-button {
  background: linear-gradient(180deg, rgba(227, 234, 243, 0.98) 0%, rgba(205, 217, 231, 0.98) 100%);
  border-color: rgba(111, 129, 151, 0.44);
  color: #314559;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 1px 0 rgba(255, 255, 255, 0.68),
    0 6px 12px rgba(88, 108, 132, 0.16);
}

.schematic-board[data-wall-colour-mode="light"] .schematic-route-style-button:hover:not(:disabled),
.schematic-board[data-wall-colour-mode="light"] .schematic-route-style-button:focus-visible,
.schematic-board[data-wall-colour-mode="light"] .schematic-flow-style-button:focus-visible {
  border-color: rgba(90, 112, 136, 0.52);
  background: linear-gradient(180deg, rgba(219, 229, 240, 0.99) 0%, rgba(195, 208, 224, 0.99) 100%);
  color: #213a53;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 0 0 1px rgba(90, 112, 136, 0.14),
    0 8px 16px rgba(88, 108, 132, 0.2);
}

.schematic-board[data-wall-colour-mode="light"] .schematic-route-style-button.is-active,
.schematic-board[data-wall-colour-mode="light"] .schematic-flow-style-button.is-active {
  border-color: rgba(105, 168, 214, 0.66);
  background: linear-gradient(180deg, rgba(194, 230, 252, 0.99) 0%, rgba(166, 214, 245, 0.99) 100%);
  color: #12354f;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 0 0 1px rgba(105, 168, 214, 0.18),
    0 9px 16px rgba(82, 135, 176, 0.22);
}

.schematic-board[data-wall-colour-mode="light"] .schematic-route-style-button.is-active:hover:not(:disabled),
.schematic-board[data-wall-colour-mode="light"] .schematic-route-style-button.is-active:focus-visible,
.schematic-board[data-wall-colour-mode="light"] .schematic-flow-style-button.is-active:focus-visible {
  border-color: rgba(92, 156, 204, 0.74);
  background: linear-gradient(180deg, rgba(202, 234, 254, 1) 0%, rgba(172, 219, 248, 1) 100%);
  color: #0e314b;
}

.schematic-zoom-label {
  color: var(--wall-legend-text);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.schematic-zoom-button {
  min-width: 48px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(126, 146, 170, 0.24);
  background: rgba(15, 21, 28, 0.34);
  color: var(--wall-legend-text);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: none;
}

.schematic-zoom-button:hover:not(:disabled),
.schematic-zoom-button:focus-visible {
  transform: none;
  border-color: rgba(103, 198, 255, 0.3);
  background: rgba(103, 198, 255, 0.1);
  box-shadow: 0 0 0 1px rgba(103, 198, 255, 0.14);
}

.schematic-zoom-button.is-active {
  border-color: rgba(84, 168, 221, 0.78);
  background: linear-gradient(180deg, rgba(190, 226, 248, 0.98) 0%, rgba(153, 203, 235, 0.98) 100%);
  color: #12344d;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 0 0 1px rgba(84, 168, 221, 0.26),
    0 6px 12px rgba(70, 126, 168, 0.18);
}

.schematic-trend-controls {
  grid-area: trend;
  justify-self: stretch;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 14px;
  padding: 0 10px;
  pointer-events: auto;
  transform: none;
}

.schematic-trend-label {
  color: rgba(52, 73, 98, 0.86);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.schematic-trend-track {
  position: relative;
  flex: 1 1 auto;
  height: 12px;
}

.schematic-trend-track::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(68, 102, 141, 0.55), rgba(68, 102, 141, 0.32));
  transform: translateY(-50%);
}

.schematic-trend-stop {
  position: absolute;
  top: -8px;
  width: 24px;
  height: 30px;
  margin-left: -12px;
  border: none;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
  cursor: ew-resize;
  touch-action: none;
}

.schematic-trend-stop::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4px;
  height: 20px;
  border-radius: 2px;
  background: rgba(204, 27, 27, 0.9);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.3),
    0 1px 3px rgba(0, 0, 0, 0.22);
  transform: translate(-50%, -50%);
}

.schematic-trend-stop::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 42px;
  height: 42px;
  transform: translate(-50%, -50%);
}

.schematic-trend-stop:hover,
.schematic-trend-stop:focus-visible {
  background: rgba(178, 196, 220, 0.12);
  outline: none;
}

.schematic-trend-stop:hover::before,
.schematic-trend-stop:focus-visible::before {
  background: rgba(186, 22, 22, 0.95);
}

.schematic-row-controls {
  position: absolute;
  left: 12px;
  top: 96px;
  bottom: 26px;
  z-index: 9;
  width: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.schematic-row-label {
  color: rgba(52, 73, 98, 0.86);
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.schematic-row-track {
  position: relative;
  flex: 1 1 auto;
  width: 12px;
  pointer-events: auto;
}

.schematic-row-track::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  margin-left: -1px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(68, 102, 141, 0.55), rgba(68, 102, 141, 0.32));
}

.schematic-row-stop {
  position: absolute;
  left: -8px;
  width: 30px;
  height: 24px;
  margin-top: -12px;
  border: none;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
  cursor: ns-resize;
  touch-action: none;
}

.schematic-row-stop::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20px;
  height: 4px;
  margin-left: -10px;
  margin-top: -2px;
  border-radius: 2px;
  background: rgba(204, 27, 27, 0.9);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.3),
    0 1px 3px rgba(0, 0, 0, 0.22);
}

.schematic-row-stop::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 40px;
  transform: translate(-50%, -50%);
}

.schematic-row-stop:hover,
.schematic-row-stop:focus-visible {
  background: rgba(178, 196, 220, 0.12);
  outline: none;
}

.schematic-row-stop:hover::before,
.schematic-row-stop:focus-visible::before {
  background: rgba(186, 22, 22, 0.95);
}

.schematic-trend-drag-shield {
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  cursor: ew-resize;
  touch-action: none;
  background: transparent;
}

body.is-board-trend-dragging {
  cursor: ew-resize;
  user-select: none;
}

.schematic-row-drag-shield {
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  cursor: ns-resize;
  touch-action: none;
  background: transparent;
}

body.is-board-row-dragging {
  cursor: ns-resize;
  user-select: none;
}

.schematic-board[data-wall-colour-mode="light"] .schematic-zoom-button {
  background: rgba(214, 224, 236, 0.62);
  border-color: rgba(109, 128, 151, 0.34);
}

.schematic-board[data-wall-colour-mode="light"] .schematic-zoom-button:hover:not(:disabled),
.schematic-board[data-wall-colour-mode="light"] .schematic-zoom-button:focus-visible {
  background: rgba(205, 217, 231, 0.84);
  border-color: rgba(93, 116, 141, 0.42);
  box-shadow: 0 0 0 1px rgba(93, 116, 141, 0.12);
}

.schematic-board[data-wall-colour-mode="light"] .schematic-zoom-button.is-active {
  background: rgba(183, 198, 216, 0.92);
  border-color: rgba(93, 116, 141, 0.46);
  color: rgba(27, 44, 66, 0.96);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    0 0 0 1px rgba(93, 116, 141, 0.12);
}

.schematic-board[data-wall-colour-mode="light"] .schematic-lock-button {
  background:
    linear-gradient(180deg, rgba(231, 237, 244, 0.98) 0%, rgba(206, 217, 230, 0.98) 100%);
  border-color: rgba(111, 129, 151, 0.44);
  color: #314559;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 1px 0 rgba(255, 255, 255, 0.7),
    0 6px 12px rgba(88, 108, 132, 0.16);
}

.schematic-board[data-wall-colour-mode="light"] .schematic-lock-button:hover:not(:disabled),
.schematic-board[data-wall-colour-mode="light"] .schematic-lock-button:focus-visible {
  background:
    linear-gradient(180deg, rgba(224, 232, 241, 0.99) 0%, rgba(196, 208, 222, 0.99) 100%);
  border-color: rgba(90, 112, 136, 0.52);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 0 0 1px rgba(90, 112, 136, 0.12),
    0 8px 16px rgba(88, 108, 132, 0.18);
}

.schematic-board[data-wall-colour-mode="light"] .schematic-lock-button.is-active {
  color: rgba(255, 255, 255, 0.98);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 0 0 1px rgba(93, 116, 141, 0.14),
    0 8px 16px rgba(88, 108, 132, 0.18);
}

.schematic-board[data-wall-colour-mode="light"] .schematic-lock-button[data-board-layout-lock="unlocked"].is-active {
  background:
    radial-gradient(circle at 50% 28%, rgba(220, 255, 235, 0.22), transparent 56%),
    linear-gradient(180deg, rgba(58, 171, 103, 0.98) 0%, rgba(31, 129, 74, 0.99) 100%);
  border-color: rgba(24, 105, 59, 0.76);
  color: rgba(247, 255, 250, 0.99);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 0 0 1px rgba(58, 146, 92, 0.16),
    0 10px 18px rgba(35, 122, 72, 0.2);
}

.schematic-board[data-wall-colour-mode="light"] .schematic-lock-button[data-board-layout-lock="locked"].is-active {
  background:
    radial-gradient(circle at 50% 28%, rgba(255, 226, 230, 0.2), transparent 56%),
    linear-gradient(180deg, rgba(210, 88, 103, 0.98) 0%, rgba(171, 47, 63, 0.99) 100%);
  border-color: rgba(137, 36, 50, 0.78);
  color: rgba(255, 246, 247, 0.99);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 0 0 1px rgba(174, 72, 85, 0.16),
    0 10px 18px rgba(154, 44, 59, 0.2);
}

.schematic-board[data-wall-colour-mode="light"] .schematic-lock-button[data-board-layout-lock="locked"]:not(.is-active) {
  font-weight: 800;
  font-size: 11px;
  color: #22364a;
  transform: translateY(1px);
}

/* Unified micro-control instrument pod system */
.schematic-lock-controls,
.schematic-legend,
.schematic-zoom-controls,
.schematic-route-style-controls,
.schematic-flow-style-controls {
  min-height: var(--wall-instrument-pod-height);
  border-radius: var(--wall-instrument-pod-radius);
  border: 1px solid var(--wall-instrument-pod-border);
  background: var(--wall-instrument-pod-bg);
  box-shadow: var(--wall-instrument-pod-shadow);
}

.schematic-lock-controls,
.schematic-zoom-controls,
.schematic-route-style-controls,
.schematic-flow-style-controls {
  gap: 6px;
  padding: 4px 8px;
}

.schematic-legend {
  gap: 8px;
  padding: 4px 10px;
  color: var(--wall-instrument-label-text);
}

.schematic-legend span {
  gap: 4px;
}

.schematic-legend-metric {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--wall-instrument-label-text);
}

.schematic-legend .led {
  width: 12px;
  height: 12px;
  box-shadow:
    0 0 0 1px rgba(16, 23, 33, 0.24),
    0 0 6px currentColor;
}

.schematic-route-style-label,
.schematic-flow-style-label,
.schematic-zoom-label {
  color: var(--wall-instrument-label-text);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.schematic-lock-button,
.schematic-lock-move-button,
.schematic-route-style-button,
.schematic-flow-style-button,
.schematic-zoom-button {
  height: var(--wall-instrument-segment-height);
  border-radius: var(--wall-instrument-segment-radius);
  border: 1px solid var(--wall-instrument-segment-border);
  background: var(--wall-instrument-segment-bg);
  color: var(--wall-instrument-segment-text);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: var(--wall-instrument-segment-shadow);
  transition:
    transform 120ms ease,
    background 120ms ease,
    border-color 120ms ease,
    color 120ms ease,
    box-shadow 120ms ease;
}

.schematic-lock-button,
.schematic-route-style-button,
.schematic-flow-style-button {
  min-width: 68px;
  padding: 0 10px;
}

.schematic-lock-move-button {
  min-width: 78px;
  gap: 6px;
  padding: 0 10px;
  color: #ecf5ff;
}

.schematic-zoom-button {
  min-width: 44px;
  padding: 0 9px;
}

.schematic-lock-button:hover:not(:disabled),
.schematic-lock-button:focus-visible,
.schematic-lock-move-button:hover:not(:disabled),
.schematic-lock-move-button:focus-visible,
.schematic-route-style-button:hover:not(:disabled),
.schematic-route-style-button:focus-visible,
.schematic-flow-style-button:focus-visible,
.schematic-zoom-button:hover:not(:disabled),
.schematic-zoom-button:focus-visible {
  transform: translateY(-1px);
  border-color: var(--wall-instrument-segment-hover-border);
  background: var(--wall-instrument-segment-hover-bg);
  color: var(--wall-instrument-segment-text);
  box-shadow: var(--wall-instrument-segment-hover-shadow);
}

.schematic-lock-button.is-active,
.schematic-lock-button[data-board-layout-lock="unlocked"].is-active,
.schematic-lock-button[data-board-layout-lock="locked"].is-active,
.schematic-lock-move-button.is-active,
.schematic-route-style-button.is-active,
.schematic-flow-style-button.is-active,
.schematic-zoom-button.is-active,
.schematic-lock-button.is-active:hover:not(:disabled),
.schematic-lock-button.is-active:focus-visible,
.schematic-lock-button[data-board-layout-lock="unlocked"].is-active:hover:not(:disabled),
.schematic-lock-button[data-board-layout-lock="unlocked"].is-active:focus-visible,
.schematic-lock-button[data-board-layout-lock="locked"].is-active:hover:not(:disabled),
.schematic-lock-button[data-board-layout-lock="locked"].is-active:focus-visible,
.schematic-lock-move-button.is-active:hover:not(:disabled),
.schematic-lock-move-button.is-active:focus-visible,
.schematic-route-style-button.is-active:hover:not(:disabled),
.schematic-route-style-button.is-active:focus-visible,
.schematic-flow-style-button.is-active:focus-visible,
.schematic-zoom-button.is-active:hover:not(:disabled),
.schematic-zoom-button.is-active:focus-visible {
  transform: translateY(-1px);
  border-color: var(--wall-instrument-segment-active-border);
  background: var(--wall-instrument-segment-active-bg);
  color: var(--wall-instrument-segment-active-text);
  box-shadow: var(--wall-instrument-segment-active-shadow);
}

.schematic-lock-move-button-label {
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  font-weight: 800;
  padding-top: 1.5px;
}

.schematic-zoom-button.is-active,
.schematic-zoom-button.is-active:hover:not(:disabled),
.schematic-zoom-button.is-active:focus-visible {
  border-color: rgba(84, 168, 221, 0.78);
  background: linear-gradient(180deg, rgba(190, 226, 248, 0.98) 0%, rgba(153, 203, 235, 0.98) 100%);
  color: #12344d;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 0 0 1px rgba(84, 168, 221, 0.26),
    0 6px 12px rgba(70, 126, 168, 0.18);
}

.schematic-lock-move-button-icon {
  width: 16px;
  height: 16px;
}

.schematic-lock-move-button-icon svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.9;
}

.schematic-board[data-wall-colour-mode="light"] .schematic-lock-move-button {
  color: #23435d;
}

.schematic-lock-button:disabled,
.schematic-lock-move-button:disabled,
.schematic-route-style-button:disabled,
.schematic-flow-style-button:disabled,
.schematic-zoom-button:disabled {
  opacity: 0.5;
  transform: none;
  box-shadow: none;
}

.schematic-board[data-wall-colour-mode="light"] .schematic-lock-button,
.schematic-board[data-wall-colour-mode="light"] .schematic-lock-move-button,
.schematic-board[data-wall-colour-mode="light"] .schematic-route-style-button,
.schematic-board[data-wall-colour-mode="light"] .schematic-flow-style-button,
.schematic-board[data-wall-colour-mode="light"] .schematic-zoom-button {
  border-color: var(--wall-instrument-segment-border);
  background: var(--wall-instrument-segment-bg);
  color: var(--wall-instrument-segment-text);
  box-shadow: var(--wall-instrument-segment-shadow);
}

.schematic-board[data-wall-colour-mode="light"] .schematic-zoom-button.is-active,
.schematic-board[data-wall-colour-mode="light"] .schematic-zoom-button.is-active:hover:not(:disabled),
.schematic-board[data-wall-colour-mode="light"] .schematic-zoom-button.is-active:focus-visible {
  background: #abd8f5;
}

.schematic-board[data-wall-colour-mode="light"] .schematic-lock-button:hover:not(:disabled),
.schematic-board[data-wall-colour-mode="light"] .schematic-lock-button:focus-visible,
.schematic-board[data-wall-colour-mode="light"] .schematic-lock-move-button:hover:not(:disabled),
.schematic-board[data-wall-colour-mode="light"] .schematic-lock-move-button:focus-visible,
.schematic-board[data-wall-colour-mode="light"] .schematic-route-style-button:hover:not(:disabled),
.schematic-board[data-wall-colour-mode="light"] .schematic-route-style-button:focus-visible,
.schematic-board[data-wall-colour-mode="light"] .schematic-flow-style-button:focus-visible,
.schematic-board[data-wall-colour-mode="light"] .schematic-zoom-button:hover:not(:disabled),
.schematic-board[data-wall-colour-mode="light"] .schematic-zoom-button:focus-visible {
  border-color: var(--wall-instrument-segment-hover-border);
  background: var(--wall-instrument-segment-hover-bg);
  color: var(--wall-instrument-segment-text);
  box-shadow: var(--wall-instrument-segment-hover-shadow);
}

.schematic-board[data-wall-colour-mode="light"] .schematic-lock-button.is-active,
.schematic-board[data-wall-colour-mode="light"] .schematic-lock-button[data-board-layout-lock="unlocked"].is-active,
.schematic-board[data-wall-colour-mode="light"] .schematic-lock-button[data-board-layout-lock="locked"].is-active,
.schematic-board[data-wall-colour-mode="light"] .schematic-lock-move-button.is-active,
.schematic-board[data-wall-colour-mode="light"] .schematic-route-style-button.is-active,
.schematic-board[data-wall-colour-mode="light"] .schematic-flow-style-button.is-active,
.schematic-board[data-wall-colour-mode="light"] .schematic-zoom-button.is-active,
.schematic-board[data-wall-colour-mode="light"] .schematic-lock-button.is-active:hover:not(:disabled),
.schematic-board[data-wall-colour-mode="light"] .schematic-lock-button.is-active:focus-visible,
.schematic-board[data-wall-colour-mode="light"] .schematic-lock-move-button.is-active:hover:not(:disabled),
.schematic-board[data-wall-colour-mode="light"] .schematic-lock-move-button.is-active:focus-visible,
.schematic-board[data-wall-colour-mode="light"] .schematic-route-style-button.is-active:hover:not(:disabled),
.schematic-board[data-wall-colour-mode="light"] .schematic-route-style-button.is-active:focus-visible,
.schematic-board[data-wall-colour-mode="light"] .schematic-flow-style-button.is-active:focus-visible,
.schematic-board[data-wall-colour-mode="light"] .schematic-zoom-button.is-active:hover:not(:disabled),
.schematic-board[data-wall-colour-mode="light"] .schematic-zoom-button.is-active:focus-visible {
  border-color: rgba(84, 160, 211, 0.78);
  background: linear-gradient(180deg, rgba(198, 232, 252, 0.99) 0%, rgba(168, 214, 244, 0.99) 100%);
  color: #11344d;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 0 0 1px rgba(84, 160, 211, 0.22),
    0 8px 14px rgba(76, 130, 170, 0.2);
}

.schematic-board[data-wall-colour-mode="light"] .schematic-lock-button[data-board-layout-lock="locked"]:not(.is-active) {
  font-size: 0.64rem;
  font-weight: 700;
  transform: none;
  color: var(--wall-instrument-segment-text);
}

.schematic-board[data-wall-colour-mode="light"] .schematic-zoom-button.is-active,
.schematic-board[data-wall-colour-mode="light"] .schematic-zoom-button.is-active:hover:not(:disabled),
.schematic-board[data-wall-colour-mode="light"] .schematic-zoom-button.is-active:focus-visible {
  border-color: rgba(84, 160, 211, 0.78);
  background: linear-gradient(180deg, rgba(198, 232, 252, 0.99) 0%, rgba(168, 214, 244, 0.99) 100%);
  color: #11344d;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 0 0 1px rgba(84, 160, 211, 0.22),
    0 8px 14px rgba(76, 130, 170, 0.2);
}

/* Zoom widget only: lock active background to exact #abd8f5 */
.schematic-board[data-wall-colour-mode="light"] #boardZoomControls .schematic-zoom-button.is-active,
.schematic-board[data-wall-colour-mode="light"] #boardZoomControls .schematic-zoom-button.is-active:hover:not(:disabled),
.schematic-board[data-wall-colour-mode="light"] #boardZoomControls .schematic-zoom-button.is-active:focus-visible {
  background: #abd8f5;
  background-image: none;
}

@media (max-width: 1280px) {
  .schematic-board {
    --wall-instrument-pod-height: 34px;
    --wall-instrument-segment-height: 27px;
  }
}

.schematic-zone {
  position: absolute;
  z-index: 3;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 14px 16px 8px;
  border-radius: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  isolation: isolate;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  overflow: hidden;
  transform: scale(var(--board-zoom-scale));
  transform-origin: top left;
}

.schematic-zone.is-dragging {
  cursor: grabbing;
}

.schematic-board.is-layout-locked .schematic-zone,
.schematic-board.is-layout-locked .route-indicator,
.schematic-board.is-layout-locked .junction-mount {
  cursor: default;
}

.schematic-board.is-scheme-move-enabled,
.schematic-board.is-scheme-move-enabled .schematic-zone,
.schematic-board.is-scheme-move-enabled .route-indicator,
.schematic-board.is-scheme-move-enabled .junction-mount {
  cursor: grab;
}

.schematic-board.is-scheme-move-enabled {
  touch-action: none;
  overscroll-behavior: contain;
}

.schematic-board.is-scheme-moving,
.schematic-board.is-scheme-moving .schematic-zone,
.schematic-board.is-scheme-moving .route-indicator,
.schematic-board.is-scheme-moving .junction-mount {
  cursor: grabbing;
}

.schematic-zone.is-resizing {
  cursor: nwse-resize;
}

.schematic-zone.is-disabled::before,
.schematic-zone.is-sandbox-forced-red::before {
  border-color: rgba(171, 186, 203, 0.42);
  background:
    linear-gradient(180deg, rgba(24, 31, 40, 0.96) 0%, rgba(14, 19, 27, 0.98) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 0 1px rgba(178, 190, 203, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.28),
    0 8px 16px rgba(0, 0, 0, 0.18);
}

.schematic-zone.is-sandbox-forced-red::before {
  border-color: rgba(169, 112, 122, 0.38);
  background:
    linear-gradient(180deg, rgba(35, 24, 29, 0.96) 0%, rgba(22, 14, 18, 0.98) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 210, 219, 0.08),
    0 0 0 1px rgba(189, 121, 135, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3),
    0 8px 16px rgba(0, 0, 0, 0.22);
}

.schematic-zone.is-disabled .zone-title,
.schematic-zone.is-sandbox-forced-red .zone-title {
  color: rgba(191, 205, 221, 0.78);
}

.schematic-zone.is-disabled .zone-copy,
.schematic-zone.is-sandbox-forced-red .zone-copy {
  color: rgba(149, 163, 181, 0.76);
}

.schematic-zone.is-disabled .zone-agent-pill,
.schematic-zone.is-disabled .zone-agent-pill.is-active,
.schematic-zone.is-sandbox-forced-red .zone-agent-pill,
.schematic-zone.is-sandbox-forced-red .zone-agent-pill.is-active {
  border-color: rgba(98, 115, 136, 0.42);
  background: linear-gradient(180deg, rgba(20, 28, 38, 0.92) 0%, rgba(13, 18, 25, 0.92) 100%);
  color: rgba(149, 164, 182, 0.84);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.schematic-zone.is-disabled .zone-agent-pill-remove,
.schematic-zone.is-sandbox-forced-red .zone-agent-pill-remove {
  color: rgba(145, 159, 176, 0.5);
  background: rgba(14, 20, 27, 0.14);
}

.zone-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.touch-precision-mode-badge {
  position: fixed;
  right: 14px;
  top: 14px;
  z-index: 2147483646;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(123, 187, 230, 0.56);
  background: rgba(12, 20, 30, 0.9);
  color: rgba(212, 235, 255, 0.94);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  pointer-events: none;
}

body.is-touch-precision-locked #topologyBoard {
  touch-action: pinch-zoom;
}

body.is-touch-precision-locked #topologyBoard .schematic-zone,
body.is-touch-precision-locked #topologyBoard .route-indicator,
body.is-touch-precision-locked #topologyBoard .junction-mount {
  opacity: 0.78;
}

body.is-touch-precision-locked #topologyBoard .schematic-zone.is-touch-precision-active,
body.is-touch-precision-locked #topologyBoard .zone-node-point.is-touch-precision-active,
body.is-touch-precision-locked #topologyBoard .zone-node-point.is-valid-target,
body.is-touch-precision-locked #topologyBoard .schematic-trend-stop.is-touch-precision-active,
body.is-touch-precision-locked #topologyBoard .schematic-row-stop.is-touch-precision-active {
  opacity: 1;
}

.schematic-zone.is-touch-precision-active::before {
  border-color: rgba(106, 196, 255, 0.56);
  box-shadow:
    0 0 0 1px rgba(106, 196, 255, 0.28),
    0 0 20px rgba(106, 196, 255, 0.25),
    var(--wall-zone-surface-shadow);
}

.schematic-trend-stop.is-touch-precision-active,
.schematic-row-stop.is-touch-precision-active {
  background: rgba(178, 196, 220, 0.2);
}

@media (pointer: coarse) {
  .zone-header {
    min-height: 38px;
    padding-top: 4px;
    cursor: grab;
  }

  .zone-node-point {
    width: 10px;
    height: 10px;
  }

  .zone-node-point::after {
    width: 36px;
    height: 36px;
  }
}

.zone-heading-group {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.zone-led-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  appearance: none;
}

.zone-led-toggle:disabled {
  opacity: 1;
  cursor: default;
}

.zone-led-toggle:hover:not(:disabled),
.zone-led-toggle:focus-visible {
  transform: none;
  border: none;
  background: rgba(103, 198, 255, 0.12);
  box-shadow:
    0 0 0 1px rgba(103, 198, 255, 0.28),
    0 0 14px rgba(103, 198, 255, 0.14);
}

.zone-led-toggle:focus-visible {
  outline: none;
}

.zone-led-toggle .chip-status-led {
  pointer-events: none;
  transition: filter 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}

.zone-led-toggle:hover .chip-status-led,
.zone-led-toggle:focus-visible .chip-status-led {
  filter: brightness(1.08);
  transform: scale(1.04);
}

.chip-status-led {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 1px solid rgba(14, 20, 28, 0.88);
  background: radial-gradient(
    circle at 35% 35%,
    var(--led-highlight, #f4f8fb) 0%,
    var(--led-core, #d9e2eb) 26%,
    var(--led-mid, #94a1af) 56%,
    var(--led-edge, #4f5a67) 100%
  );
  color: var(--led-glow, #a8b4c2);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.42),
    inset 0 -2px 3px rgba(0, 0, 0, 0.48),
    0 0 0 1px rgba(10, 15, 21, 0.3),
    0 0 7px var(--led-glow-soft, rgba(168, 180, 194, 0.28)),
    0 0 14px var(--led-glow, #a8b4c2),
    0 0 0 2px rgba(15, 22, 30, 0.24);
}

.chip-status-led-green {
  --led-highlight: #edfff4;
  --led-core: #a9ffc8;
  --led-mid: #52ff8c;
  --led-edge: #166c3f;
  --led-glow-soft: rgba(89, 255, 148, 0.58);
  --led-glow: #59ff94;
}

.chip-status-led-amber {
  --led-highlight: #fff0cc;
  --led-core: #ffd88a;
  --led-mid: #ffbf4d;
  --led-edge: #955c12;
  --led-glow-soft: rgba(255, 196, 93, 0.44);
  --led-glow: #ffc45d;
}

.chip-status-led-red {
  --led-highlight: #ffd8df;
  --led-core: #ff99a8;
  --led-mid: #ff5f74;
  --led-edge: #872334;
  --led-glow-soft: rgba(255, 104, 122, 0.56);
  --led-glow: #ff687a;
}

.chip-status-led-grey {
  --led-highlight: #eef3f7;
  --led-core: #b5c0cb;
  --led-mid: #8d98a6;
  --led-edge: #4f5965;
  --led-glow-soft: rgba(168, 180, 194, 0.18);
  --led-glow: #a8b4c2;
}

.zone-header-controls {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.zone-delete-handle {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 6px;
  border: 1px solid rgba(96, 116, 142, 0.48);
  background:
    linear-gradient(135deg, transparent 0 48%, rgba(142, 163, 189, 0.28) 48% 52%, transparent 52% 100%),
    linear-gradient(135deg, transparent 0 64%, rgba(142, 163, 189, 0.28) 64% 68%, transparent 68% 100%),
    linear-gradient(180deg, rgba(49, 62, 80, 0.96) 0%, rgba(28, 37, 49, 0.96) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 1px 4px rgba(0, 0, 0, 0.28);
}

.zone-resize-handle {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 24;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border-top: 1px solid rgba(126, 212, 255, 0.72);
  border-left: 1px solid rgba(126, 212, 255, 0.72);
  border-right: none;
  border-bottom: none;
  border-radius: 10px 0 14px 0;
  background: linear-gradient(180deg, rgba(65, 116, 149, 0.98) 0%, rgba(23, 63, 90, 0.98) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    -1px -1px 0 rgba(12, 20, 28, 0.22),
    0 0 0 1px rgba(103, 198, 255, 0.08);
  color: #eaf5ff;
  font: 16px Bahnschrift, "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1;
  cursor: grab;
  touch-action: none;
  appearance: none;
}

.zone-resize-handle-icon {
  font-family: Bahnschrift, "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 13px;
  font-weight: 400;
  font-style: normal;
  line-height: 1;
  transform: translate(0, 0);
  user-select: none;
  pointer-events: none;
}

.zone-resize-handle:active:not(:disabled) {
  cursor: grabbing;
}

.zone-resize-handle:disabled .zone-resize-handle-icon {
  opacity: 0.78;
}

.zone-delete-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  border: 1px solid rgba(140, 157, 180, 0.48);
  background: linear-gradient(180deg, rgba(61, 74, 92, 0.96) 0%, rgba(30, 39, 50, 0.96) 100%);
  color: #e1ebf5;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.zone-hub-lock-handle {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 24;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border-top: 1px solid rgba(126, 212, 255, 0.72);
  border-right: 1px solid rgba(126, 212, 255, 0.72);
  border-left: none;
  border-bottom: none;
  border-radius: 0 10px 0 14px;
  background: linear-gradient(180deg, rgba(65, 116, 149, 0.98) 0%, rgba(23, 63, 90, 0.98) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    1px -1px 0 rgba(12, 20, 28, 0.22),
    0 0 0 1px rgba(103, 198, 255, 0.08);
  color: #eaf5ff;
  font: 16px Bahnschrift, "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  cursor: pointer;
}

.zone-hub-lock-handle svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.zone-hub-lock-handle.is-active {
  border-top-color: rgba(255, 201, 141, 0.9);
  border-right-color: rgba(255, 201, 141, 0.9);
  border-left: none;
  border-bottom: none;
  background: linear-gradient(180deg, rgba(177, 106, 48, 0.98) 0%, rgba(122, 67, 28, 0.98) 100%);
  color: #fff1dd;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 0 0 1px rgba(255, 181, 92, 0.18),
    0 0 10px rgba(255, 167, 73, 0.16);
}

.zone-menu-handle {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 24;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border-bottom: 1px solid rgba(126, 212, 255, 0.72);
  border-left: 1px solid rgba(126, 212, 255, 0.72);
  border-top: none;
  border-right: none;
  border-radius: 0 14px 0 10px;
  background: linear-gradient(180deg, rgba(65, 116, 149, 0.98) 0%, rgba(23, 63, 90, 0.98) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    -1px 1px 0 rgba(12, 20, 28, 0.22),
    0 0 0 1px rgba(103, 198, 255, 0.08);
  color: #eaf5ff;
  line-height: 1;
  cursor: pointer;
  appearance: none;
}

.zone-menu-handle svg {
  width: 72%;
  height: 72%;
  fill: currentColor;
  stroke: none;
}

.zone-delete-handle:hover:not(:disabled),
.zone-hub-lock-handle:hover:not(:disabled),
.zone-resize-handle:hover:not(:disabled) {
  transform: none;
  border-color: rgba(126, 148, 176, 0.68);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 0 1px rgba(82, 100, 124, 0.2),
    0 2px 6px rgba(0, 0, 0, 0.26);
}

.zone-resize-handle:hover:not(:disabled) {
  border-top-color: rgba(150, 224, 255, 0.96);
  border-left-color: rgba(150, 224, 255, 0.96);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    -1px -1px 0 rgba(12, 20, 28, 0.26),
    0 0 0 1px rgba(103, 198, 255, 0.16),
    0 0 14px rgba(103, 198, 255, 0.22);
}

.zone-delete-handle:hover:not(:disabled) {
  border-color: rgba(185, 201, 223, 0.74);
}

.zone-menu-handle:hover:not(:disabled) {
  border-bottom-color: rgba(150, 224, 255, 0.96);
  border-left-color: rgba(150, 224, 255, 0.96);
  border-top: none;
  border-right: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    -1px 1px 0 rgba(12, 20, 28, 0.26),
    0 0 0 1px rgba(103, 198, 255, 0.16),
    0 0 14px rgba(103, 198, 255, 0.22);
}

.zone-hub-lock-handle:hover:not(:disabled) {
  border-top-color: rgba(150, 224, 255, 0.96);
  border-right-color: rgba(150, 224, 255, 0.96);
  border-left: none;
  border-bottom: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    1px -1px 0 rgba(12, 20, 28, 0.26),
    0 0 0 1px rgba(103, 198, 255, 0.16),
    0 0 14px rgba(103, 198, 255, 0.22);
}

.zone-hub-lock-handle.is-active:hover:not(:disabled) {
  border-top-color: rgba(255, 214, 166, 0.98);
  border-right-color: rgba(255, 214, 166, 0.98);
  border-left: none;
  border-bottom: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 0 0 1px rgba(255, 186, 101, 0.22),
    0 0 12px rgba(255, 171, 79, 0.22);
}

.zone-hub-lock-handle:disabled {
  cursor: default;
  opacity: 0.7;
}

.zone-menu-handle:disabled {
  cursor: default;
  opacity: 0.7;
}

.schematic-zone.is-hub-layout-locked .zone-resize-handle {
  opacity: 0.58;
}

/* In Use mode: hide hub-card controls across desktop + tablet layouts. */
.schematic-board.is-layout-locked .zone-delete-handle,
.schematic-board.is-layout-locked .zone-menu-handle,
.schematic-board.is-layout-locked .zone-hub-lock-handle,
.schematic-board.is-layout-locked .zone-resize-handle {
  display: none !important;
}

.zone-agent-menu {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 40;
  display: flex;
  min-width: 136px;
  max-width: min(220px, calc(100% - 24px));
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid rgba(126, 145, 169, 0.34);
  background: linear-gradient(180deg, rgba(23, 31, 41, 0.98) 0%, rgba(13, 19, 26, 0.98) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 10px 18px rgba(0, 0, 0, 0.28);
  transform: none;
  pointer-events: auto;
}

.zone-agent-menu-item {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 28px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: #c9d8e8;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: none;
}

.zone-agent-menu-item:hover:not(:disabled),
.zone-agent-menu-item:focus-visible {
  transform: none;
  border-color: rgba(103, 198, 255, 0.28);
  background: rgba(103, 198, 255, 0.12);
  box-shadow: 0 0 0 1px rgba(103, 198, 255, 0.14);
}

.zone-agent-menu-item:focus-visible {
  outline: none;
}

.zone-agent-menu-item:disabled {
  opacity: 0.44;
  cursor: default;
}

.hub-worker-manager-overlay {
  position: fixed;
  inset: 0;
  z-index: 82;
  display: grid;
  place-items: center;
  padding: 12px;
  background: rgba(7, 11, 16, 0.38);
  backdrop-filter: blur(4px);
}

.hub-worker-manager-modal {
  width: min(388px, calc(100vw - 24px));
  max-height: min(68vh, 520px);
  overflow: auto;
  border-radius: 12px;
  border: 1px solid rgba(140, 162, 189, 0.34);
  background: linear-gradient(180deg, rgba(20, 29, 40, 0.98) 0%, rgba(11, 18, 27, 0.98) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 14px 26px rgba(0, 0, 0, 0.34);
  color: #d4e3f4;
}

.hub-worker-manager-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 10px 8px;
  border-bottom: 1px solid rgba(133, 156, 184, 0.22);
}

.hub-worker-manager-heading {
  min-width: 0;
}

.hub-worker-manager-title {
  margin: 0;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #edf6ff;
}

.hub-worker-manager-subtitle {
  margin: 2px 0 0;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #95aec8;
}

.hub-worker-manager-close {
  width: 22px;
  height: 22px;
  min-height: 22px;
  padding: 0;
  border-radius: 7px;
  border: 1px solid rgba(132, 155, 182, 0.42);
  background: linear-gradient(180deg, rgba(57, 71, 89, 0.94) 0%, rgba(33, 44, 58, 0.94) 100%);
  color: #d9e8f9;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
}

.hub-worker-manager-section {
  padding: 8px 10px 0;
}

.hub-worker-manager-summary-section {
  padding-bottom: 4px;
}

.hub-worker-manager-summary-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.hub-worker-manager-section-title {
  margin: 0 0 6px;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9db4cd;
}

.hub-worker-manager-summary-delete {
  width: 22px;
  height: 22px;
  min-height: 22px;
  padding: 0;
  border-radius: 7px;
  border: 1px solid rgba(167, 120, 136, 0.5);
  background: linear-gradient(180deg, rgba(126, 73, 88, 0.95) 0%, rgba(93, 52, 65, 0.95) 100%);
  color: #f4e8eb;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
}

.hub-worker-manager-summary-description {
  width: 100%;
  min-height: 66px;
  resize: vertical;
  border-radius: 8px;
  border: 1px solid rgba(121, 143, 168, 0.36);
  background: linear-gradient(180deg, rgba(19, 28, 39, 0.92) 0%, rgba(12, 20, 30, 0.94) 100%);
  color: #d9e8f8;
  font-size: 0.68rem;
  line-height: 1.4;
  padding: 8px;
}

.hub-worker-manager-summary-description::placeholder {
  color: #8ca4be;
}

.hub-worker-manager-summary-description:focus-visible {
  outline: none;
  border-color: rgba(103, 198, 255, 0.46);
  box-shadow: 0 0 0 1px rgba(103, 198, 255, 0.18);
}

.hub-worker-manager-join-section {
  padding-bottom: 2px;
}

.hub-worker-manager-join-lock-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.hub-worker-manager-join-lock-state {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #a3bbd3;
}

.hub-worker-manager-join-source-label {
  margin: 6px 0 0;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #b8cde1;
}

.hub-worker-manager-join-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.hub-worker-manager-join-row {
  border: 1px solid rgba(112, 136, 164, 0.25);
  border-radius: 9px;
  background: rgba(34, 49, 65, 0.32);
  padding: 6px;
}

.hub-worker-manager-join-row.is-connected {
  border-color: rgba(107, 185, 139, 0.4);
  background: rgba(28, 60, 45, 0.28);
}

.hub-worker-manager-join-row.is-selected {
  border-color: rgba(103, 198, 255, 0.46);
  box-shadow: 0 0 0 1px rgba(103, 198, 255, 0.16);
}

.hub-worker-manager-join-row-main {
  width: 100%;
  display: grid;
  gap: 2px;
  padding: 4px 6px;
  border-radius: 8px;
  border: 1px solid rgba(124, 148, 175, 0.3);
  background: rgba(17, 27, 38, 0.66);
  color: #d9e8f7;
  text-align: left;
}

.hub-worker-manager-join-row-title {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hub-worker-manager-join-row-meta {
  font-size: 0.58rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #a9bfd5;
}

.hub-worker-manager-join-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.hub-worker-manager-join-action {
  min-height: 18px;
  padding: 0 7px;
  font-size: 0.54rem;
}

.hub-worker-manager-current-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hub-worker-manager-current-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(108, 132, 159, 0.36);
  background: linear-gradient(180deg, rgba(29, 41, 55, 0.92) 0%, rgba(19, 29, 40, 0.92) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 1px 3px rgba(0, 0, 0, 0.24);
}

.hub-worker-manager-current-label {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #dbe9f9;
}

.hub-worker-manager-empty {
  margin: 0;
  font-size: 0.68rem;
  color: #9ab0c8;
}

.hub-worker-manager-groups {
  display: grid;
  gap: 6px;
}

.hub-worker-manager-group {
  border: 1px solid rgba(112, 136, 164, 0.24);
  border-radius: 8px;
  background: rgba(38, 53, 70, 0.3);
  padding: 6px;
}

.hub-worker-manager-group-title {
  margin: 0 0 4px;
  font-size: 0.58rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #8fa7c0;
}

.hub-worker-manager-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  padding: 2px 0;
}

.hub-worker-manager-worker-label {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #d4e3f4;
}

.hub-worker-manager-action {
  min-height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(128, 152, 181, 0.4);
  background: linear-gradient(180deg, rgba(78, 97, 120, 0.95) 0%, rgba(55, 72, 92, 0.95) 100%);
  color: #ecf3fb;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -1px 0 rgba(18, 28, 41, 0.24);
}

.hub-worker-manager-action-add {
  border-color: rgba(98, 162, 127, 0.5);
  background: linear-gradient(180deg, rgba(64, 118, 91, 0.95) 0%, rgba(43, 87, 66, 0.95) 100%);
}

.hub-worker-manager-action-remove {
  border-color: rgba(189, 131, 146, 0.48);
  background: linear-gradient(180deg, rgba(126, 73, 88, 0.95) 0%, rgba(93, 52, 65, 0.95) 100%);
}

.hub-worker-manager-footer {
  display: flex;
  justify-content: flex-start;
  padding: 8px 10px 10px;
}

.hub-worker-manager-link {
  color: #9fd4ff;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.hub-worker-manager-link:hover,
.hub-worker-manager-link:focus-visible {
  text-decoration: underline;
}

.hub-create-edit-overlay {
  position: fixed;
  inset: 0;
  z-index: 83;
  display: grid;
  place-items: center;
  padding: 12px;
  background: rgba(7, 11, 16, 0.36);
  backdrop-filter: blur(4px);
}

.hub-create-edit-modal {
  width: min(448px, calc(100vw - 24px));
  max-height: min(76vh, 620px);
  overflow: auto;
  border-radius: 12px;
  border: 1px solid rgba(140, 162, 189, 0.34);
  background: linear-gradient(180deg, rgba(20, 29, 40, 0.98) 0%, rgba(11, 18, 27, 0.98) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 14px 26px rgba(0, 0, 0, 0.34);
  color: #d4e3f4;
}

.hub-create-edit-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 10px 8px;
  border-bottom: 1px solid rgba(133, 156, 184, 0.22);
}

.hub-create-edit-title {
  margin: 0;
  font-size: 0.84rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #edf6ff;
}

.hub-create-edit-subtitle {
  margin: 2px 0 0;
  font-size: 0.64rem;
  color: #9bb3cc;
}

.hub-create-edit-link {
  color: #9fd4ff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.hub-create-edit-link:hover,
.hub-create-edit-link:focus-visible {
  color: #c7e8ff;
}

.hub-create-edit-close {
  width: 22px;
  height: 22px;
  min-height: 22px;
  padding: 0;
  border-radius: 7px;
  border: 1px solid rgba(132, 155, 182, 0.42);
  background: linear-gradient(180deg, rgba(57, 71, 89, 0.94) 0%, rgba(33, 44, 58, 0.94) 100%);
  color: #d9e8f9;
  font-size: 0.82rem;
  line-height: 1;
}

.hub-create-edit-body {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.hub-create-edit-section {
  display: grid;
  gap: 6px;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid rgba(112, 136, 164, 0.24);
  background: rgba(38, 53, 70, 0.3);
}

.hub-create-edit-section-title {
  margin: 0;
  font-size: 0.62rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #8fa7c0;
  text-align: center;
}

.hub-create-edit-field-label {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #b9cde3;
}

.hub-create-edit-select,
.hub-create-edit-input,
.hub-create-edit-textarea {
  width: 100%;
  border-radius: 8px;
  border: 1px solid rgba(131, 154, 181, 0.34);
  background: linear-gradient(180deg, rgba(31, 44, 59, 0.94) 0%, rgba(20, 30, 42, 0.94) 100%);
  color: #edf4fc;
  padding: 0 10px;
  font-size: 0.72rem;
  box-sizing: border-box;
}

.hub-create-edit-select option {
  color: #0f243a;
  background: #e8f0f9;
}

.hub-create-edit-select option:checked {
  color: #0a2036;
  background: #86add8;
}

.hub-create-edit-select,
.hub-create-edit-input {
  min-height: 30px;
  height: 30px;
}

.hub-create-edit-textarea {
  min-height: 52px;
  padding-top: 7px;
  padding-bottom: 7px;
  resize: vertical;
}

.hub-create-edit-warning {
  margin: 2px 0 0;
  font-size: 0.64rem;
  line-height: 1.35;
  color: #ffd29b;
}

.hub-create-edit-confirm {
  display: inline-flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 0.64rem;
  color: #d2e2f4;
}

.hub-create-edit-confirm input {
  margin-top: 1px;
}

.hub-create-edit-actions {
  display: flex;
  gap: 6px;
}

.hub-create-edit-action {
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(98, 162, 127, 0.5);
  background: linear-gradient(180deg, rgba(64, 118, 91, 0.95) 0%, rgba(43, 87, 66, 0.95) 100%);
  color: #ecf3fb;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.hub-create-edit-action-danger {
  border-color: rgba(189, 131, 146, 0.48);
  background: linear-gradient(180deg, rgba(126, 73, 88, 0.95) 0%, rgba(93, 52, 65, 0.95) 100%);
}

.zone-node-points {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.zone-node-point {
  position: absolute;
  width: 7px;
  height: 7px;
  pointer-events: auto;
  border-radius: 999px;
  border: 2px solid rgba(165, 178, 194, 0.88);
  background:
    radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.98) 0%, rgba(232, 238, 245, 0.96) 52%, rgba(184, 195, 209, 0.94) 100%);
  box-shadow:
    0 0 0 2px rgba(19, 26, 35, 0.86),
    0 0 4px rgba(255, 255, 255, 0.12);
  transform: translate(-50%, -50%);
  cursor: crosshair;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.zone-node-point::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 30px;
  height: 30px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: transparent;
}

.zone-node-point.point-top {
  top: 0;
  left: 50%;
}

.zone-node-point.point-right {
  top: 50%;
  right: 0;
  transform: translate(50%, -50%);
}

.zone-node-point.point-bottom {
  bottom: 0;
  left: 50%;
  transform: translate(-50%, 50%);
}

.zone-node-point.point-left {
  top: 50%;
  left: 0;
  transform: translate(-50%, -50%);
}

.zone-node-point:hover,
.zone-node-point.is-active,
.zone-node-point.is-target {
  border-color: rgba(103, 198, 255, 0.92);
  box-shadow:
    0 0 0 2px rgba(19, 26, 35, 0.9),
    0 0 8px rgba(103, 198, 255, 0.24);
}

.zone-node-point.is-active {
  background:
    radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.98) 0%, rgba(192, 232, 255, 0.98) 46%, rgba(103, 198, 255, 0.98) 100%);
}

.zone-node-point.is-target {
  background:
    radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.98) 0%, rgba(209, 255, 225, 0.98) 46%, rgba(89, 255, 148, 0.98) 100%);
}

.zone-node-point.is-valid-target {
  border-color: rgba(128, 255, 179, 0.9);
  box-shadow:
    0 0 0 2px rgba(16, 34, 25, 0.9),
    0 0 10px rgba(128, 255, 179, 0.3);
}

.zone-node-point.is-touch-precision-active {
  border-color: rgba(103, 198, 255, 0.95);
  box-shadow:
    0 0 0 2px rgba(19, 26, 35, 0.92),
    0 0 14px rgba(103, 198, 255, 0.42);
}

.schematic-zone::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--wall-zone-surface-border);
  border-radius: 14px;
  background: var(--wall-zone-surface-bg);
  box-shadow:
    0 0 8px rgba(255, 255, 255, 0.16),
    0 0 18px rgba(255, 255, 255, 0.07),
    var(--wall-zone-surface-shadow);
  z-index: 0;
}

.zone-broker { left: 5%; top: 13%; width: 41%; height: 19%; }
.zone-local { left: 3.5%; top: 39%; width: 40%; height: 51%; }
.zone-external { left: 51%; top: 39%; width: 42%; height: 51%; }

.zone-title {
  position: relative;
  z-index: 1;
  min-width: 0;
  color: var(--wall-zone-title-color);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.zone-copy {
  position: relative;
  z-index: 1;
  max-width: min(340px, 100%);
  min-width: 0;
  margin-bottom: 0;
  color: var(--wall-zone-copy-color);
  font-size: 10px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.zone-footer {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-top: auto;
  margin-bottom: 0;
  min-width: 0;
  max-width: 100%;
}

.schematic-zone.is-hub-zone .zone-footer {
  margin-top: 6px;
  margin-bottom: 8px;
}

.zone-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 0;
  min-width: 0;
  max-width: 100%;
}

.zone-tags span {
  position: relative;
  z-index: 1;
  max-width: 100%;
  padding: 4px 6px;
  border-radius: 5px;
  border: 1px solid var(--wall-zone-tag-border);
  background: var(--wall-zone-tag-bg);
  color: var(--wall-zone-tag-text);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.zone-agent-pills {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  flex-wrap: wrap;
  align-items: center;
  align-content: center;
  justify-content: center;
  gap: 8px;
  margin-top: 0;
  min-width: 0;
  max-width: 100%;
}

.zone-agent-pill-shell {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
}

.zone-agent-pill {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  padding: 5px 10px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  background: linear-gradient(180deg, rgba(23, 31, 42, 0.94) 0%, rgba(13, 18, 25, 0.94) 100%);
  color: #a7bdd7;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.zone-agent-pill::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  box-shadow:
    0 0 8px rgba(255, 255, 255, 0.16),
    0 0 18px rgba(255, 255, 255, 0.07);
  z-index: -1;
}

.zone-agent-pill-label,
.zone-agent-pill-value {
  min-width: 0;
  white-space: nowrap;
}

.zone-agent-pill-value {
  position: relative;
  padding-left: 7px;
  font-weight: 800;
}

.zone-agent-pill-value::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 1px;
  height: 10px;
  background: currentColor;
  opacity: 0.26;
  transform: translateY(-50%);
}

.zone-agent-pill-remove {
  position: absolute;
  top: 50%;
  right: 5px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(15, 21, 29, 0.16);
  color: rgba(174, 190, 209, 0.58);
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  opacity: 0.72;
  transform: translateY(-50%);
  box-shadow: none;
  appearance: none;
}

.zone-agent-pill-shell:hover .zone-agent-pill-remove,
.zone-agent-pill-remove:focus-visible {
  transform: translateY(-50%);
  border: none;
  background: rgba(103, 198, 255, 0.14);
  color: rgba(232, 241, 250, 0.96);
  opacity: 1;
  box-shadow:
    0 0 0 1px rgba(103, 198, 255, 0.22),
    0 0 10px rgba(103, 198, 255, 0.14);
}

.zone-agent-pill-remove:focus-visible {
  outline: none;
}

.zone-agent-pill:hover:not(:disabled) {
  transform: none;
  border-color: rgba(255, 255, 255, 0.64);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 0 1px rgba(103, 198, 255, 0.14);
}

.zone-agent-pill:disabled {
  opacity: 1;
  cursor: default;
}

.zone-agent-pill.is-active {
  border-color: rgba(255, 255, 255, 0.62);
  background: linear-gradient(180deg, rgba(18, 39, 31, 0.96) 0%, rgba(12, 24, 20, 0.96) 100%);
  color: #8df4bc;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 0 1px rgba(61, 154, 101, 0.14),
    0 0 12px rgba(46, 133, 88, 0.12);
}

.zone-agent-pill.pill-state-green {
  color: #8df4bc;
}

.zone-agent-pill.pill-state-amber {
  border-color: rgba(255, 255, 255, 0.56);
  color: #ffd68d;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 0 0 1px rgba(160, 119, 33, 0.14),
    0 0 10px rgba(155, 111, 18, 0.12);
}

.zone-agent-pill.pill-state-red {
  border-color: rgba(255, 255, 255, 0.56);
  color: #ff9eaa;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 0 0 1px rgba(153, 53, 68, 0.14),
    0 0 10px rgba(143, 38, 55, 0.14);
}

.zone-agent-pill.is-active.pill-state-red {
  background: linear-gradient(180deg, rgba(46, 20, 28, 0.96) 0%, rgba(28, 12, 18, 0.96) 100%);
  border-color: rgba(255, 255, 255, 0.62);
  color: #ffb2bc;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 0 0 1px rgba(161, 57, 74, 0.18),
    0 0 12px rgba(151, 45, 62, 0.16);
}

.zone-agent-pill.pill-state-grey {
  border-color: rgba(255, 255, 255, 0.56);
  color: rgba(181, 193, 210, 0.84);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 0 0 1px rgba(90, 106, 128, 0.12);
}

.zone-type-watcher-hub .zone-agent-pill.is-active {
  border-color: rgba(255, 255, 255, 0.62);
  background: linear-gradient(180deg, rgba(18, 39, 31, 0.96) 0%, rgba(12, 24, 20, 0.96) 100%);
  color: #8df4bc;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 0 1px rgba(61, 154, 101, 0.14),
    0 0 12px rgba(46, 133, 88, 0.12);
}

.schematic-caption {
  z-index: 2;
  padding: 6px 8px;
  color: var(--wall-caption-color);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-shadow: var(--wall-caption-shadow);
}

.caption-manual { top: 32%; left: 60%; }
.caption-closure { bottom: 4.5%; left: 63%; }

.schematic-chip-links,
.schematic-routes,
.schematic-nodes,
.schematic-route-lights,
.schematic-control-mounts {
  inset: 0;
}

.schematic-chip-links {
  z-index: 2;
  pointer-events: none;
  overflow: visible;
  display: block;
  shape-rendering: geometricPrecision;
}

.schematic-routes {
  z-index: 2;
  pointer-events: none;
  shape-rendering: geometricPrecision;
}
.schematic-route-lights {
  z-index: 5;
  pointer-events: none;
}
.schematic-route-lights > * {
  pointer-events: auto;
}
.schematic-nodes {
  z-index: 6;
  pointer-events: none;
}
.schematic-nodes > * {
  pointer-events: auto;
}
.schematic-control-mounts {
  z-index: 7;
  pointer-events: none;
}

.schematic-control-mounts > * {
  pointer-events: auto;
}

.route-channel {
  stroke: transparent;
  stroke-width: var(--wall-link-route-channel-width);
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  shape-rendering: geometricPrecision;
  filter: none;
}

.chip-link-hitarea {
  fill: none;
  stroke: rgba(255, 255, 255, 0.001);
  stroke-width: var(--wall-link-hitarea-width);
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: stroke;
  cursor: pointer;
}

.chip-link-channel {
  fill: none;
  stroke: var(--wall-link-channel-color);
  stroke-width: var(--wall-link-channel-width);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-miterlimit: 1.8;
  vector-effect: non-scaling-stroke;
  shape-rendering: geometricPrecision;
  transition: stroke 120ms ease, stroke-width 120ms ease, opacity 120ms ease;
}

.chip-link-path {
  fill: none;
  stroke: var(--wall-link-green);
  stroke-width: var(--wall-link-path-width);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-miterlimit: 1.8;
  vector-effect: non-scaling-stroke;
  shape-rendering: geometricPrecision;
  opacity: 0.95;
  filter: none;
  transition: stroke 120ms ease, stroke-width 120ms ease, opacity 120ms ease;
}

.chip-link-path.chip-link-direction-bidirectional {
  stroke-width: calc(var(--wall-link-path-width) + 0.28);
}

.chip-link-path-neutral {
  stroke: var(--wall-link-neutral);
}

.chip-link-path-red {
  stroke: var(--wall-link-red);
}

.chip-link-path-amber {
  stroke: var(--wall-link-amber);
}

.chip-link-path-grey {
  stroke: var(--wall-link-grey);
}

.chip-link-arrow {
  fill: var(--wall-link-arrow-green);
  stroke: var(--wall-link-arrow-edge);
  stroke-width: var(--wall-link-arrow-edge-width);
  stroke-linejoin: miter;
  stroke-miterlimit: 2.2;
  vector-effect: non-scaling-stroke;
  shape-rendering: geometricPrecision;
  filter: none;
  pointer-events: none;
  transition: fill 120ms ease, stroke-width 120ms ease;
}

.chip-link-arrow-neutral {
  fill: var(--wall-link-arrow-neutral);
}

.chip-link-arrow-red {
  fill: var(--wall-link-arrow-red);
}

.chip-link-arrow-amber {
  fill: var(--wall-link-arrow-amber);
}

.chip-link-arrow-grey {
  fill: var(--wall-link-arrow-grey);
}

.chip-link-preview {
  fill: none;
  stroke: rgba(187, 239, 205, 0.95);
  stroke-width: var(--wall-link-preview-width);
  stroke-linecap: butt;
  stroke-linejoin: miter;
  stroke-miterlimit: 2;
  vector-effect: non-scaling-stroke;
  shape-rendering: geometricPrecision;
  filter: none;
}

.chip-link-drag-end {
  fill: rgba(248, 252, 255, 0.98);
  stroke: rgba(65, 79, 98, 0.94);
  stroke-width: 2.2;
  filter: none;
}

.chip-link-channel.is-selected,
.chip-link-channel.is-focused {
  stroke: var(--wall-link-channel-selected-color);
  stroke-width: var(--wall-link-channel-selected-width);
  filter: drop-shadow(0 0 4px rgba(196, 223, 255, 0.34));
}

.chip-link-path.is-selected,
.chip-link-path.is-focused {
  stroke-width: var(--wall-link-path-selected-width);
  filter: drop-shadow(0 0 5px rgba(179, 214, 255, 0.32));
  opacity: 1;
}

.chip-link-arrow.is-selected,
.chip-link-arrow.is-focused {
  filter: drop-shadow(0 0 3px rgba(190, 222, 255, 0.28));
  stroke-width: calc(var(--wall-link-arrow-edge-width) + 0.12);
}

.chip-link-path-bidirectional-overlay {
  opacity: 0.56;
  stroke-dasharray: 6 18;
  pointer-events: none;
}

.chip-link-connection {
  pointer-events: none;
}

/* Edit mode: keep comms lines and arrows crisp/static with no route effects. */
.schematic-board:not(.is-layout-locked):not(.is-flow-effects-enabled) .chip-link-path[class*="chip-link-state-"] {
  animation: none !important;
  stroke-dasharray: none;
  stroke-dashoffset: 0;
  filter: none;
}

.schematic-board:not(.is-layout-locked):not(.is-flow-effects-enabled) .chip-link-arrow,
.schematic-board:not(.is-layout-locked):not(.is-flow-effects-enabled) .chip-link-arrow.is-selected,
.schematic-board:not(.is-layout-locked):not(.is-flow-effects-enabled) .chip-link-arrow.is-focused {
  animation: none !important;
  filter: none;
  stroke-width: var(--wall-link-arrow-edge-width);
}

.chip-link-path.chip-link-state-default {
  animation: none;
}

.chip-link-path.chip-link-effect-off {
  animation: none;
}

.chip-link-path.chip-link-state-active-executing {
  stroke-dasharray: 4 14;
  animation: chip-link-flow-forward 3.2s linear infinite;
}

.chip-link-path.chip-link-state-active-executing.chip-link-direction-reverse {
  animation-name: chip-link-flow-reverse;
}

.chip-link-path.chip-link-state-active-executing.chip-link-direction-bidirectional {
  stroke-dasharray: 4 14;
  animation: chip-link-flow-forward 3s linear infinite;
}

.chip-link-path.chip-link-state-active-executing.chip-link-effect-off {
  stroke-dasharray: none;
  animation: none;
}

.chip-link-path-bidirectional-overlay.chip-link-state-active-executing.chip-link-direction-bidirectional {
  stroke-dasharray: 4 14;
  animation: chip-link-flow-reverse 3s linear infinite;
  opacity: 0.72;
}

.chip-link-path.chip-link-state-queued-waiting {
  stroke-dasharray: 3 14;
  animation: chip-link-queued-forward 4.8s steps(8, end) infinite;
}

.chip-link-path.chip-link-state-queued-waiting.chip-link-direction-reverse {
  animation-name: chip-link-queued-reverse;
}

.chip-link-path.chip-link-state-queued-waiting.chip-link-direction-bidirectional {
  stroke-dasharray: 3 14;
  animation: chip-link-queued-forward 4.8s steps(8, end) infinite;
}

.chip-link-path-bidirectional-overlay.chip-link-state-queued-waiting.chip-link-direction-bidirectional {
  stroke-dasharray: 3 14;
  animation: chip-link-queued-reverse 4.8s steps(8, end) infinite;
}

.chip-link-arrow.chip-link-direction-forward,
.chip-link-arrow.chip-link-direction-reverse {
  animation: none;
}

.chip-link-arrow.chip-link-effect-off {
  animation: none !important;
}

.chip-link-arrow.chip-link-direction-bidirectional.chip-link-arrow-start {
  animation: none;
}

.chip-link-arrow.chip-link-direction-bidirectional.chip-link-arrow-end {
  animation: none;
}

.schematic-board.is-flow-effects-enabled.is-flow-effects-degraded .chip-link-path[class*="chip-link-state-"] {
  animation: none;
  stroke-dasharray: none;
}

.schematic-board.is-flow-effects-enabled.is-flow-effects-degraded .chip-link-path.chip-link-state-active-executing.chip-link-effect-on {
  animation: chip-link-queued-breathe 3.6s ease-in-out infinite;
  opacity: 0.98;
}

.chip-link-path.chip-link-state-faulty-gated {
  animation: chip-link-faulty-breathe 4.9s ease-in-out infinite;
}

.chip-link-path-bidirectional-overlay.chip-link-state-faulty-gated.chip-link-direction-bidirectional {
  stroke-dasharray: 8 20;
  animation: chip-link-flow-reverse 3s linear infinite;
  opacity: 0.68;
}

.chip-link-path.chip-link-state-failed-blocked {
  stroke-dasharray: 10 15;
  animation: chip-link-failed-pulse 2.7s ease-in-out infinite;
}

.chip-link-path-bidirectional-overlay.chip-link-state-failed-blocked.chip-link-direction-bidirectional {
  stroke-dasharray: 10 15;
  animation: chip-link-flow-reverse 2.4s linear infinite;
  opacity: 0.7;
}

.chip-link-path.chip-link-state-inactive {
  stroke-dasharray: none;
  animation: none;
  opacity: 0.9;
}

@keyframes chip-link-flow-forward {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: -18; }
}

@keyframes chip-link-flow-reverse {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: 18; }
}

@keyframes chip-link-flow-bidirectional {
  0% { stroke-dashoffset: -12; opacity: 0.92; }
  50% { stroke-dashoffset: 12; opacity: 1; }
  100% { stroke-dashoffset: -12; opacity: 0.92; }
}

@keyframes chip-link-arrow-oneway {
  0%, 100% { opacity: 0.78; }
  50% { opacity: 1; }
}

@keyframes chip-link-arrow-bidirectional-start {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

@keyframes chip-link-arrow-bidirectional-end {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes chip-link-queued-forward {
  0%, 65% { stroke-dashoffset: 0; opacity: 0.9; }
  100% { stroke-dashoffset: -16; opacity: 0.97; }
}

@keyframes chip-link-queued-reverse {
  0%, 65% { stroke-dashoffset: 0; opacity: 0.9; }
  100% { stroke-dashoffset: 16; opacity: 0.97; }
}

@keyframes chip-link-queued-breathe {
  0%, 100% { opacity: 0.88; }
  50% { opacity: 0.98; }
}

@keyframes chip-link-faulty-breathe {
  0%, 100% { opacity: 0.9; }
  50% { opacity: 1; }
}

@keyframes chip-link-failed-pulse {
  0%, 30%, 100% {
    stroke-dashoffset: 0;
    opacity: 0.82;
  }
  42% {
    stroke-dashoffset: -9;
    opacity: 0.96;
  }
  54% {
    stroke-dashoffset: -12;
    opacity: 0.84;
  }
}

@media (prefers-reduced-motion: reduce) {
  .chip-link-path[class*="chip-link-state-"] {
    animation: none !important;
  }

  .chip-link-arrow {
    animation: none !important;
  }
}

.chip-connection-popover {
  position: absolute;
  z-index: 12;
  min-width: 126px;
  max-width: 180px;
  padding: 7px 8px;
  border-radius: 8px;
  border: 1px solid rgba(129, 151, 177, 0.42);
  background: linear-gradient(180deg, rgba(24, 34, 47, 0.98) 0%, rgba(13, 20, 30, 0.98) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 10px 18px rgba(0, 0, 0, 0.32);
  pointer-events: auto;
}

.chip-connection-popover-label {
  margin: 0 0 6px;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9db4cd;
}

.chip-connection-popover-actions {
  display: flex;
  gap: 6px;
}

.chip-connection-popover-button {
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(127, 152, 182, 0.4);
  background: linear-gradient(180deg, rgba(77, 97, 121, 0.95) 0%, rgba(53, 71, 92, 0.95) 100%);
  color: #edf4fb;
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(18, 28, 41, 0.24);
}

.chip-connection-popover-button.is-danger {
  border-color: rgba(190, 131, 147, 0.48);
  background: linear-gradient(180deg, rgba(126, 74, 89, 0.95) 0%, rgba(93, 52, 66, 0.95) 100%);
}

.route-line {
  stroke-width: var(--wall-link-route-line-width);
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  shape-rendering: geometricPrecision;
  stroke: transparent;
  stroke-opacity: 0;
  filter: none;
}

.light-green { stroke: var(--green); color: var(--green); }
.light-amber { stroke: var(--amber); color: var(--amber); }
.light-red { stroke: var(--red); color: var(--red); }
.light-grey { stroke: #9aa6b4; color: #9aa6b4; }


.schematic-node.light-green,
.schematic-node.light-amber,
.schematic-node.light-red,
.schematic-node.light-grey,
.route-indicator.light-green,
.route-indicator.light-amber,
.route-indicator.light-red,
.route-indicator.light-grey,
.junction-mount.light-green,
.junction-mount.light-amber,
.junction-mount.light-red,
.junction-mount.light-grey {
  color: var(--text-main);
}

.schematic-node.light-green,
.route-indicator.light-green,
.junction-mount.light-green { border-color: rgba(89, 255, 148, 0.24); }

.schematic-node.light-amber,
.route-indicator.light-amber,
.junction-mount.light-amber { border-color: rgba(255, 196, 93, 0.24); }

.schematic-node.light-red,
.route-indicator.light-red,
.junction-mount.light-red { border-color: rgba(255, 104, 122, 0.24); }

.schematic-node.light-grey,
.route-indicator.light-grey,
.junction-mount.light-grey { border-color: rgba(154, 170, 188, 0.2); }

.schematic-node,
.route-indicator {
  position: absolute;
  transform: translate(-50%, -50%);
  color: var(--text-main);
}

.schematic-node {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  min-width: 170px;
  padding: 9px 11px 10px;
  border-radius: 8px;
  border: 1px solid rgba(154, 171, 193, 0.16);
  background: linear-gradient(180deg, rgba(28, 34, 43, 0.92) 0%, rgba(14, 19, 26, 0.88) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    inset 0 0 0 1px rgba(10, 14, 19, 0.5),
    0 8px 16px rgba(0, 0, 0, 0.18);
  text-align: left;
}

.schematic-node.kind-decision {
  min-width: 212px;
  background: linear-gradient(180deg, rgba(33, 46, 59, 0.98) 0%, rgba(15, 24, 33, 0.98) 100%);
}

.schematic-node.kind-domain {
  display: none;
}

.schematic-node.kind-provider {
  min-width: 160px;
}

.schematic-node.kind-terminal {
  min-width: 152px;
  background: linear-gradient(180deg, rgba(25, 30, 37, 0.98) 0%, rgba(11, 15, 20, 0.98) 100%);
}

.schematic-node:hover:not(:disabled) {
  transform: translate(-50%, -50%);
  border-color: rgba(103, 198, 255, 0.34);
  box-shadow:
    0 0 0 1px rgba(103, 198, 255, 0.14),
    0 12px 24px rgba(0, 0, 0, 0.28);
}

.route-indicator:hover:not(:disabled) {
  transform: translate(-50%, -50%) scale(var(--board-zoom-scale));
  border-color: rgba(103, 198, 255, 0.34);
  box-shadow:
    0 0 0 1px rgba(103, 198, 255, 0.14),
    0 12px 24px rgba(0, 0, 0, 0.28);
}

.schematic-node.selected,
.route-indicator.selected,
.junction-mount.selected {
  box-shadow:
    0 0 0 1px rgba(103, 198, 255, 0.34),
    0 0 22px rgba(103, 198, 255, 0.18);
}

.node-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
}

.node-kind {
  color: rgba(165, 181, 201, 0.74);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.node-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.node-label {
  font-weight: 700;
  letter-spacing: 0.03em;
}

.node-state {
  color: var(--text-dim);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.node-count {
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  padding: 4px 6px;
  border-radius: 8px;
  border: 1px solid rgba(129, 146, 169, 0.18);
  background: rgba(9, 14, 19, 0.55);
  color: rgba(192, 205, 221, 0.76);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.route-indicator {
  position: absolute;
  transform: translate(-50%, -50%) scale(var(--board-zoom-scale));
  transform-origin: center center;
  min-width: 136px;
  padding: 8px;
  border-radius: 7px;
  border: 1px solid rgba(150, 166, 189, 0.14);
  background: linear-gradient(180deg, rgba(24, 29, 36, 0.82) 0%, rgba(11, 16, 22, 0.78) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 7px 14px rgba(0, 0, 0, 0.14);
  text-align: left;
}

.route-indicator-face {
  position: relative;
  width: 100%;
  min-height: 54px;
  display: block;
  padding: 2px 6px 0 36px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.route-indicator-face > .led {
  position: absolute;
  top: 3px;
  left: 4px;
}

.route-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.route-label {
  color: rgba(201, 213, 228, 0.84);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.route-state {
  color: rgba(150, 164, 184, 0.88);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.junction-mount {
  position: absolute;
  transform: translate(-50%, -50%) scale(var(--board-zoom-scale));
  transform-origin: center center;
  width: 152px;
  padding: 8px 8px 7px;
  border-radius: 9px;
  border: 1px solid rgba(162, 178, 199, 0.18);
  background: linear-gradient(180deg, rgba(34, 40, 48, 0.96) 0%, rgba(17, 22, 28, 0.96) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    inset 0 0 0 1px rgba(8, 12, 17, 0.44),
    0 12px 18px rgba(0, 0, 0, 0.18);
}

.junction-mount::before,
.junction-mount::after {
  content: "";
  position: absolute;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  border: 1px solid rgba(194, 206, 220, 0.14);
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.24), rgba(120, 132, 146, 0.1) 58%, rgba(18, 22, 28, 0.2) 100%);
}

.junction-mount::before { left: 7px; }
.junction-mount::after { right: 7px; }

.junction-mount.selected {
  box-shadow:
    0 0 0 1px rgba(103, 198, 255, 0.28),
    0 0 20px rgba(103, 198, 255, 0.14);
}

.route-indicator,
.junction-mount {
  cursor: grab;
}

.route-indicator.is-dragging,
.junction-mount.is-dragging {
  cursor: grabbing;
}

.junction-face {
  position: relative;
  width: 100%;
  border-radius: 6px;
  border: 1px solid rgba(143, 158, 179, 0.14);
  min-height: 70px;
  padding: 8px 8px 7px 36px;
  background: linear-gradient(180deg, rgba(23, 29, 36, 0.92) 0%, rgba(10, 15, 20, 0.92) 100%);
  color: var(--text-main);
  text-align: left;
}

.junction-face-header {
  display: block;
}

.junction-face-header > .led {
  position: absolute;
  top: 9px;
  left: 9px;
}

.junction-label {
  color: rgba(206, 218, 233, 0.86);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.junction-state {
  display: block;
  margin-top: 6px;
  color: rgba(151, 166, 187, 0.86);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.junction-switchbank {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin-top: 6px;
}

.junction-state-button,
.control-state-button {
  border-radius: 4px;
  padding: 8px 10px;
  background: linear-gradient(180deg, rgba(62, 69, 80, 0.98) 0%, rgba(26, 33, 40, 0.98) 100%);
  color: rgba(227, 234, 241, 0.9);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.68rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -1px 0 rgba(0, 0, 0, 0.35);
}

.junction-state-button:hover:not(:disabled),
.control-state-button:hover:not(:disabled) {
  transform: none;
  border-color: rgba(103, 198, 255, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 0 1px rgba(103, 198, 255, 0.1);
}

.junction-face:hover:not(:disabled) {
  transform: none;
  border-color: rgba(103, 198, 255, 0.26);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 0 1px rgba(103, 198, 255, 0.08);
}

.junction-state-button.is-active,
.control-state-button.is-active {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 0 0 1px rgba(255, 255, 255, 0.03);
}

.state-enabled.is-active {
  border-color: rgba(89, 255, 148, 0.34);
  color: var(--green);
}

.state-review-only.is-active {
  border-color: rgba(255, 196, 93, 0.34);
  color: var(--amber);
}

.state-disabled.is-active {
  border-color: rgba(154, 170, 188, 0.24);
  color: rgba(200, 208, 220, 0.76);
}

.led {
  display: inline-block;
  width: 15px;
  height: 15px;
  border-radius: 999px;
  border: 1px solid rgba(8, 12, 16, 0.82);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.18),
    inset 0 -2px 3px rgba(0, 0, 0, 0.42),
    0 0 12px currentColor,
    0 0 0 2px rgba(7, 11, 15, 0.62);
}

.led-green { background: radial-gradient(circle at 35% 35%, #b9ffcf 0%, var(--green) 48%, #1f8e53 100%); color: var(--green); }
.led-amber { background: radial-gradient(circle at 35% 35%, #ffe0a8 0%, var(--amber) 48%, #a86b18 100%); color: var(--amber); }
.led-red { background: radial-gradient(circle at 35% 35%, #ffc2cc 0%, var(--red) 48%, #8d283b 100%); color: var(--red); }
.led-grey { background: radial-gradient(circle at 35% 35%, #d0d7de 0%, #9aa6b4 48%, #56616e 100%); color: #a8b4c2; }

.hub-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--hub-modal-overlay-z);
  display: grid;
  place-items: center;
  padding: var(--hub-modal-overlay-padding);
  background: rgba(7, 10, 15, 0.58);
  backdrop-filter: blur(6px);
}

.hub-modal-overlay[hidden] {
  display: none;
}

.hub-modal-shell {
  position: relative;
  isolation: isolate;
  width: var(--hub-modal-live-width, var(--hub-modal-default-width));
  height: var(--hub-modal-live-height, var(--hub-modal-default-height));
  display: grid;
  gap: 14px;
  padding: var(--hub-modal-default-padding);
  border-radius: var(--hub-modal-frame-radius);
  border: var(--hub-modal-frame-border);
  background: var(--hub-modal-frame-background);
  box-shadow: var(--hub-modal-frame-shadow);
  overflow: visible;
}

.hub-modal-shell.is-offline {
  border-color: rgba(134, 149, 171, 0.28);
}

.board-info-shell {
  width: min(760px, 92vw);
  height: auto;
  max-height: min(82vh, 880px);
  grid-template-rows: auto minmax(0, 1fr);
  padding: 28px 30px 26px;
  overflow: hidden;
}

.board-info-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
  overflow: auto;
  padding-right: 8px;
  color: rgba(223, 232, 244, 0.92);
  line-height: 1.7;
}

.board-info-body p {
  margin: 0;
}

.board-info-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.board-info-section h3 {
  margin: 0;
  color: #eef4fb;
  font-size: 0.94rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.board-info-list {
  margin: 0;
  padding-left: 22px;
  display: grid;
  gap: 8px;
}

.board-info-list li {
  padding-left: 4px;
}

.hub-off-state {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  min-height: 0;
  padding: 18px;
  border-radius: 14px;
  border: 1px solid rgba(255, 104, 122, 0.24);
  background: linear-gradient(180deg, rgba(26, 11, 16, 0.94) 0%, rgba(14, 8, 12, 0.96) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 0 0 1px rgba(123, 41, 56, 0.12);
}

.hub-off-state[hidden] {
  display: none;
}

.hub-off-state-label {
  color: rgba(255, 170, 181, 0.92);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hub-off-state-title {
  margin: 0;
  color: #ffe6eb;
  font-size: 1rem;
  letter-spacing: 0.04em;
}

.hub-off-state-copy {
  margin: 0;
  color: rgba(241, 207, 214, 0.92);
  line-height: 1.6;
}

.hub-modal-resize-handle {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 12;
  display: inline-flex;
  align-items: flex-end;
  justify-content: flex-end;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid rgba(140, 165, 194, 0.5);
  background: linear-gradient(180deg, rgba(44, 57, 74, 0.98) 0%, rgba(21, 29, 39, 0.98) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 0 1px rgba(7, 12, 18, 0.28),
    0 2px 8px rgba(0, 0, 0, 0.32);
  cursor: nwse-resize;
  appearance: none;
  pointer-events: auto;
  touch-action: none;
}

.hub-modal-resize-handle::before,
.hub-modal-resize-handle::after {
  content: "";
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 10px;
  height: 2px;
  border-radius: 999px;
  background: rgba(226, 235, 246, 0.84);
  transform-origin: center;
}

.hub-modal-resize-handle::before {
  transform: rotate(-45deg) translateY(-4px);
}

.hub-modal-resize-handle::after {
  width: 14px;
  transform: rotate(-45deg) translateY(2px);
}

.hub-modal-resize-handle:hover:not(:disabled),
.hub-modal-shell.is-resizing .hub-modal-resize-handle {
  transform: none;
  border-color: rgba(103, 198, 255, 0.7);
  background: linear-gradient(180deg, rgba(54, 72, 92, 0.98) 0%, rgba(25, 36, 48, 0.98) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 0 0 1px rgba(103, 198, 255, 0.18),
    0 0 12px rgba(103, 198, 255, 0.14),
    0 2px 8px rgba(0, 0, 0, 0.34);
}

.watcher-hub-shell[data-size-mode="fullscreen"] .hub-modal-resize-handle {
  display: none;
}

.hub-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.hub-modal-header-main {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.hub-modal-kicker {
  margin: 0 0 4px;
  color: rgba(121, 191, 255, 0.82);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hub-modal-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.hub-modal-header h2 {
  margin: 0;
  color: #e3edf7;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hub-modal-header-actions {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.hub-modal-close {
  min-width: 92px;
}

.watcher-hub-shell {
  grid-template-rows: auto minmax(0, 1fr);
}

.reasoning-settings-shell {
  grid-template-rows: auto minmax(0, 1fr);
}

.reasoning-model-status-shell {
  grid-template-rows: auto minmax(0, 1fr);
}

.watcher-hub-shell[data-size-mode="zoomed"] {
  width: min(1180px, 96vw);
  height: min(860px, 92vh);
}

.watcher-hub-shell[data-size-mode="fullscreen"] {
  width: min(calc(100vw - 32px), 1600px);
  height: min(calc(100vh - 32px), 1200px);
  max-width: none;
  max-height: none;
}

.watcher-hub-status-bank {
  display: flex;
  align-items: center;
  gap: 8px;
}

.watcher-status-button {
  min-width: 112px;
}

.watcher-status-button.is-active {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 0 1px rgba(255, 255, 255, 0.06);
}

.watcher-status-button.state-green.is-active {
  border-color: rgba(89, 255, 148, 0.34);
  color: var(--green);
}

.watcher-status-button.state-amber.is-active {
  border-color: rgba(255, 196, 93, 0.34);
  color: var(--amber);
}

.watcher-status-button.state-red.is-active {
  border-color: rgba(255, 104, 122, 0.34);
  color: var(--red);
}

.watcher-hub-view-modes {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.watcher-view-button {
  min-width: 82px;
  padding: 8px 12px;
}

.watcher-view-button.is-active {
  border-color: rgba(103, 198, 255, 0.34);
  color: #dff1ff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 0 1px rgba(103, 198, 255, 0.12);
}

.watcher-hub-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  min-height: 0;
}

.watcher-hub-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(88, 102, 124, 0.24);
  background: linear-gradient(180deg, rgba(7, 10, 15, 0.98) 0%, rgba(4, 7, 12, 0.98) 100%);
}

.watcher-hub-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.watcher-hub-panel h3 {
  margin: 0;
  color: #d8e4f2;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.watcher-hub-status-summary {
  display: flex;
  min-height: 0;
}

.watcher-hub-status-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(88, 102, 124, 0.24);
  background: rgba(12, 18, 26, 0.92);
}

.watcher-hub-status-card.state-green {
  border-color: rgba(89, 255, 148, 0.22);
}

.watcher-hub-status-card.state-amber {
  border-color: rgba(255, 196, 93, 0.24);
}

.watcher-hub-status-card.state-red {
  border-color: rgba(255, 104, 122, 0.24);
}

.watcher-hub-status-card-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.watcher-hub-status-card-copy strong {
  color: #edf4fb;
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.watcher-hub-status-card-copy span {
  color: rgba(168, 184, 205, 0.86);
  line-height: 1.5;
}

.watcher-hub-logs {
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.watcher-hub-log-empty {
  margin: 0;
  color: rgba(156, 171, 189, 0.78);
}

.watcher-hub-log-entry {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(86, 103, 126, 0.18);
  background: rgba(11, 16, 23, 0.92);
}

.watcher-hub-log-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.watcher-hub-log-label {
  color: #9cc2e6;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.watcher-hub-log-meta {
  color: rgba(156, 171, 189, 0.78);
  font-size: 0.68rem;
  line-height: 1.4;
}

.watcher-hub-log-time {
  color: rgba(156, 171, 189, 0.8);
  font-size: 0.66rem;
}

.watcher-hub-faults {
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.watcher-hub-fault-entry {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 104, 122, 0.18);
  background: rgba(33, 12, 18, 0.78);
}

.watcher-hub-fault-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.watcher-hub-fault-actions .secondary-button {
  min-width: auto;
  padding: 8px 10px;
  opacity: 0.72;
}

.watcher-hub-scope-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.watcher-scope-button {
  min-width: 88px;
  padding: 8px 12px;
}

.watcher-scope-button.is-active {
  border-color: rgba(103, 198, 255, 0.32);
  color: #dff1ff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 0 1px rgba(103, 198, 255, 0.12);
}

.watcher-hub-scope-meta {
  color: rgba(156, 171, 189, 0.82);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.watcher-hub-panel textarea {
  width: 100%;
  min-height: 0;
  flex: 1 1 auto;
  resize: vertical;
}

.reasoning-settings-body {
  display: flex;
  min-height: 0;
}

.reasoning-settings-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1 1 auto;
  min-height: 0;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(88, 102, 124, 0.24);
  background: linear-gradient(180deg, rgba(7, 10, 15, 0.98) 0%, rgba(4, 7, 12, 0.98) 100%);
}

.reasoning-settings-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.reasoning-settings-panel h3 {
  margin: 0;
  color: #d8e4f2;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.reasoning-settings-panel-copy {
  margin: 0;
  color: rgba(168, 184, 205, 0.86);
  line-height: 1.5;
}

.reasoning-settings-panel textarea {
  width: 100%;
  min-height: 320px;
  flex: 1 1 auto;
  resize: vertical;
}

.reasoning-settings-save:disabled {
  opacity: 0.72;
}

.reasoning-model-status-body {
  display: flex;
  min-height: 0;
}

.reasoning-model-status-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1 1 auto;
  min-height: 0;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(88, 102, 124, 0.24);
  background: linear-gradient(180deg, rgba(7, 10, 15, 0.98) 0%, rgba(4, 7, 12, 0.98) 100%);
}

.reasoning-model-status-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.reasoning-model-status-panel h3 {
  margin: 0;
  color: #d8e4f2;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.reasoning-model-status-summary {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(88, 102, 124, 0.24);
  color: rgba(219, 229, 241, 0.92);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(12, 18, 26, 0.92);
}

.reasoning-model-status-summary.state-green {
  border-color: rgba(89, 255, 148, 0.28);
  color: #8df4bc;
}

.reasoning-model-status-summary.state-red {
  border-color: rgba(255, 104, 122, 0.3);
  color: #ffb2bc;
}

.reasoning-model-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.reasoning-model-status-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(88, 102, 124, 0.22);
  background: rgba(12, 18, 26, 0.9);
}

.reasoning-model-status-item span {
  color: rgba(152, 168, 189, 0.88);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.reasoning-model-status-item strong {
  color: #edf4fb;
  font-size: 0.96rem;
}

.reasoning-model-status-copy,
.reasoning-model-status-missing {
  margin: 0;
  color: rgba(168, 184, 205, 0.86);
  line-height: 1.55;
}

.reasoning-model-status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
}

.reasoning-model-status-actions button {
  min-width: 132px;
}

.project-scout-shell {
  width: min(940px, 96vw);
  height: min(86vh, 860px);
  grid-template-rows: auto minmax(0, 1fr);
}

.project-scout-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  overflow: auto;
  padding-right: 6px;
}

.project-scout-loading {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(106, 130, 158, 0.34);
  background: rgba(20, 31, 45, 0.78);
  color: #d8e8fb;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.project-scout-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(88, 102, 124, 0.24);
  background: linear-gradient(180deg, rgba(8, 12, 18, 0.97) 0%, rgba(4, 7, 12, 0.98) 100%);
}

.project-scout-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.project-scout-panel h3 {
  margin: 0;
  color: #d8e4f2;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-scout-health {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(131, 154, 181, 0.22);
  color: #d7e3f2;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.project-scout-health.state-healthy {
  border-color: rgba(89, 255, 148, 0.28);
  color: #8df4bc;
}

.project-scout-health.state-attention {
  border-color: rgba(255, 198, 93, 0.3);
  color: #ffd59a;
}

.project-scout-health.state-incomplete {
  border-color: rgba(255, 124, 142, 0.3);
  color: #ffb9c4;
}

.project-scout-health.state-unknown,
.project-scout-health.state-grey {
  border-color: rgba(131, 154, 181, 0.22);
  color: #d7e3f2;
}

.project-scout-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.project-scout-summary-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 66px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(88, 102, 124, 0.24);
  background: rgba(13, 19, 27, 0.9);
}

.project-scout-summary-item span {
  color: rgba(152, 168, 189, 0.88);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-scout-summary-item strong {
  color: #edf4fb;
  font-size: 0.82rem;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-scout-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.project-scout-list-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(88, 102, 124, 0.22);
  background: rgba(13, 19, 27, 0.88);
}

.project-scout-list-item strong {
  color: #eaf3fd;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
}

.project-scout-list-item span,
.project-scout-list-item {
  color: rgba(188, 201, 218, 0.92);
  line-height: 1.45;
}

.project-scout-list-item.is-warning {
  border-color: rgba(255, 198, 93, 0.3);
}

.project-scout-list-item.is-error {
  border-color: rgba(255, 124, 142, 0.3);
}

.project-scout-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.project-scout-actions button {
  min-width: 152px;
}

#projectScoutInstruction {
  width: 100%;
  min-height: 92px;
  resize: vertical;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(94, 116, 140, 0.34);
  background: rgba(11, 17, 24, 0.92);
  color: #e9f2fd;
  font-size: 0.82rem;
  line-height: 1.5;
}

#projectScoutInstruction::placeholder {
  color: rgba(166, 183, 204, 0.76);
}

#projectScoutInstruction:focus-visible {
  outline: 2px solid rgba(156, 196, 238, 0.42);
  outline-offset: 2px;
}

.project-scout-response {
  min-height: 86px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(88, 106, 129, 0.3);
  background: rgba(9, 15, 22, 0.9);
  color: rgba(223, 235, 248, 0.96);
  font-size: 0.82rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.project-scout-confirm-copy {
  margin: 0;
  color: rgba(202, 216, 233, 0.94);
  line-height: 1.5;
}

@media (max-width: 980px) {
  .watcher-hub-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .reasoning-model-status-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .project-scout-summary-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hub-modal-overlay {
    padding: var(--hub-modal-default-padding);
  }

  .hub-modal-shell,
  .watcher-hub-shell[data-size-mode="zoomed"],
  .watcher-hub-shell[data-size-mode="fullscreen"] {
    width: min(100%, 980px);
    height: min(100%, 900px);
  }
}

.orchestrator-console-shell {
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.orchestrator-console-header {
  align-items: center;
}

.orchestrator-console-header-main {
  gap: 0;
}

.orchestrator-console-title-row {
  gap: 10px;
}

.orchestrator-console-title {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(88, 106, 129, 0.34);
  background: rgba(10, 15, 21, 0.78);
  color: rgba(223, 241, 255, 0.94);
  font-size: 0.72rem !important;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.orchestrator-console-header-actions {
  align-items: center;
}

.orchestrator-console-project {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(88, 106, 129, 0.34);
  background: rgba(10, 15, 21, 0.78);
}

.orchestrator-console-project-label {
  color: rgba(154, 170, 190, 0.86);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.orchestrator-console-project select {
  min-width: 180px;
  border: none;
  background: transparent;
  color: #dce7f3;
  font-size: 0.8rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

.orchestrator-console-transcript {
  min-height: 0;
  overflow: auto;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(88, 102, 124, 0.24);
  background:
    linear-gradient(180deg, rgba(7, 10, 15, 0.98) 0%, rgba(4, 7, 12, 0.98) 100%);
  font-family: Consolas, "SFMono-Regular", Menlo, Monaco, monospace;
}

.hub-console-entry {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(77, 91, 112, 0.12);
}

.hub-console-entry:last-child {
  border-bottom: none;
}

.hub-console-entry-label {
  color: rgba(100, 190, 255, 0.86);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hub-console-entry.role-assistant .hub-console-entry-label {
  color: rgba(108, 247, 163, 0.86);
}

.hub-console-entry.role-error .hub-console-entry-label {
  color: rgba(255, 116, 132, 0.86);
}

.hub-console-entry-text {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: #d5e0ec;
  font-size: 0.88rem;
  line-height: 1.5;
}

.hub-console-entry.role-meta .hub-console-entry-text {
  color: rgba(164, 178, 196, 0.92);
}

.hub-console-entry.role-error .hub-console-entry-text {
  color: rgba(255, 163, 173, 0.95);
}

.hub-console-entry.is-route-status {
  align-items: start;
  padding: 6px 0 10px;
}

.hub-console-entry.is-route-status .hub-console-entry-label {
  color: rgba(128, 196, 255, 0.9);
}

.hub-console-entry.is-route-status .hub-console-entry-text {
  font-size: 0.82rem;
  line-height: 1.42;
}

.hub-console-entry.is-route-status.route-state-resolved .hub-console-entry-text {
  color: rgba(171, 203, 234, 0.94);
}

.hub-console-entry.is-route-status.route-state-degraded .hub-console-entry-text,
.hub-console-entry.is-route-status.route-state-broken .hub-console-entry-text {
  color: rgba(255, 173, 150, 0.96);
}

.hub-console-entry.is-route-status.route-state-unresolved .hub-console-entry-text {
  color: rgba(255, 211, 148, 0.96);
}

.orchestrator-console-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.orchestrator-console-actions {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.orchestrator-console-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(84, 101, 124, 0.3);
  background: rgba(7, 10, 15, 0.94);
}

.orchestrator-console-prompt {
  color: rgba(97, 245, 160, 0.9);
  font-family: Consolas, "SFMono-Regular", Menlo, Monaco, monospace;
  font-size: 1rem;
  font-weight: 700;
}

.orchestrator-console-input-wrap input {
  width: 100%;
  border: none;
  background: transparent;
  color: #dce7f3;
  font-family: Consolas, "SFMono-Regular", Menlo, Monaco, monospace;
  font-size: 0.9rem;
  outline: none;
}

#orchestratorConsoleTaskButton.is-ready {
  border-color: rgba(96, 246, 160, 0.52);
  background: linear-gradient(180deg, rgba(26, 57, 43, 0.96) 0%, rgba(14, 33, 24, 0.96) 100%);
  color: #9af3c2;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 0 0 1px rgba(56, 153, 101, 0.18),
    0 0 14px rgba(54, 143, 96, 0.14);
}

.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.section-heading.compact { margin-bottom: 4px; }
.section-heading h2 { margin: 0; }
.section-heading p { margin: 4px 0 0; color: var(--text-muted); }
.field { display: flex; flex-direction: column; gap: 7px; }
.field span { font-size: 0.9rem; font-weight: 700; letter-spacing: 0.04em; }
.field small { color: var(--text-dim); }

input, select, textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid rgba(140, 157, 181, 0.2);
  border-radius: 12px;
  background: rgba(15, 21, 29, 0.78);
  color: var(--text-main);
}

textarea { resize: vertical; }

button {
  border: 1px solid rgba(131, 154, 181, 0.22);
  border-radius: 999px;
  padding: 10px 16px;
  background: linear-gradient(180deg, rgba(25, 130, 176, 0.95) 0%, rgba(13, 87, 122, 0.95) 100%);
  color: #eff9ff;
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

button:hover:not(:disabled) { transform: translateY(-1px); border-color: rgba(103, 198, 255, 0.38); box-shadow: 0 0 0 1px rgba(103, 198, 255, 0.18); }
button:disabled { opacity: 0.45; cursor: not-allowed; }
.zone-led-toggle:hover:not(:disabled),
.zone-led-toggle:focus-visible {
  transform: none;
  border: none;
  background: rgba(103, 198, 255, 0.12);
  box-shadow:
    0 0 0 1px rgba(103, 198, 255, 0.28),
    0 0 14px rgba(103, 198, 255, 0.14);
}
.secondary-button { background: linear-gradient(180deg, rgba(46, 58, 76, 0.92) 0%, rgba(28, 37, 49, 0.92) 100%); color: var(--text-main); }

#refreshTopologyButton.is-refactor-clicking {
  animation: refactor-hubs-click-burst 360ms cubic-bezier(0.2, 0.78, 0.24, 1);
}

#fullscreenToggleButton.is-focus-active {
  border-color: rgba(118, 207, 255, 0.75);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 0 0 1px rgba(118, 207, 255, 0.28),
    0 10px 18px rgba(31, 129, 174, 0.3);
}

.app-shell[data-wall-colour-mode="light"] #fullscreenToggleButton.is-focus-active {
  border-color: rgba(84, 160, 211, 0.82);
  background: linear-gradient(180deg, rgba(198, 232, 252, 0.99) 0%, rgba(168, 214, 244, 0.99) 100%);
  color: #11344d;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 0 0 1px rgba(84, 160, 211, 0.24),
    0 8px 14px rgba(76, 130, 170, 0.22);
}

@keyframes refactor-hubs-click-burst {
  0% {
    transform: translateY(0) scale(1);
    border-color: rgba(131, 154, 181, 0.22);
    box-shadow: 0 0 0 rgba(103, 198, 255, 0);
  }

  35% {
    transform: translateY(0) scale(0.95);
  }

  62% {
    transform: translateY(-1px) scale(1.045);
    border-color: rgba(103, 198, 255, 0.5);
    box-shadow:
      0 0 0 1px rgba(103, 198, 255, 0.22),
      0 0 20px rgba(103, 198, 255, 0.2);
  }

  100% {
    transform: translateY(0) scale(1);
    border-color: rgba(131, 154, 181, 0.22);
    box-shadow: 0 0 0 rgba(103, 198, 255, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  #refreshTopologyButton.is-refactor-clicking {
    animation: none;
  }
}

.code-block {
  min-height: 72px;
  margin: 0;
  padding: 14px;
  border-radius: 16px;
  background: rgba(8, 16, 24, 0.88);
  color: var(--code-text);
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  border: 1px solid rgba(117, 139, 166, 0.12);
}

.code-block.muted { background: rgba(10, 16, 23, 0.72); }

@media (max-width: 1320px) {
  .schematic-board { min-height: 860px; }
}

@media (min-width: 1181px) and (hover: hover) and (pointer: fine) {
  .project-manager-project--topbar {
    width: auto;
    flex: 0 0 auto;
    justify-content: flex-start;
  }

  .project-manager-project--topbar select {
    flex: 0 0 auto;
    width: 30vw;
    min-width: 30vw;
    max-width: 30vw;
  }

  .topbar-project-col {
    flex: 0 0 auto;
  }

  .topbar-project-col .project-manager-item {
    width: auto;
  }

  .topbar-wall-col {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
  }

  .topbar-wall-col .wall-colour-control--topbar {
    margin-left: 22px;
  }

  .topbar-status-col {
    flex: 0 0 auto;
  }

  .project-manager-grid-row > :nth-child(2) {
    transform: translateX(56px);
  }

  .schematic-command-row {
    flex-wrap: nowrap;
  }

  .schematic-shell > .section-heading .schematic-menu-group {
    gap: 8px;
  }

  .schematic-shell > .section-heading .schematic-menu-group .schematic-menu-cluster {
    gap: 8px;
    flex-wrap: nowrap;
  }

  .schematic-shell > .section-heading .schematic-menu-group--primary {
    flex-wrap: nowrap;
  }

  .schematic-shell > .section-heading .schematic-menu-group--utility {
    flex-wrap: nowrap;
  }

  .schematic-shell > .section-heading .scheme-library {
    min-width: 138px;
  }

  .schematic-shell > .section-heading .scheme-library-trigger {
    min-width: 138px;
  }

  .schematic-shell > .section-heading .schematic-menu-group .chip-menu {
    min-width: 138px;
  }

  .schematic-shell > .section-heading .schematic-menu-group .chip-menu select {
    width: 138px;
    padding-left: 12px;
    padding-right: 24px;
  }

  .schematic-shell > .section-heading .top-chrome-toggle {
    min-width: 82px;
    padding-left: 10px;
    padding-right: 10px;
  }

  .top-chrome-toggle-state {
    display: none;
  }
}

@media (min-width: 980px) and (max-width: 1400px) and (hover: none) and (pointer: coarse) {
  .topbar-grid-row,
  .schematic-command-row {
    flex-wrap: nowrap;
  }

  .topbar-project-col {
    flex: 0 0 30%;
    width: 30%;
  }

  .topbar-wall-col,
  .topbar-status-col,
  .schematic-primary-col,
  .schematic-utility-col {
    width: auto;
    max-width: none;
  }

  .topbar-wall-col,
  .topbar-status-col,
  .schematic-utility-col {
    flex: 0 0 auto;
  }

  .schematic-primary-col {
    flex: 1 1 auto;
    min-width: 0;
  }

  .topbar-wall-col {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
  }

  .topbar-wall-col .wall-colour-control--topbar {
    margin-left: 22px;
  }

  .topbar-status-col,
  .schematic-utility-col {
    margin-left: auto;
  }

  .topbar-status-wrap {
    width: auto;
  }

  .project-manager-grid-row > :nth-child(2) {
    transform: translateX(56px);
  }

  .responsive-copy--desktop {
    display: none;
  }

  .responsive-copy--tablet {
    display: inline;
  }

  .project-manager-project--topbar .project-manager-label {
    font-size: 0.74rem;
    letter-spacing: 0.12em;
  }

  .project-manager-project--topbar {
    width: 100%;
    max-width: none;
  }

  .project-manager-project--topbar select {
    width: 100%;
    max-width: 100%;
  }

  .wall-colour-control--topbar {
    padding-left: 10px;
    padding-right: 6px;
    gap: 6px;
  }

  .wall-colour-control--topbar .chip-menu-label {
    font-size: 0.62rem;
    letter-spacing: 0.08em;
  }

  .wall-colour-control--topbar .wall-colour-toggle {
    min-width: 104px;
  }

  .wall-colour-toggle-button {
    min-width: 48px;
    padding-left: 7px;
    padding-right: 7px;
  }

  .top-chrome-toggle {
    min-width: 82px;
    padding-left: 10px;
    padding-right: 10px;
  }

  .top-chrome-toggle-state {
    display: none;
  }

  .topbar .status-users-chip {
    display: none;
  }

  .schematic-command-row {
    --bs-gutter-x: 8px;
  }

  .schematic-shell > .section-heading .schematic-menu-group {
    gap: 8px;
  }

  .schematic-shell > .section-heading .schematic-menu-group .schematic-menu-cluster {
    gap: 8px;
  }

  .schematic-shell > .section-heading .scheme-library {
    min-width: 138px;
  }

  .schematic-shell > .section-heading .scheme-library-trigger {
    min-width: 138px;
  }

  .schematic-shell > .section-heading .schematic-menu-group .chip-menu {
    min-width: 138px;
  }

  .schematic-shell > .section-heading .schematic-menu-group .chip-menu select {
    width: 138px;
    padding-left: 12px;
    padding-right: 24px;
  }
}

@media (max-width: 1199.98px) {
  .topbar {
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .topbar-status-wrap,
  .schematic-menu-group--utility {
    justify-content: flex-end;
  }
}

@media (max-width: 860px) {
  .app-shell { padding: 14px; }
  .topbar {
    padding: 14px;
  }
  .topbar-status-wrap,
  .project-manager-admin-wrap,
  .schematic-menu-group--utility {
    justify-content: flex-start;
  }
  .project-manager-project--topbar {
    position: static;
    transform: none;
    margin-left: 0;
    width: 100%;
  }
  .project-manager-line {
    align-items: stretch;
    gap: 10px;
  }
  .project-manager-item {
    width: 100%;
    justify-content: space-between;
  }
  .project-manager-project {
    flex: 1 1 auto;
  }
  .project-manager-framework {
    flex: 1 1 auto;
  }
  .project-manager-git {
    flex: 1 1 auto;
  }
  .project-manager-user-cluster {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .project-manager-users-wrap {
    justify-content: flex-start;
  }
  .project-manager-user-cluster .project-manager-user {
    flex: 1 1 auto;
  }
  .project-manager-project select,
  .project-manager-git select,
  .project-manager-framework select,
  .project-manager-user select {
    width: 100%;
  }
  .project-manager-divider {
    display: none;
  }
  .project-access-panel {
    padding: 18px;
  }
  .project-access-header {
    flex-direction: column;
    align-items: stretch;
  }
  .project-access-add-row {
    grid-template-columns: 1fr;
  }
  .project-access-policy-grid,
  .project-access-permission-list {
    grid-template-columns: 1fr;
  }
  .project-access-default-row,
  .project-access-remote-add-row,
  .project-access-remote-tunnel-row {
    grid-template-columns: 1fr;
  }
  .status-admin-button {
    margin-left: 0;
  }
  .schematic-board { min-height: 1000px; }
  .schematic-menu-group {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .schematic-menu-cluster {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .schematic-menu-cluster--utility {
    margin-left: 0;
  }
  .scheme-library {
    min-width: 0;
  }
  .scheme-library-trigger {
    width: 100%;
    min-width: 0;
  }
  .scheme-library-panel {
    position: static;
    width: 100%;
    margin-top: 10px;
  }
  .chip-menu {
    min-width: 0;
  }
  .wall-colour-control {
    justify-content: space-between;
  }
  .wall-colour-control--topbar {
    width: 100%;
    margin-left: 0;
  }
  .wall-colour-control--topbar .wall-colour-toggle {
    width: 100%;
  }
  .wall-colour-toggle-button {
    flex: 1 1 0;
    min-width: 0;
  }
  .schematic-nameplate {
    right: 18px;
    flex-direction: column;
    align-items: flex-start;
  }
  .schematic-status-ribbon {
    align-items: flex-start;
    text-align: left;
  }
  .schematic-board-toolbar {
    top: 14px;
    left: 14px;
    right: 14px;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "lock route"
      "zoom zoom"
      "legend legend"
      "trend trend";
    gap: 12px;
    align-items: flex-start;
  }
  .schematic-lock-controls {
    grid-area: lock;
    gap: 6px;
    padding: 4px 8px;
  }
  .schematic-lock-button {
    min-width: 66px;
    height: var(--wall-instrument-segment-height);
    padding: 0 10px;
  }
  .schematic-lock-move-button {
    min-width: 72px;
    height: var(--wall-instrument-segment-height);
    padding: 0 8px;
  }
  .schematic-board-toolbar > .schematic-legend {
    grid-area: legend;
    justify-self: center;
    gap: 8px;
    max-width: calc(100% - 24px);
    padding: 7px 12px;
    font-size: 0.6rem;
  }
  .schematic-zoom-controls {
    grid-area: zoom;
    justify-self: stretch;
    gap: 6px;
    padding: 4px 8px;
  }
  .schematic-board-toolbar > .schematic-route-style-controls {
    grid-area: route;
    justify-self: end;
    gap: 6px;
    padding: 4px 8px;
  }
  .schematic-board-toolbar > .schematic-flow-style-controls {
    display: none !important;
  }
  .schematic-route-style-button,
  .schematic-flow-style-button {
    min-width: 66px;
    height: var(--wall-instrument-segment-height);
    padding: 0 8px;
  }
  .schematic-zoom-button {
    min-width: 42px;
    height: var(--wall-instrument-segment-height);
    padding: 0 8px;
  }
  .schematic-trend-controls {
    width: 100%;
    gap: 8px;
    padding: 0 8px;
    padding-top: 45px;
  }
  .schematic-row-controls {
    left: 8px;
    top: 116px;
    bottom: 18px;
  }
  .zone-broker { left: 4%; top: 16%; width: 44%; height: 16%; }
  .zone-local { left: 3%; top: 38%; width: 43%; height: 52%; }
  .zone-external { left: 50%; top: 38%; width: 45%; height: 52%; }
  .schematic-node { min-width: 138px; }
  .schematic-node.kind-decision { min-width: 182px; }
  .route-indicator { min-width: 118px; }
  .junction-mount { width: 126px; }
}

@media (max-width: 767.98px) and (orientation: portrait) and (hover: none) and (pointer: coarse) {
  .schematic-board-toolbar > #boardZoomControls {
    display: none;
  }

  .schematic-board-toolbar > .schematic-legend {
    position: relative;
    left: -18px;
  }

  .schematic-board-toolbar > .schematic-route-style-controls {
    position: relative;
    left: -16px;
  }
}

@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
  body.top-widget-v2-active #boardZoomControls {
    display: none;
  }

  .schematic-board-toolbar {
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    grid-template-areas:
      "lock legend flow route"
      "trend trend trend trend";
    align-items: center;
  }

  .schematic-lock-controls {
    justify-self: start;
  }

  .schematic-board-toolbar > .schematic-legend {
    grid-area: legend;
    justify-self: center;
    align-self: center;
    margin: 0;
    min-width: 0;
    width: fit-content;
    max-width: 72vw;
    justify-content: center;
    padding-left: 10px;
    padding-right: 10px;
    position: relative;
    left: 0px;
    pointer-events: auto;
    z-index: 10;
  }

  .schematic-board-toolbar > .schematic-route-style-controls {
    justify-self: end;
    align-self: center;
    position: relative;
    left: -22px;
  }
  .schematic-board-toolbar > .schematic-flow-style-controls {
    display: inline-flex !important;
    grid-area: flow;
    justify-self: end;
    align-self: center;
    position: relative;
    right: 50px;
    gap: 6px;
    padding: 4px 8px;
  }
  .schematic-flow-style-button {
    min-width: 66px;
    height: var(--wall-instrument-segment-height);
    padding: 0 8px;
  }

  .schematic-board-toolbar > #boardZoomControls {
    display: none;
  }

  .schematic-board-toolbar > #boardRouteStyleControls {
    left: -80px;
  }
}

@media (max-width: 1279px) {
  .schematic-board-toolbar > .schematic-flow-style-controls {
    display: none !important;
  }
}

@media (min-width: 1024px) and (max-width: 1366px) and (orientation: landscape) {
  .schematic-trend-controls {
    margin-top: -5px;
  }

  .schematic-row-controls {
    top: 91px;
  }

  .schematic-board-toolbar > .schematic-legend {
    grid-area: legend;
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    justify-self: start;
    margin-left: -15px !important;
    min-height: var(--board-toolbar-pill-height);
    gap: 10px;
    max-width: min(100%, 960px);
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid var(--wall-legend-border);
    background: var(--wall-legend-bg);
    font-size: 0.66rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--wall-legend-text);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 10px 18px rgba(0, 0, 0, 0.24);
    pointer-events: none;
    white-space: nowrap;
    transform: scale(var(--board-toolbar-scale));
    transform-origin: center top;
  }

  .schematic-board-toolbar > .schematic-flow-style-controls {
    display: inline-flex !important;
    justify-self: end;
    align-self: center;
    right: 7.5vw;
    gap: 6px;
    padding: 4px 8px;
  }

  .schematic-flow-style-button {
    min-width: 66px;
    height: var(--wall-instrument-segment-height);
    padding: 0 8px;
  }
}


/* Stage 2 portrait override: keep toolbar as one compact row on iPad portrait. */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) and (hover: none) and (pointer: coarse) {
  .schematic-trend-controls {
    margin-top: -5px;
  }

  .schematic-row-controls {
    top: 91px;
  }

  .zone-title {
    font-size: 8.3px;
  }

  .zone-agent-pill {
    font-size: 6.7px;
  }

  .schematic-board-toolbar > .schematic-legend {
    pointer-events: auto;
    position: relative;
    z-index: 10;
  }

  .topbar-grid-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    grid-template-areas: "work bg status";
    column-gap: 12px;
    row-gap: 0;
    align-items: center;
    flex-wrap: nowrap;
  }

  .topbar-project-col {
    grid-area: work;
    width: auto;
    max-width: none;
    justify-self: start;
    flex: 0 1 auto;
    display: block;
  }

  .topbar-project-col .project-manager-item.project-manager-project--topbar {
    width: auto;
    max-width: none;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
  }

  .project-manager-project--topbar .project-manager-label {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .project-manager-project--topbar select,
  .project-manager-project--topbar .project-manager-static-value {
    width: 20vw;
    min-width: 20vw;
    max-width: 20vw;
  }

  .topbar-wall-col {
    grid-area: bg;
    width: auto;
    max-width: none;
    justify-self: center;
    display: flex;
    justify-content: center;
    transform: translateX(28px);
  }

  .topbar-wall-col .wall-colour-control--topbar {
    margin-left: 0;
    width: auto;
  }

  .topbar-status-col {
    grid-area: status;
    width: auto;
    max-width: none;
    justify-self: end;
    display: flex;
    justify-content: flex-end;
  }

  .topbar-status-wrap {
    width: auto;
    justify-content: flex-end;
  }

  .status-chip-row {
    gap: 8px;
    flex-wrap: nowrap;
    justify-content: flex-end;
  }

  .project-manager-grid-row {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(120px, 0.7fr) minmax(180px, 1fr);
    grid-template-areas: "framework git users";
    column-gap: 12px;
    row-gap: 0;
    align-items: center;
  }

  .project-manager-grid-row > :nth-child(1) {
    grid-area: framework;
    width: 100%;
    max-width: none;
    justify-self: start;
  }

.project-manager-grid-row > :nth-child(2) {
  grid-area: git;
  width: 100%;
  max-width: none;
  justify-self: center;
  transform: translateX(58px);
  margin-right: 98px;
}

  .project-manager-grid-row > :nth-child(3) {
    grid-area: users;
    width: auto;
    max-width: none;
    justify-self: end;
    margin-left: 0;
  }

  .project-manager-grid-row .project-manager-item {
    width: auto;
    justify-content: flex-start;
    gap: 8px;
  }

  .project-manager-framework,
  .project-manager-git {
    width: auto;
    max-width: none;
    display: inline-flex;
    align-items: center;
  }

  .project-manager-scout {
    width: 100%;
    min-width: 0;
  }

  .project-manager-scout .project-scout-trigger {
    min-width: 92px;
  }

  .project-manager-scout .project-scout-status {
    min-width: 0;
    flex: 1 1 auto;
  }

  .project-manager-framework .project-manager-label,
  .project-manager-git .project-manager-label {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .project-manager-framework select {
    width: 20vw;
    min-width: 20vw;
    max-width: 20vw;
  }

  .project-manager-user-cluster {
    width: auto;
    margin-left: 0;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
  }

  .project-manager-users-wrap {
    margin-right: 0;
    justify-content: flex-end;
    flex: 0 0 auto;
  }

  .project-manager-users-wrap .status-users-chip {
    display: none;
  }

  .project-manager-user-cluster .project-manager-user {
    width: auto;
    flex: 0 0 auto;
  }

  .project-manager-user {
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }

  .project-manager-user .project-manager-label {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .schematic-shell > .section-heading .schematic-command-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    align-items: center;
  }

  .schematic-shell > .section-heading .schematic-command-row > .schematic-utility-col,
  .schematic-shell > .section-heading .schematic-command-row > .schematic-primary-col {
    min-width: 0;
    max-width: none;
    width: auto;
  }

  .schematic-shell > .section-heading .schematic-command-row > .schematic-primary-col {
    flex: 1 1 auto;
  }

  .schematic-shell > .section-heading .schematic-command-row > .schematic-utility-col {
    flex: 0 0 auto;
    display: flex;
    justify-content: flex-start;
  }

  .schematic-shell > .section-heading .schematic-menu-group--utility,
  .schematic-shell > .section-heading .schematic-menu-group--utility .schematic-menu-cluster--utility {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: auto;
  }

  .schematic-shell > .section-heading #fullscreenToggleButton,
  .schematic-shell > .section-heading #refreshTopologyButton,
  .schematic-shell > .section-heading #topChromeToggle {
    width: auto;
    min-width: 0;
    padding-left: 10px;
    padding-right: 10px;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
  }

  .schematic-shell > .section-heading #refreshTopologyButton .responsive-copy--desktop,
  .schematic-shell > .section-heading #refreshTopologyButton .responsive-copy--tablet {
    display: none;
  }

  .schematic-shell > .section-heading #refreshTopologyButton::after {
    content: "Refactor";
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1;
  }

  .schematic-shell > .section-heading #topChromeToggle .top-chrome-toggle-content {
    transform: none;
    padding-bottom: 0;
    gap: 7px;
  }

  .schematic-shell > .section-heading #topChromeToggle .top-chrome-toggle-label i,
  .schematic-shell > .section-heading #topChromeToggle .top-chrome-toggle-label .top-chrome-toggle-icon-asset {
    display: inline-block !important;
  }

  .schematic-shell > .section-heading #topChromeToggle .top-chrome-toggle-label::after {
    content: none !important;
    display: none !important;
  }

  .schematic-shell > .section-heading #topChromeToggle .top-chrome-toggle-state {
    display: none;
  }

  .schematic-shell > .section-heading .schematic-menu-group--primary {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
    min-width: 0;
  }

  .schematic-shell > .section-heading .schematic-menu-group--primary .schematic-menu-cluster--save,
  .schematic-shell > .section-heading .schematic-menu-group--primary .schematic-menu-cluster--scheme,
  .schematic-shell > .section-heading .schematic-menu-group--primary .schematic-menu-cluster--creation,
  .schematic-shell > .section-heading .schematic-menu-group--primary .schematic-title-group {
    display: contents;
  }

  .schematic-shell > .section-heading .schematic-menu-group--primary .schematic-menu-cluster {
    width: auto;
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
  }

  .schematic-shell > .section-heading #schemaSaveTrigger {
    width: auto;
    min-width: 0;
    padding-left: 10px;
    padding-right: 10px;
    gap: 4px;
  }

  .schematic-shell > .section-heading #publishSchemeTrigger {
    width: auto;
    min-width: 0;
    padding-left: 10px;
    padding-right: 10px;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
  }

  .schematic-shell > .section-heading #schemeLibrary {
    width: auto;
    min-width: 0;
    margin: 0;
  }

  .schematic-shell > .section-heading #schemeLibraryButton {
    width: auto;
    min-width: 0;
    justify-content: space-between;
    padding-left: 10px;
    padding-right: 10px;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
  }

  .schematic-shell > .section-heading .schematic-menu-cluster--creation .chip-menu {
    width: auto;
    min-width: 0;
    margin: 0;
  }

  .schematic-shell > .section-heading #hubMenuSelect {
    width: auto;
    min-width: 0;
    padding-left: 10px;
    padding-right: 26px;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
  }
}

/* Zoom widget active state hard lock */
#topologyBoard.schematic-board[data-wall-colour-mode="light"] #boardZoomControls .schematic-zoom-button.is-active,
#topologyBoard.schematic-board[data-wall-colour-mode="light"] #boardZoomControls .schematic-zoom-button[aria-pressed="true"],
#topologyBoard.schematic-board[data-wall-colour-mode="light"] #boardZoomControls .schematic-zoom-button.is-active:hover:not(:disabled),
#topologyBoard.schematic-board[data-wall-colour-mode="light"] #boardZoomControls .schematic-zoom-button[aria-pressed="true"]:hover:not(:disabled),
#topologyBoard.schematic-board[data-wall-colour-mode="light"] #boardZoomControls .schematic-zoom-button.is-active:focus-visible,
#topologyBoard.schematic-board[data-wall-colour-mode="light"] #boardZoomControls .schematic-zoom-button[aria-pressed="true"]:focus-visible {
  background: #abd8f5 !important;
  background-color: #abd8f5 !important;
  background-image: linear-gradient(#abd8f5, #abd8f5) !important;
}

@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) and (hover: none) and (pointer: coarse) {
  .schematic-board-toolbar > .schematic-legend {
    pointer-events: auto;
    position: fixed;
    z-index: 10;
    left: 25vw;
  }
}

@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
  html.ui-local-dev .schematic-board-toolbar > .schematic-flow-style-controls {
    display: inline-flex !important;
    grid-area: flow;
    justify-self: end;
    align-self: center;
    position: fixed;
    right: 25vw;
    gap: 6px;
    padding: 4px 8px;
  }
}

@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
  .schematic-board-toolbar > #boardRouteStyleControls {
    left: 70vw;
    position: fixed;
  }
}

@media (min-width: 1024px) and (max-width: 1366px) and (orientation: landscape) {
  .schematic-board-toolbar > .schematic-legend {
    grid-area: legend;
    position: fixed;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    justify-self: start;
    margin-left: -15px !important;
    min-height: var(--board-toolbar-pill-height);
    gap: 10px;
    max-width: min(100%, 960px);
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid var(--wall-legend-border);
    background: var(--wall-legend-bg);
    font-size: 0.66rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--wall-legend-text);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 10px 18px rgba(0, 0, 0, 0.24);
    pointer-events: none;
    white-space: nowrap;
    transform: scale(var(--board-toolbar-scale));
    transform-origin: center top;
  }
}

.schematic-board-toolbar > .schematic-legend {
  gap: 8px;
  padding: 4px 10px;
  color: var(--wall-instrument-label-text);
  position: fixed;
  left: 25vw;
}

.schematic-board-toolbar > .schematic-route-style-controls {
  grid-area: route;
  display: inline-flex;
  align-items: center;
  justify-self: start;
  left: -5vw;
  position: relative;
  min-height: var(--board-toolbar-pill-height);
  gap: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--wall-legend-border);
  background: var(--wall-legend-bg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 10px 18px rgba(0, 0, 0, 0.24);
  pointer-events: auto;
  transform: scale(var(--board-toolbar-scale));
  transform-origin: right top;
}

@media (min-width: 1024px) and (max-width: 1366px) and (orientation: landscape) {
  html.ui-local-dev .schematic-board-toolbar > .schematic-flow-style-controls {
    display: inline-flex !important;
    justify-self: end;
    align-self: center;
    right: 2vw;
    gap: 6px;
    padding: 4px 8px;
    position: fixed;
  }
}

.publish-scheme-shell {
  width: min(640px, 92vw);
  height: auto;
  max-height: 82vh;
}

.publish-scheme-body {
  display: grid;
  gap: 12px;
  overflow-y: auto;
  padding-right: 2px;
}

.publish-scheme-copy {
  margin: 0;
  color: rgba(201, 214, 232, 0.82);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

.publish-scheme-list {
  display: grid;
  gap: 8px;
}

.publish-scheme-option {
  display: grid;
  gap: 3px;
  width: 100%;
  text-align: left;
  border-radius: 10px;
  border: 1px solid rgba(121, 145, 175, 0.32);
  background: linear-gradient(180deg, rgba(26, 35, 48, 0.92) 0%, rgba(13, 21, 31, 0.92) 100%);
  padding: 10px 12px;
  color: #dce8f8;
}

.publish-scheme-option:hover,
.publish-scheme-option:focus-visible {
  border-color: rgba(103, 198, 255, 0.44);
  box-shadow: 0 0 0 1px rgba(103, 198, 255, 0.16);
}

.publish-scheme-option.is-selected {
  border-color: rgba(121, 203, 255, 0.58);
  box-shadow: 0 0 0 1px rgba(121, 203, 255, 0.2);
}

.publish-scheme-option-title {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.publish-scheme-option-meta {
  font-size: 0.72rem;
  color: rgba(177, 195, 217, 0.82);
  letter-spacing: 0.04em;
}

.publish-scheme-current {
  margin: 0;
  font-size: 0.78rem;
  color: rgba(177, 195, 217, 0.86);
  letter-spacing: 0.05em;
}

.publish-scheme-current strong {
  color: #dce8f8;
}

body.top-widget-v2-active .schematic-board-toolbar > #boardLayoutLockControls,
body.top-widget-v2-active .schematic-board-toolbar > .schematic-legend,
body.top-widget-v2-active .schematic-board-toolbar > #boardFlowStyleControls,
body.top-widget-v2-active .schematic-board-toolbar > #boardRouteStyleControls,
body.top-widget-v2-active .schematic-board-toolbar > #boardZoomControls {
  display: none;
}

.top-widget-toolbar-v2 {
  position: absolute;
  inset: 0;
  z-index: 1200;
  pointer-events: none;
}

.top-widget-slot-v2 {
  position: absolute;
  top: var(--tw2-top, 2.2vw);
  left: var(--tw2-left, 1.4vw);
  width: var(--tw2-width, 16vw);
  transform: scale(var(--tw2-scale, 1));
  transform-origin: top left;
  z-index: 1200;
  pointer-events: none;
}

.top-widget-shell-v2 {
  width: 100%;
  pointer-events: auto;
}

.top-widget-shell-v2 > .top-widget-mounted-v2 {
  position: static;
  inset: auto;
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
  transform: none;
  margin: 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: visible;
}

.top-widget-shell-v2 > .top-widget-mounted-v2-lock,
.top-widget-shell-v2 > .top-widget-mounted-v2-legend,
.top-widget-shell-v2 > .top-widget-mounted-v2-flow,
.top-widget-shell-v2 > .top-widget-mounted-v2-route,
.top-widget-shell-v2 > .top-widget-mounted-v2-zoom {
  pointer-events: auto;
}

.top-widget-shell-v2 > .top-widget-mounted-v2-legend {
  align-items: center;
  padding-top: 6px;
  padding-bottom: 0px;
}

.top-widget-shell-v2 > .top-widget-mounted-v2.top-widget-mounted-v2-overlay-open {
  position: relative;
  z-index: 1210;
}

.top-widget-shell-v2 > .top-widget-mounted-v2.top-widget-mounted-v2-overlay-open :is(
  .chip-menu-panel,
  .menu-panel,
  .dropdown-menu,
  .popover,
  [role="menu"],
  [role="listbox"]
) {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: auto;
  margin: 0;
  transform: none;
  z-index: 1211;
  max-width: min(92vw, 38rem);
}

.top-widget-shell-v2 > .top-widget-mounted-v2.top-widget-mounted-v2-overlay-open :is(
  [role="menu"],
  [role="listbox"]
) {
  max-height: min(55vh, 22rem);
  overflow: auto;
}

.top-widget-shell-v2 > .top-widget-mounted-v2-flow.top-widget-mounted-v2-overlay-open,
.top-widget-shell-v2 > .top-widget-mounted-v2-route.top-widget-mounted-v2-overlay-open {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  align-items: center;
  align-content: center;
  column-gap: 6px;
  row-gap: 4px;
  min-height: 0;
  height: auto;
  padding-top: 5px;
  padding-bottom: 5px;
}

.top-widget-shell-v2 > .top-widget-mounted-v2-flow.top-widget-mounted-v2-overlay-open :is(
  .schematic-flow-style-label,
  .schematic-route-style-label
),
.top-widget-shell-v2 > .top-widget-mounted-v2-route.top-widget-mounted-v2-overlay-open :is(
  .schematic-flow-style-label,
  .schematic-route-style-label
) {
  align-self: center;
  margin: 0;
  line-height: 1;
}

.top-widget-shell-v2 > .top-widget-mounted-v2-flow.top-widget-mounted-v2-overlay-open :is(
  .schematic-flow-style-button,
  .schematic-route-style-button
),
.top-widget-shell-v2 > .top-widget-mounted-v2-route.top-widget-mounted-v2-overlay-open :is(
  .schematic-flow-style-button,
  .schematic-route-style-button
) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  height: 26px;
  margin: 0;
  line-height: 1;
  padding: 0 10px;
  transform: none;
}

.top-widget-shell-v2 > .top-widget-mounted-v2-flow.top-widget-mounted-v2-overlay-open :is(
  .schematic-flow-style-button:hover:not(:disabled),
  .schematic-flow-style-button:focus-visible,
  .schematic-flow-style-button.is-active,
  .schematic-flow-style-button.is-active:hover:not(:disabled),
  .schematic-flow-style-button.is-active:focus-visible,
  .schematic-route-style-button:hover:not(:disabled),
  .schematic-route-style-button:focus-visible,
  .schematic-route-style-button.is-active,
  .schematic-route-style-button.is-active:hover:not(:disabled),
  .schematic-route-style-button.is-active:focus-visible
),
.top-widget-shell-v2 > .top-widget-mounted-v2-route.top-widget-mounted-v2-overlay-open :is(
  .schematic-flow-style-button:hover:not(:disabled),
  .schematic-flow-style-button:focus-visible,
  .schematic-flow-style-button.is-active,
  .schematic-flow-style-button.is-active:hover:not(:disabled),
  .schematic-flow-style-button.is-active:focus-visible,
  .schematic-route-style-button:hover:not(:disabled),
  .schematic-route-style-button:focus-visible,
  .schematic-route-style-button.is-active,
  .schematic-route-style-button.is-active:hover:not(:disabled),
  .schematic-route-style-button.is-active:focus-visible
) {
  transform: none;
}

.top-widget-shell-v2 > .top-widget-mounted-v2-legend.top-widget-mounted-v2-overlay-open :is(
  .chip-menu-panel,
  .menu-panel,
  .dropdown-menu,
  .popover,
  [role="menu"],
  [role="listbox"]
) {
  top: calc(100% + 4px);
  left: 0;
  right: auto;
  min-width: max-content;
  max-width: min(56vw, 30rem);
}

.top-widget-shell-v2 > .top-widget-mounted-v2-flow.top-widget-mounted-v2-overlay-open :is(
  .chip-menu-panel,
  .menu-panel,
  .dropdown-menu,
  .popover,
  [role="menu"],
  [role="listbox"]
) {
  top: calc(100% + 6px);
  left: 0;
  right: auto;
  min-width: 11rem;
  max-width: min(22vw, 16rem);
}

.top-widget-shell-v2 > .top-widget-mounted-v2-route.top-widget-mounted-v2-overlay-open :is(
  .chip-menu-panel,
  .menu-panel,
  .dropdown-menu,
  .popover,
  [role="menu"],
  [role="listbox"]
) {
  top: calc(100% + 6px);
  left: auto;
  right: 0;
  min-width: 9.25rem;
  max-width: min(18vw, 13rem);
}

@media (max-width: 1180px) {
  .top-widget-shell-v2 > .top-widget-mounted-v2-flow.top-widget-mounted-v2-overlay-open :is(
    .chip-menu-panel,
    .menu-panel,
    .dropdown-menu,
    .popover,
    [role="menu"],
    [role="listbox"]
  ) {
    min-width: 10rem;
    max-width: min(34vw, 15rem);
  }

  .top-widget-shell-v2 > .top-widget-mounted-v2-route.top-widget-mounted-v2-overlay-open :is(
    .chip-menu-panel,
    .menu-panel,
    .dropdown-menu,
    .popover,
    [role="menu"],
    [role="listbox"]
  ) {
    min-width: 8.75rem;
    max-width: min(30vw, 12.5rem);
  }
}

@media (max-width: 767px) {
  .top-widget-shell-v2 > .top-widget-mounted-v2-legend.top-widget-mounted-v2-overlay-open :is(
    .chip-menu-panel,
    .menu-panel,
    .dropdown-menu,
    .popover,
    [role="menu"],
    [role="listbox"]
  ) {
    max-width: min(88vw, 24rem);
  }

  .top-widget-shell-v2 > .top-widget-mounted-v2-flow.top-widget-mounted-v2-overlay-open :is(
    .chip-menu-panel,
    .menu-panel,
    .dropdown-menu,
    .popover,
    [role="menu"],
    [role="listbox"]
  ),
  .top-widget-shell-v2 > .top-widget-mounted-v2-route.top-widget-mounted-v2-overlay-open :is(
    .chip-menu-panel,
    .menu-panel,
    .dropdown-menu,
    .popover,
    [role="menu"],
    [role="listbox"]
  ) {
    max-width: min(70vw, 13rem);
  }
}

.top-widget-shell-v2 .top-widget-placeholder-v2 {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px dashed rgba(120, 147, 177, 0.8);
  background: rgba(16, 24, 36, 0.82);
  color: #d8e3f1;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  min-height: 34px;
}

.top-widget-layout-admin {
  min-height: 100vh;
  box-sizing: border-box;
  padding: 24px 20px 34px;
  background:
    radial-gradient(circle at 8% 12%, rgba(86, 154, 255, 0.14), transparent 34%),
    radial-gradient(circle at 88% 8%, rgba(87, 205, 168, 0.1), transparent 30%),
    linear-gradient(180deg, #f2f7fc 0%, #e8eef6 100%);
  color: #0f172a;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

.top-widget-layout-admin__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.top-widget-layout-admin__logout {
  border: 1px solid #1e293b;
  border-radius: 8px;
  background: #ffffff;
  color: #1e293b;
  padding: 7px 11px;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.top-widget-layout-admin__title {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: 0.02em;
}

.top-widget-layout-admin__subtitle {
  margin: 4px 0 0;
  font-size: 0.85rem;
  color: #334155;
}

.top-widget-layout-admin__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.top-widget-layout-admin__tab-button {
  border: 1px solid #1e293b;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: #1e293b;
  padding: 7px 12px;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.top-widget-layout-admin__tab-button.is-active {
  background: #1e293b;
  color: #ffffff;
}

.top-widget-layout-admin__section {
  margin-bottom: 12px;
}

.top-widget-layout-admin__section-title {
  margin: 0 0 10px;
  font-size: 0.96rem;
}

.top-widget-layout-admin .hub-status-sandbox-select {
  min-width: 130px;
}

.top-widget-layout-admin__grid {
  display: grid;
  grid-template-columns: minmax(320px, 520px) minmax(320px, 1fr);
  gap: 18px;
}

.top-widget-layout-admin__panel {
  border: 1px solid rgba(152, 170, 194, 0.72);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 28px rgba(20, 32, 50, 0.08);
  padding: 14px;
}

.top-widget-layout-admin__row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.top-widget-layout-admin__row label {
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #334155;
}

.top-widget-layout-admin__row select,
.top-widget-layout-admin__row input,
.top-widget-layout-admin__row button,
.top-widget-layout-admin__panel textarea {
  font-family: inherit;
}

.top-widget-layout-admin__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.top-widget-layout-admin__table th,
.top-widget-layout-admin__table td {
  border-bottom: 1px solid rgba(203, 213, 225, 0.8);
  padding: 8px 6px;
  text-align: left;
}

.top-widget-layout-admin__table td input {
  width: 100%;
  min-width: 74px;
}

.top-widget-layout-admin__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.top-widget-layout-admin__actions button {
  border: 1px solid #1e293b;
  background: #1e293b;
  color: #ffffff;
  border-radius: 8px;
  padding: 7px 11px;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.top-widget-layout-admin__actions button[data-variant="ghost"] {
  background: #ffffff;
  color: #1e293b;
}

.top-widget-layout-admin__status {
  margin: 10px 0 0;
  font-size: 0.76rem;
  color: #334155;
  min-height: 1.2em;
}

.top-widget-layout-admin__status.is-error {
  color: #b91c1c;
}

.top-widget-layout-admin__json {
  width: 100%;
  min-height: 180px;
  box-sizing: border-box;
  margin-top: 10px;
  border: 1px solid #b7c7da;
  border-radius: 8px;
  padding: 8px;
  font-size: 0.74rem;
  background: #f8fbff;
}

.top-widget-layout-admin__login-panel {
  max-width: 420px;
  margin: 8vh auto 0;
}

.top-widget-layout-admin__login-form {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.top-widget-layout-admin__login-form input {
  border: 1px solid #b7c7da;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.86rem;
}

.top-widget-layout-admin__login-form button {
  border: 1px solid #1e293b;
  border-radius: 8px;
  background: #1e293b;
  color: #ffffff;
  padding: 7px 11px;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.top-widget-layout-admin .top-widget-toolbar-v2 {
  min-height: 26vh;
}

.top-widget-admin-preview-stage {
  position: relative;
  box-sizing: border-box;
  min-height: 320px;
  padding: 18px 16px 14px;
  border-radius: 10px;
  border: 1px solid rgba(188, 202, 221, 0.85);
  background: linear-gradient(180deg, rgba(246, 250, 255, 0.96) 0%, rgba(237, 244, 252, 0.96) 100%);
  overflow: hidden;
}

#topWidgetToolbarV2AdminPreview {
  position: relative;
  width: 100%;
  min-height: 280px;
}

#topWidgetToolbarV2AdminPreview .top-widget-slot-v2 {
  position: absolute;
  top: var(--tw2-top);
  left: var(--tw2-left);
  width: var(--tw2-width);
  transform: scale(var(--tw2-scale));
  transform-origin: top left;
}

@media (max-width: 1024px) {
  .top-widget-layout-admin__grid {
    grid-template-columns: 1fr;
  }
}
