.topology-map .cable-map-head { flex-wrap: wrap; }
.topology-head-side { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 9px; }
.topology-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid #3f5b56;
  border-radius: 999px;
  background: #1b2f31;
  color: #b8cfc8;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.topology-toggle input { margin: 0; accent-color: #a9ed76; }
.topology-save-state { min-width: 0; color: #8fb1a5; font-size: 11px; font-weight: 700; }
.topology-save-state:empty { display: none; }
.topology-scroll { height: clamp(520px, calc(100vh - 330px), 900px); max-height: none; cursor: grab; overscroll-behavior: contain; user-select: none; -webkit-user-select: none; }
.topology-scroll.is-panning, .topology-scroll.is-panning * { cursor: grabbing; }
.topology-head-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 33px;
  padding: 0 12px;
  border: 1px solid #3f5b56;
  border-radius: 999px;
  background: #1b2f31;
  color: #cfe5dc;
  font: inherit;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}
.topology-head-button:hover, .topology-head-button:focus-visible { border-color: #779c7b; background: #29423b; color: #e6f7ea; outline: none; }
body.topology-fullscreen { overflow: hidden; }
.topology-map.is-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  margin: 0;
  border: 0;
  border-radius: 0;
}
.topology-map.is-fullscreen .cable-map-head { flex: none; padding: 12px 20px; }
.topology-map.is-fullscreen .cable-map-head h2 { font-size: 20px; }
.topology-map.is-fullscreen .cable-map-head p:not(.eyebrow) { display: none; }
.topology-map.is-fullscreen .topology-scroll { flex: 1; height: auto; min-height: 0; border-bottom: 0; }
.topology-map.is-fullscreen .cable-map-bottom {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 7;
  width: min(380px, calc(100% - 36px));
  grid-template-columns: 1fr;
  padding: 0;
  pointer-events: none;
}
.topology-map.is-fullscreen .cable-map-detail { box-shadow: 0 18px 40px #000b; pointer-events: auto; }
.topology-map.is-fullscreen .cable-map-index,
.topology-map.is-fullscreen .topology-hint,
.topology-map.is-fullscreen .cable-map-caption { display: none; }
.topology-scroll { display: grid; }
.topology-zoom { position: relative; margin: auto; }
.topology-canvas { transform-origin: 0 0; }
.topology-zoom-controls {
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid #3f5b56;
  border-radius: 999px;
  background: #1b2f31;
}
.topology-zoom-controls button {
  min-width: 32px;
  height: 31px;
  padding: 0 10px;
  border: 0;
  border-left: 1px solid #3f5b56;
  background: transparent;
  color: #cfe5dc;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.topology-zoom-controls button:first-child { border-left: 0; font-size: 15px; }
.topology-zoom-controls button:nth-child(3) { font-size: 15px; }
.topology-zoom-controls button:hover:not(:disabled), .topology-zoom-controls button:focus-visible { background: #29423b; color: #e6f7ea; outline: none; }
.topology-zoom-controls button:disabled { color: #5d7672; cursor: default; }
.topology-zoom-level { min-width: 52px !important; font-variant-numeric: tabular-nums; }
.topology-lines { width: auto; height: auto; }
.cable-map-wire.is-idle { opacity: .82; stroke-width: 3; }
.topology-map .cable-map-wire.is-selected { filter: url(#topology-glow); }
.topology-node {
  height: 110px;
  min-height: 0;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.topology-node.is-dragging {
  z-index: 6;
  border-color: #a8df92;
  box-shadow: 0 0 0 2px #a9ed7633, 0 20px 36px #000a;
  cursor: grabbing;
}
body.topology-dragging, body.topology-dragging * { cursor: grabbing !important; user-select: none; }
body.topology-dragging .cable-map-wire { transition: none; }
.topology-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin: 15px 0 14px; }
.topology-facts > div { min-width: 0; padding: 8px 10px; border: 1px solid #3d5853; border-radius: 8px; background: #213738; }
.topology-facts dt { color: #91aba1; font-size: 9px; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.topology-facts dd { overflow: hidden; margin: 4px 0 0; color: #e4f4e9; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.topology-hint .cable-map-notes { margin: 14px 0 0; }
.topology-no-links { margin: 4px 0; color: #8ba9a1; font-size: 11px; }
@media (max-width: 800px) {
  .topology-head-side { justify-content: flex-start; }
  .topology-scroll { height: 520px; }
}
