.docs-page .mcp-gateway-modes {
  container-type: inline-size;
  margin: 28px 0 36px;
  padding: clamp(12px, 2vw, 24px);
  border: 1px solid var(--di-outline);
  border-radius: var(--beams-radius-panel);
  background: var(--di-canvas);
  color: var(--di-text);
}
.mcp-gateway-modes .mg-scene {
  --mg-route-width: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--mg-route-width) minmax(0, 1fr) var(
      --mg-route-width
    ) minmax(0, 1.85fr);
  align-items: center;
  font: 400 13px/1.4 var(--beams-font-body);
}
.mcp-gateway-modes .mg-node {
  text-align: center;
}
.mcp-gateway-modes .mg-node strong,
.mcp-gateway-modes .mg-endpoint strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
}
.mcp-gateway-modes .mg-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  margin-top: 6px;
}
.mcp-gateway-modes :is(.mg-badge, .mg-tags span) {
  padding: 2px 5px;
  border: 1px solid var(--di-boundary);
  border-radius: var(--beams-radius-button);
  color: var(--di-muted);
  font: 400 12px/1.4 var(--beams-font-mono);
}
.mcp-gateway-modes .mg-clients {
  display: grid;
  align-items: end;
}
.mcp-gateway-modes .mg-client {
  grid-area: 1 / 1;
}
.mcp-gateway-modes .mg-beam {
  visibility: hidden;
  animation: mg-beam 1000ms linear both;
}
.mcp-gateway-modes .mg-standalone {
  animation: mg-standalone 1000ms linear both;
}
@keyframes mg-beam {
  0% {
    opacity: 1;
    visibility: visible;
  }
  48% {
    opacity: 0;
    visibility: visible;
  }
  50%,
  100% {
    opacity: 0;
    visibility: hidden;
  }
}
@keyframes mg-standalone {
  0%,
  50% {
    opacity: 0;
    visibility: hidden;
  }
  52% {
    opacity: 0;
    visibility: visible;
  }
  100% {
    opacity: 1;
    visibility: visible;
  }
}
.mcp-gateway-modes .mg-delegation {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: max-content;
  max-width: 100%;
  margin: auto;
}
.mcp-gateway-modes .mg-person {
  position: relative;
  width: 12px;
  height: 14px;
  border-bottom: 5px solid var(--di-edge);
  border-radius: 50%;
}
.mcp-gateway-modes .mg-person::before {
  content: "";
  position: absolute;
  top: 0;
  left: 3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--di-edge);
}
.mcp-gateway-modes .mg-handoff {
  position: relative;
  flex-basis: 100%;
  height: 14px;
  background: linear-gradient(var(--di-route), var(--di-route)) center / 1px 100% no-repeat;
}
.mcp-gateway-modes .mg-art {
  --mg-width: 64px;
  --mg-rise: 18.475px;
  --mg-depth: 22px;
  --mg-grid: 58px;
  --mg-top-offset: 0px;
  position: relative;
  isolation: isolate;
  width: calc(var(--mg-grid) * 1.415);
  height: calc(var(--mg-top-offset) + 2 * var(--mg-rise) + var(--mg-depth) + 8px);
  margin: 0 auto 5px;
}
.mcp-gateway-modes .mg-floor {
  position: absolute;
  width: var(--mg-grid);
  height: var(--mg-grid);
  top: calc(var(--mg-top-offset) + var(--mg-rise) + var(--mg-depth) - var(--mg-grid) / 2);
  left: calc(50% - var(--mg-grid) / 2);
  transform: rotateX(54.7356deg) rotateZ(45deg);
  border: 1px solid var(--docs-illustration-grid-edge);
  background-image:
    linear-gradient(var(--docs-illustration-grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--docs-illustration-grid-line) 1px, transparent 1px);
  background-size: 25% 25%;
}
.mcp-gateway-modes .mg-solid {
  position: absolute;
  top: var(--mg-top-offset);
  left: calc(50% - var(--mg-width) / 2);
  width: var(--mg-width);
  height: calc(2 * var(--mg-rise) + var(--mg-depth));
}
.mcp-gateway-modes .mg-solid i {
  position: absolute;
  inset: 0;
  background: var(--di-edge);
}
.mcp-gateway-modes .mg-solid i::before {
  content: "";
  position: absolute;
  inset: 1px;
  background: var(--mg-face);
  clip-path: inherit;
}
.mcp-gateway-modes .mg-top {
  --mg-face: var(--di-runtime-top);
  clip-path: polygon(50% 0, 100% var(--mg-rise), 50% calc(2 * var(--mg-rise)), 0 var(--mg-rise));
}
.mcp-gateway-modes .mg-left {
  --mg-face: var(--di-runtime-left);
  clip-path: polygon(
    0 var(--mg-rise),
    50% calc(2 * var(--mg-rise)),
    50% 100%,
    0 calc(100% - var(--mg-rise))
  );
}
.mcp-gateway-modes .mg-right {
  --mg-face: var(--di-runtime-right);
  clip-path: polygon(
    50% calc(2 * var(--mg-rise)),
    100% var(--mg-rise),
    100% calc(100% - var(--mg-rise)),
    50% 100%
  );
}
.mcp-gateway-modes .mg-computer {
  --mg-top-offset: 20px;
  --mg-depth: 5px;
}
.mcp-gateway-modes .mg-screen {
  position: absolute;
  top: 0;
  left: calc(50% - 31px);
  width: 31px;
  height: 27px;
  border: 2px solid var(--di-edge);
  background: var(--di-runtime-left);
  transform: skewY(30deg);
  transform-origin: top left;
}
.mcp-gateway-modes .mg-ingress,
.mcp-gateway-modes .mg-egress {
  position: relative;
  border-top: 1px solid var(--di-route);
}
.mcp-gateway-modes .mg-ingress::after,
.mcp-gateway-modes .mg-branch::after,
.mcp-gateway-modes .mg-handoff::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  border: solid var(--di-arrow);
  border-width: 1px 1px 0 0;
  transform: rotate(45deg);
}
.mcp-gateway-modes .mg-ingress::after {
  right: 2px;
  top: -4px;
}
.mcp-gateway-modes .mg-handoff::after {
  bottom: 1px;
  left: calc(50% - 3px);
  transform: rotate(135deg);
}
.mcp-gateway-modes .mg-destinations {
  --mg-branch-width: 24px;
  --mg-frame-gap: 8px;
  display: grid;
  grid-template-rows: repeat(3, 1fr);
}
.mcp-gateway-modes .mg-infrastructure {
  position: relative;
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 2;
}
.mcp-gateway-modes .mg-infrastructure::before {
  content: "";
  position: absolute;
  inset: 0 0 0 calc(var(--mg-branch-width) - var(--mg-frame-gap));
  border: 1px solid var(--di-boundary);
  border-radius: var(--beams-radius-panel);
  pointer-events: none;
}
.mcp-gateway-modes .mg-infrastructure-label {
  position: absolute;
  top: 5px;
  left: calc(var(--mg-branch-width) + 4px);
  color: var(--di-muted);
  font: 400 12px/1.4 var(--beams-font-mono);
}
.mcp-gateway-modes .mg-destination {
  display: grid;
  grid-template-columns: var(--mg-branch-width) minmax(0, 1fr);
}
.mcp-gateway-modes .mg-endpoint {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 16px 8px 16px 4px;
}
.mcp-gateway-modes .mg-destination:first-of-type .mg-endpoint {
  padding-top: 26px;
  padding-bottom: 26px;
}
.mcp-gateway-modes .mg-endpoint .mg-art {
  --mg-width: 36px;
  --mg-rise: 10.392px;
  --mg-depth: 12px;
  --mg-grid: 33px;
  flex: none;
  margin: 0;
}
.mcp-gateway-modes .mg-endpoint span:not(.mg-floor, .mg-solid) {
  color: var(--di-muted);
}
.mcp-gateway-modes .mg-endpoint .mg-badge {
  display: inline-block;
  margin-top: 3px;
}
.mcp-gateway-modes .mg-branch {
  position: relative;
  background: linear-gradient(var(--di-route), var(--di-route)) left center / 100% 1px no-repeat;
}
.mcp-gateway-modes .mg-branch::before {
  content: "";
  position: absolute;
  inset: 0;
  border-left: 1px solid var(--di-route);
}
.mcp-gateway-modes .mg-infrastructure .mg-destination:first-of-type .mg-branch::before {
  top: 50%;
}
.mcp-gateway-modes .mg-hosted .mg-branch::before {
  bottom: 50%;
}
.mcp-gateway-modes .mg-branch::after {
  right: 1px;
  top: calc(50% - 3px);
}
@container (max-width: 585px) {
  .mcp-gateway-modes .mg-scene {
    grid-template-columns: minmax(0, 1fr);
  }
  .mcp-gateway-modes .mg-ingress {
    justify-self: center;
    height: 24px;
    margin: 6px 0;
    border-top: 0;
    border-left: 1px solid var(--di-route);
  }
  .mcp-gateway-modes .mg-ingress::after {
    inset: auto auto 1px -4px;
    transform: rotate(135deg);
  }
  .mcp-gateway-modes .mg-egress {
    width: 50%;
    height: 18px;
    margin-top: 6px;
    border: solid var(--di-route);
    border-width: 0 1px 1px 0;
  }
  .mcp-gateway-modes .mg-infrastructure .mg-destination:first-of-type .mg-branch::before {
    top: 0;
  }
}
@media (forced-colors: active) {
  .mcp-gateway-modes :is(.mg-art, .mg-branch, .mg-handoff, .mg-person) {
    forced-color-adjust: none;
  }
  .docs-page .mcp-gateway-modes {
    --di-route: CanvasText;
    --di-arrow: CanvasText;
    --di-edge: CanvasText;
    --di-runtime-top: Canvas;
    --di-runtime-left: Canvas;
    --di-runtime-right: Canvas;
    --docs-illustration-grid-line: GrayText;
    --docs-illustration-grid-edge: GrayText;
  }
}
