/* Nexus operating-model embed — scoped to the compound visual */

.compound-visual {
  --scan: #cafa68;
  --cat-person: #f0c9a0;
  --cat-skill: #cafa68;
  --cat-workflow: #86a374;
  --cat-decision: #e88850;
  --cat-conversation: #c45a28;
  --cat-app: #8fb83a;
  --cat-hub: #e8ff6a;
}

.nexusdemo-canvas-wrap {
  position: absolute;
  inset: 0;
  background: #000000;
  cursor: grab;
  overflow: hidden;
}

.nexusdemo-canvas-wrap[data-nexus-tour] {
  cursor: default;
  pointer-events: none;
}

.nexusdemo-canvas-wrap.is-dragging {
  cursor: grabbing;
}

.nexusdemo-canvas-wrap.is-dragging .nexusdemo-mark:not(.is-dim),
.nexusdemo-canvas-wrap.is-inspect .nexusdemo-mark:not(.is-dim) {
  opacity: 1 !important;
  filter: none !important;
}

.nexusdemo-canvas-wrap.is-holding .nexusdemo-mark__box {
  background: color-mix(in srgb, var(--mark, #cafa68) 22%, rgba(0, 0, 0, 0.55));
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--mark, #cafa68) 45%, transparent),
    0 0 18px color-mix(in srgb, var(--mark, #cafa68) 28%, transparent);
}

.nexusdemo-canvas-wrap.is-dragging:not(.is-holding) .nexusdemo-mark__box,
.nexusdemo-canvas-wrap.is-inspect .nexusdemo-mark__box {
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--mark, #f1f3ee) 55%, transparent),
    0 0 22px color-mix(in srgb, var(--mark, #f1f3ee) 40%, transparent);
}

.nexusdemo-mark.is-shaded .nexusdemo-mark__label {
  opacity: 0.85;
}

.nexusdemo-canvas-wrap.is-dragging .nexusdemo-mark__frame,
.nexusdemo-canvas-wrap.is-inspect .nexusdemo-mark:hover .nexusdemo-mark__frame,
.nexusdemo-canvas-wrap.is-inspect .nexusdemo-mark.is-hot .nexusdemo-mark__frame {
  opacity: 1;
}

.nexusdemo-canvas-wrap.is-dragging .nexusdemo-mark__label,
.nexusdemo-canvas-wrap.is-inspect .nexusdemo-mark.is-hot .nexusdemo-mark__label {
  opacity: 1;
  color: #f1f3ee;
}

.nexusdemo-canvas-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
  transition: filter 0.25s ease;
}

.nexusdemo-canvas-wrap.is-dragging canvas,
.nexusdemo-canvas-wrap.is-inspect canvas {
  filter: brightness(0.72) contrast(1.08);
}

.nexusdemo-hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.nexusdemo-mark {
  position: absolute;
  display: block;
  width: var(--size, 18px);
  height: var(--size, 18px);
  line-height: 0;
  overflow: visible;
  transform: translate(-50%, -50%);
  pointer-events: none;
  cursor: default;
  will-change: transform, opacity, filter;
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  color: inherit;
  font: inherit;
}

.nexusdemo-mark__box {
  position: relative;
  width: var(--size, 18px);
  height: var(--size, 18px);
  border: 1px solid var(--mark, rgba(241, 243, 238, 0.85));
  background: rgba(0, 0, 0, 0.35);
  box-shadow: 0 0 12px color-mix(in srgb, var(--mark, #f1f3ee) 22%, transparent);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.nexusdemo-mark__core {
  position: absolute;
  inset: 50%;
  width: var(--core, 5px);
  height: var(--core, 5px);
  transform: translate(-50%, -50%);
  background: var(--mark, #f1f3ee);
  box-shadow: 0 0 8px color-mix(in srgb, var(--mark, #f1f3ee) 50%, transparent);
}

.nexusdemo-mark__frame {
  position: absolute;
  inset: -6px;
  border: 1px solid var(--mark, rgba(202, 250, 104, 0.55));
  opacity: 0;
  transition: opacity 0.2s ease;
}

.nexusdemo-mark__frame--outer {
  inset: -11px;
  border-color: color-mix(in srgb, var(--mark, #f1f3ee) 35%, transparent);
}

.nexusdemo-mark.is-focus .nexusdemo-mark__frame,
.nexusdemo-mark.is-hot .nexusdemo-mark__frame,
.nexusdemo-mark:hover .nexusdemo-mark__frame {
  opacity: 1;
}

.nexusdemo-mark.is-focus .nexusdemo-mark__box,
.nexusdemo-mark.is-hot .nexusdemo-mark__box,
.nexusdemo-mark:hover .nexusdemo-mark__box {
  border-color: var(--mark, var(--scan));
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--mark, var(--scan)) 70%, transparent),
    0 0 28px color-mix(in srgb, var(--mark, var(--scan)) 55%, transparent);
}

.nexusdemo-mark.is-dim {
  opacity: 0.22 !important;
  filter: blur(0.6px);
  pointer-events: none;
}

.nexusdemo-mark.is-hot {
  z-index: 40 !important;
}

.nexusdemo-mark__label {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-family: "SF Mono", "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
  font-size: 9px;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--mark, #f1f3ee) 75%, #f1f3ee);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9);
}

.nexusdemo-mark.is-focus .nexusdemo-mark__label,
.nexusdemo-mark.is-hot .nexusdemo-mark__label,
.nexusdemo-mark:hover .nexusdemo-mark__label,
.nexusdemo-mark.is-label .nexusdemo-mark__label,
.nexusdemo-canvas-wrap.is-zoomed .nexusdemo-mark.is-primary:not(.is-dim) .nexusdemo-mark__label,
.nexusdemo-canvas-wrap.is-filtered .nexusdemo-mark.is-primary:not(.is-dim) .nexusdemo-mark__label {
  opacity: 1;
  color: #f1f3ee;
}

.nexusdemo-canvas-wrap.is-filtered .nexusdemo-mark.is-cat .nexusdemo-mark__core {
  transform: translate(-50%, -50%) scale(1.35);
  box-shadow: 0 0 14px color-mix(in srgb, var(--mark) 70%, transparent);
}

.nexusdemo-canvas-wrap.is-filtered .nexusdemo-mark.is-cat .nexusdemo-mark__box {
  border-color: var(--mark);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--mark) 45%, transparent),
    0 0 20px color-mix(in srgb, var(--mark) 30%, transparent);
}

.nexusdemo-canvas-wrap.is-filtered .nexusdemo-mark.is-cat .nexusdemo-mark__frame {
  opacity: 1;
  border-color: var(--mark);
}

.nexusdemo-canvas-wrap.is-zoomed .nexusdemo-mark:not(.is-dim) {
  opacity: 1 !important;
}

.nexusdemo-canvas-wrap[data-nexus-embed] .nexusdemo-mark[data-type="hub"] .nexusdemo-mark__label,
.nexusdemo-canvas-wrap[data-nexus-embed] .nexusdemo-mark[data-type="workflow"] .nexusdemo-mark__label,
.nexusdemo-canvas-wrap[data-nexus-embed] .nexusdemo-mark[data-signal="key"] .nexusdemo-mark__label,
.nexusdemo-canvas-wrap[data-nexus-tour] .nexusdemo-mark[data-type="hub"] .nexusdemo-mark__label,
.nexusdemo-canvas-wrap[data-nexus-tour] .nexusdemo-mark[data-type="workflow"] .nexusdemo-mark__label,
.nexusdemo-canvas-wrap[data-nexus-tour] .nexusdemo-mark[data-signal="key"] .nexusdemo-mark__label {
  opacity: 0.9;
  color: #f1f3ee;
}

.nexusdemo-canvas-wrap[data-nexus-tour].is-tour-wide .nexusdemo-mark[data-type="hub"] .nexusdemo-mark__label,
.nexusdemo-canvas-wrap[data-nexus-tour].is-tour-wide .nexusdemo-mark[data-type="workflow"] .nexusdemo-mark__label,
.nexusdemo-canvas-wrap[data-nexus-tour].is-tour-wide .nexusdemo-mark[data-signal="key"] .nexusdemo-mark__label {
  opacity: 0.9 !important;
  visibility: visible !important;
}

.nexusdemo-mark__signal {
  display: none;
  position: absolute;
  top: -3px;
  right: -3px;
  width: 7px;
  height: 7px;
  pointer-events: none;
}

.nexusdemo-mark[data-signal] .nexusdemo-mark__signal {
  display: block;
}

.nexusdemo-mark[data-signal="key"] .nexusdemo-mark__signal {
  background: var(--mark, var(--scan));
  box-shadow: 0 0 8px color-mix(in srgb, var(--mark, var(--scan)) 55%, transparent);
}

.nexusdemo-mark[data-signal="link"] .nexusdemo-mark__signal {
  background: transparent;
  border-top: 1.5px solid var(--mark, var(--scan));
  border-right: 1.5px solid var(--mark, var(--scan));
  width: 8px;
  height: 8px;
}

.nexusdemo-kb {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
  will-change: transform, opacity;
}

.nexusdemo-kb__tag {
  display: inline-block;
  padding: 2px 6px;
  border: 1px solid color-mix(in srgb, var(--kb, #cafa68) 55%, transparent);
  background: rgba(0, 0, 0, 0.55);
  font-family: "SF Mono", "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
  font-size: 9px;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--kb, #cafa68) 85%, #f1f3ee);
  white-space: nowrap;
}

.nexusdemo-kb[data-type="person"] { --kb: var(--cat-person); }
.nexusdemo-kb[data-type="skill"] { --kb: var(--cat-skill); }
.nexusdemo-kb[data-type="workflow"] { --kb: var(--cat-workflow); }
.nexusdemo-kb[data-type="decision"] { --kb: var(--cat-decision); }
.nexusdemo-kb[data-type="conversation"] { --kb: var(--cat-conversation); }
.nexusdemo-kb[data-type="app"] { --kb: var(--cat-app); }

.nexusdemo-kb.is-active,
.nexusdemo-kb.is-hold {
  opacity: 1;
}

.nexusdemo-kb.is-dim {
  opacity: 0.12;
}

.nexusdemo-canvas-wrap.is-tour-wide .nexusdemo-mark__label,
.nexusdemo-canvas-wrap.is-tour-wide .nexusdemo-kb {
  opacity: 0 !important;
  visibility: hidden !important;
}

.nexusdemo-mark[data-type="person"] { --mark: var(--cat-person); }
.nexusdemo-mark[data-type="skill"] { --mark: var(--cat-skill); }
.nexusdemo-mark[data-type="workflow"] { --mark: var(--cat-workflow); }
.nexusdemo-mark[data-type="decision"] { --mark: var(--cat-decision); }
.nexusdemo-mark[data-type="conversation"] { --mark: var(--cat-conversation); }
.nexusdemo-mark[data-type="app"] { --mark: var(--cat-app); }
.nexusdemo-mark[data-type="hub"] { --mark: var(--cat-hub); }

.nexusdemo-mark[data-type="hub"] .nexusdemo-mark__box {
  width: 26px;
  height: 26px;
}

.nexusdemo-mark[data-type="hub"] .nexusdemo-mark__core {
  width: 8px;
  height: 8px;
  box-shadow: 0 0 16px color-mix(in srgb, var(--cat-hub) 70%, transparent);
}

@media (max-width: 900px) {
  .nexusdemo-mark__label {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nexusdemo-canvas-wrap canvas,
  .nexusdemo-mark,
  .nexusdemo-kb,
  .nexusdemo-mark__box,
  .nexusdemo-mark__frame,
  .nexusdemo-mark__label {
    transition: none !important;
  }
}
