: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: 12px;
  --ribbon-action-height: 36px;
  --ribbon-action-icon-size: 16px;
  --ribbon-action-radius: 10px;
  --ribbon-action-padding-x: 12px;
  --ribbon-action-cluster-gap: 10px;
  --ribbon-action-group-gap: 24px;
  --ribbon-action-bg: rgba(90, 108, 129, 0.9);
  --ribbon-action-bg-hover: rgba(100, 118, 140, 0.95);
  --ribbon-action-bg-disabled: rgba(74, 91, 110, 0.52);
  --ribbon-action-border: rgba(161, 182, 207, 0.38);
  --ribbon-action-border-hover: rgba(176, 197, 222, 0.46);
  --ribbon-action-surface-shadow: none;
  --ribbon-action-surface-shadow-hover: none;
  --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: rgba(226, 237, 249, 0.96);
  --ribbon-save-bg: var(--ribbon-action-bg);
  --ribbon-save-bg-hover: var(--ribbon-action-bg-hover);
  --ribbon-save-border: var(--ribbon-action-border);
  --ribbon-save-border-hover: var(--ribbon-action-border-hover);
  --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: #1d2938;
  --ribbon-save-icon-chip-bg-hover: #243548;
  --ribbon-save-icon-chip-border: rgba(135, 154, 178, 0.36);
  --topbar-pill-glow-border: rgba(255, 255, 255, 0.55);
  --topbar-pill-glow-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 0 6px rgba(255, 255, 255, 0.18),
    0 0 14px rgba(255, 255, 255, 0.1);
  --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: 40;
  border-bottom: 1px solid rgba(187, 202, 224, 0.22);
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.96) 0%, rgba(237, 242, 247, 0.92) 100%);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.host-ribbon__inner {
  max-width: 1780px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

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

.host-ribbon__brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.88);
  color: #0f172a;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.host-ribbon__path {
  color: #64748b;
}

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

.host-ribbon__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(255, 255, 255, 0.78);
  color: #0f172a;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 140ms ease, background-color 140ms ease, transform 140ms ease;
}

.host-ribbon__link:hover,
.host-ribbon__link:focus-visible {
  border-color: rgba(71, 85, 105, 0.6);
  background: rgba(255, 255, 255, 0.96);
  transform: translateY(-1px);
}

.host-ribbon__link:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.18);
  outline-offset: 2px;
}

.host-ribbon__link--primary {
  border-color: rgba(15, 23, 42, 0.88);
  background: #0f172a;
  color: #f8fafc;
}

.host-ribbon__link--primary:hover,
.host-ribbon__link--primary:focus-visible {
  border-color: rgba(15, 23, 42, 0.96);
  background: #1e293b;
}

.app-shell {
  max-width: 1780px;
  margin: 0 auto;
  padding: 20px 24px 0;
  --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;
}

.app-shell[data-wall-colour-mode="light"] {
  --workspace-shell-bg:
    radial-gradient(circle at 16% 0%, rgba(255, 255, 255, 0.76), transparent 28%),
    radial-gradient(circle at 84% 2%, rgba(250, 254, 255, 0.6), transparent 26%),
    linear-gradient(180deg, rgba(242, 248, 255, 0.9) 0%, rgba(231, 240, 250, 0.82) 100%);
  --workspace-shell-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 22px 36px rgba(33, 51, 70, 0.1);
  --workspace-topbar-bg: linear-gradient(180deg, rgba(227, 236, 246, 0.94) 0%, rgba(216, 227, 239, 0.9) 100%);
  --workspace-topbar-border: rgba(120, 141, 166, 0.4);
  --workspace-topbar-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.74),
    0 12px 20px rgba(36, 55, 75, 0.1);
  --workspace-project-bar-bg: linear-gradient(180deg, rgba(222, 232, 243, 0.96) 0%, rgba(209, 221, 234, 0.93) 100%);
  --workspace-project-bar-border: rgba(118, 139, 163, 0.42);
  --workspace-project-bar-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 12px 22px rgba(34, 52, 72, 0.11);
  --workspace-schematic-shell-bg: linear-gradient(180deg, rgba(226, 236, 247, 0.97) 0%, rgba(213, 225, 238, 0.95) 100%);
  --workspace-schematic-shell-border: rgba(116, 137, 162, 0.42);
  --workspace-schematic-shell-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.76),
    0 22px 34px rgba(33, 52, 72, 0.14);
  --workspace-schematic-heading-bg: linear-gradient(180deg, rgba(218, 229, 241, 0.96) 0%, rgba(206, 219, 232, 0.93) 100%);
  --workspace-schematic-heading-border: rgba(112, 133, 158, 0.44);
  --workspace-schematic-heading-shadow: 0 10px 18px rgba(35, 54, 74, 0.12);
  --workspace-schematic-heading-copy-color: rgba(29, 48, 69, 0.84);
  --ribbon-row-bg: rgba(216, 226, 238, 0.58);
  --ribbon-row-border: rgba(121, 143, 167, 0.28);
  --ribbon-action-bg: linear-gradient(180deg, rgba(198, 211, 226, 0.97) 0%, rgba(187, 201, 217, 0.97) 100%);
  --ribbon-action-bg-hover: linear-gradient(180deg, rgba(206, 218, 232, 0.98) 0%, rgba(194, 208, 223, 0.98) 100%);
  --ribbon-action-bg-disabled: rgba(178, 191, 206, 0.56);
  --ribbon-action-border: rgba(102, 124, 149, 0.44);
  --ribbon-action-border-hover: rgba(93, 116, 141, 0.5);
  --ribbon-action-surface-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 -1px 0 rgba(104, 126, 151, 0.12);
  --ribbon-action-surface-shadow-hover:
    inset 0 1px 0 rgba(255, 255, 255, 0.56),
    inset 0 -1px 0 rgba(97, 120, 146, 0.14);
  --ribbon-action-primary-bg: rgba(169, 186, 206, 0.97);
  --ribbon-action-primary-bg-hover: rgba(179, 197, 217, 0.99);
  --ribbon-action-primary-border: rgba(86, 111, 138, 0.52);
  --ribbon-action-primary-border-hover: rgba(79, 104, 132, 0.58);
  --ribbon-action-text: rgba(20, 38, 58, 0.95);
  --ribbon-action-text-muted: rgba(28, 46, 68, 0.92);
  --ribbon-save-bg: var(--ribbon-action-bg);
  --ribbon-save-bg-hover: var(--ribbon-action-bg-hover);
  --ribbon-save-border: var(--ribbon-action-border);
  --ribbon-save-border-hover: var(--ribbon-action-border-hover);
  --ribbon-save-text: var(--ribbon-action-text-muted);
  --ribbon-save-dirty-bg: var(--ribbon-action-primary-bg);
  --ribbon-save-dirty-border: var(--ribbon-action-primary-border);
  --ribbon-save-dirty-text: var(--ribbon-action-text);
  --ribbon-save-icon-chip-bg: #243648;
  --ribbon-save-icon-chip-bg-hover: #2b4057;
  --ribbon-save-icon-chip-border: #3f5972;
}

.app-shell[data-wall-colour-mode="light"] .project-manager-bar .project-manager-label {
  color: rgba(49, 67, 89, 0.84);
}

.app-shell[data-wall-colour-mode="light"] .project-manager-project--topbar .project-manager-label {
  color: rgba(49, 67, 89, 0.84);
}

.app-shell[data-wall-colour-mode="light"] .project-manager-bar .project-manager-divider {
  background: rgba(120, 141, 164, 0.32);
}

.top-chrome-section[hidden] { display: none; }
.topbar {
  display: block;
  padding: 14px 18px;
  margin-bottom: 14px;
  position: relative;
  border-radius: 22px;
  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;
}

.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: 999px;
  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: 22px;
  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: 999px;
  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: 999px;
  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: 999px;
  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;
}
.project-manager-framework {
  flex: 0 1 20vw;
}
.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: 28px;
}
.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: 999px;
  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-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);
}
.project-manager-admin-wrap {
  display: flex;
  justify-content: flex-end;
  width: 100%;
}

.project-manager-admin-wrap .status-admin-button {
  margin-left: 0;
}

.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 {
  border-color: var(--topbar-pill-glow-border);
  box-shadow: var(--topbar-pill-glow-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: 22px 22px 28px;
  margin-bottom: 0;
  border-radius: 28px;
  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 18px;
  border-radius: 18px;
  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;
  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;
  line-height: 1;
}
.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(--topbar-pill-glow-border);
  border-radius: 999px;
  background: var(--topbar-pill-bg);
  box-shadow: var(--topbar-pill-glow-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: 999px;
  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: 999px;
  background: transparent;
  color: rgba(188, 202, 220, 0.66);
  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: 28px;
  height: 28px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--green);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.schema-save-trigger-symbol {
  position: absolute;
  inset: 4px;
  width: calc(100% - 8px);
  height: calc(100% - 8px);
  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);
}

.schematic-shell > .section-heading .schema-save-trigger,
.schematic-shell > .section-heading .secondary-button,
.schematic-shell > .section-heading .schematic-menu-group .chip-menu select {
  min-height: var(--ribbon-action-height);
  height: var(--ribbon-action-height);
  border-radius: var(--ribbon-action-radius);
  border-color: 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);
  box-shadow: var(--ribbon-action-surface-shadow);
  text-shadow: none;
}

.schematic-shell > .section-heading .schema-save-trigger {
  gap: 8px;
  padding-left: 13px;
  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;
  padding-top: 0;
  padding-bottom: 0;
  padding-left: var(--ribbon-action-padding-x);
  padding-right: 30px;
  line-height: 1.1;
  background: var(--ribbon-action-bg);
}

.schematic-shell > .section-heading #hubMenuSelect,
.schematic-shell > .section-heading #agentMenuSelect {
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: currentColor;
  text-decoration-skip-ink: auto;
}

.schematic-shell > .section-heading #schemeLibraryButton .scheme-library-trigger-label {
  position: relative;
  display: inline-block;
  text-decoration: none;
}

.schematic-shell > .section-heading #schemeLibraryButton .scheme-library-trigger-label::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1px;
  height: 1px;
  background: currentColor;
  opacity: 0.72;
  pointer-events: 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: none;
}

.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: none;
}

.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: none;
}

.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: none;
}

.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 > .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 > .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 .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 > .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: 1px solid var(--ribbon-save-icon-chip-border);
  background: var(--ribbon-save-icon-chip-bg);
  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: var(--ribbon-save-icon-chip-bg-hover);
}

.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: none;
}

.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: none;
}

.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: none;
}

@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: 20px;
  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: 18px;
  overflow: hidden;
  isolation: isolate;
  --wall-board-bg:
    linear-gradient(180deg, rgba(36, 43, 54, 0.24) 0%, rgba(12, 16, 22, 0.08) 12%, transparent 13%),
    radial-gradient(circle at 20% 18%, rgba(103, 198, 255, 0.05), transparent 24%),
    radial-gradient(circle at 74% 18%, rgba(255, 196, 93, 0.035), transparent 20%),
    linear-gradient(180deg, rgba(30, 36, 45, 0.99) 0%, rgba(13, 17, 23, 0.995) 100%);
  --wall-board-border: rgba(243, 247, 252, 0.54);
  --wall-board-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 0 0 1px rgba(8, 12, 16, 0.52),
    0 24px 36px rgba(0, 0, 0, 0.32);
  --wall-grid-fine: rgba(222, 232, 244, 0.045);
  --wall-grid-major: rgba(222, 232, 244, 0.12);
  --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-zone-surface-border: rgba(244, 248, 252, 0.72);
  --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.2),
    0 0 0 1px rgba(236, 242, 248, 0.24),
    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.6;
  --wall-link-path-selected-width: 3.3;
  --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(252, 255, 255, 0.72) 0%, rgba(236, 243, 249, 0.42) 12%, transparent 13%),
    radial-gradient(circle at 20% 18%, rgba(69, 138, 186, 0.16), transparent 30%),
    radial-gradient(circle at 74% 18%, rgba(206, 155, 64, 0.12), transparent 26%),
    linear-gradient(180deg, rgba(224, 233, 243, 0.995) 0%, rgba(208, 220, 233, 0.995) 100%);
  --wall-board-border: rgba(103, 123, 147, 0.72);
  --wall-board-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.74),
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    inset 0 0 0 1px rgba(127, 146, 169, 0.24),
    0 22px 34px rgba(24, 39, 55, 0.22);
  --wall-grid-fine: rgba(67, 85, 106, 0.14);
  --wall-grid-major: rgba(67, 85, 106, 0.2);
  --wall-legend-border: rgba(109, 128, 151, 0.45);
  --wall-legend-bg: linear-gradient(180deg, rgba(243, 248, 253, 0.96) 0%, rgba(225, 235, 245, 0.94) 100%);
  --wall-legend-text: rgba(35, 52, 72, 0.9);
  --wall-zone-surface-border: rgba(214, 137, 33, 0.88);
  --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.14),
    0 0 0 1px rgba(255, 188, 96, 0.34),
    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: rgba(47, 67, 89, 0.74);
  --wall-caption-shadow: 0 1px 0 rgba(255, 255, 255, 0.78);
}

.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:
    linear-gradient(var(--wall-grid-fine) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, var(--wall-grid-fine) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(var(--wall-grid-major) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, var(--wall-grid-major) 1px, transparent 1px) 0 0 / 48px 48px;
}

.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: 16px;
  left: 16px;
  right: 16px;
  z-index: 8;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: flex-start;
  gap: 16px;
  pointer-events: none;
}

.schematic-lock-controls {
  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;
  min-width: 38px;
  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: #ffd25f;
  box-shadow: none;
}

.schematic-lock-move-button:hover:not(:disabled),
.schematic-lock-move-button:focus-visible {
  transform: none;
  border-color: rgba(255, 210, 95, 0.34);
  background: rgba(255, 210, 95, 0.12);
  box-shadow: 0 0 0 1px rgba(255, 210, 95, 0.16);
}

.schematic-lock-move-button.is-active {
  border-color: rgba(255, 210, 95, 0.42);
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 233, 157, 0.22), transparent 58%),
    rgba(255, 210, 95, 0.16);
  color: #ffeaa6;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(255, 210, 95, 0.18),
    0 0 14px rgba(255, 210, 95, 0.14);
}

.schematic-lock-move-button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.schematic-lock-move-button-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 19px;
  height: 19px;
}

.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 {
  border-color: rgba(103, 198, 255, 0.36);
  background: rgba(103, 198, 255, 0.16);
  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-legend {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  justify-self: center;
  min-height: var(--board-toolbar-pill-height);
  gap: 18px;
  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.7rem;
  letter-spacing: 0.08em;
  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: 8px;
  white-space: nowrap;
}

.schematic-zoom-controls {
  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-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(103, 198, 255, 0.36);
  background: rgba(103, 198, 255, 0.16);
  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-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: rgba(214, 224, 236, 0.62);
  border-color: rgba(109, 128, 151, 0.34);
}

.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: 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-lock-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-zone {
  position: absolute;
  z-index: 3;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px 16px;
  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-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 {
  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-disabled .zone-title {
  color: rgba(191, 205, 221, 0.78);
}

.schematic-zone.is-disabled .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 {
  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 {
  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;
}

.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-menu-handle,
.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);
  cursor: nwse-resize;
  touch-action: none;
  appearance: none;
}

.zone-resize-handle::before,
.zone-resize-handle::after {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 9px;
  height: 2px;
  border-radius: 999px;
  background: rgba(235, 244, 252, 0.92);
  transform: rotate(-45deg);
}

.zone-resize-handle::before {
  transform: rotate(-45deg) translateY(-3px);
}

.zone-resize-handle::after {
  width: 12px;
  transform: rotate(-45deg) translateY(2px);
}

.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-menu-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  border: 1px solid rgba(104, 132, 164, 0.52);
  background: linear-gradient(180deg, rgba(54, 69, 88, 0.96) 0%, rgba(29, 38, 49, 0.96) 100%);
  color: #cfe0f2;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 1px 4px rgba(0, 0, 0, 0.22);
}

.zone-delete-handle:hover:not(:disabled),
.zone-menu-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-color: rgba(150, 224, 255, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 0 1px rgba(103, 198, 255, 0.2),
    0 2px 6px rgba(0, 0, 0, 0.26);
}

.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;
}

.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.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%);
}

.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: 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: 0.8rem;
  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: auto;
  color: var(--wall-zone-copy-color);
  font-size: 0.78rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.zone-footer {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
  min-width: 0;
  max-width: 100%;
}

.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;
  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 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  padding: 5px 24px 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(94, 118, 148, 0.46);
  background: linear-gradient(180deg, rgba(23, 31, 42, 0.94) 0%, rgba(13, 18, 25, 0.94) 100%);
  color: #a7bdd7;
  font-size: 0.68rem;
  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-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(103, 198, 255, 0.5);
  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(96, 246, 160, 0.46);
  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 {
  border-color: rgba(96, 246, 160, 0.46);
  color: #8df4bc;
}

.zone-agent-pill.pill-state-amber {
  border-color: rgba(255, 196, 93, 0.48);
  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, 104, 122, 0.48);
  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, 104, 122, 0.52);
  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(132, 149, 173, 0.28);
  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(96, 246, 160, 0.46);
  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;
  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;
  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-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: round;
  stroke-linejoin: round;
  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 {
  stroke: var(--wall-link-channel-selected-color);
  stroke-width: var(--wall-link-channel-selected-width);
  filter: none;
}

.chip-link-path.is-selected {
  stroke-width: var(--wall-link-path-selected-width);
  filter: none;
  opacity: 1;
}

.chip-link-arrow.is-selected {
  filter: none;
  stroke-width: calc(var(--wall-link-arrow-edge-width) + 0.12);
}

.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;
}

@media (max-width: 980px) {
  .watcher-hub-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .reasoning-model-status-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); }

.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;
  }

  .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: 9px;
    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;
  }

  .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: 9px;
    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 zoom"
      "legend legend";
    gap: 12px;
    align-items: flex-start;
  }
  .schematic-lock-controls {
    grid-area: lock;
    gap: 6px;
    padding: 4px 8px;
  }
  .schematic-lock-button {
    min-width: 66px;
    height: 28px;
    padding: 0 10px;
  }
  .schematic-lock-move-button {
    min-width: 34px;
    height: 28px;
    padding: 0 8px;
  }
  .schematic-legend {
    grid-area: legend;
    justify-self: center;
    gap: 12px;
    max-width: calc(100% - 24px);
    padding: 7px 12px;
    font-size: 0.64rem;
  }
  .schematic-zoom-controls {
    grid-area: zoom;
    justify-self: end;
    gap: 6px;
    padding: 4px 7px;
  }
  .schematic-zoom-button {
    min-width: 42px;
    height: 28px;
    padding: 0 8px;
  }
  .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; }
}
