/* Final desktop alignment polish for the Discovery & source recovery map.
   Keep one shared visual surface, center lane labels over their entry cards,
   make Social recovery visibly fork into its two source routes, and use one
   consistent solid flow color so connected collector segments do not brighten
   where separate DOM elements meet. */
.automation-value-chain-v5{
  --v5-flow-line:#3d8b65;
  margin-left:auto;
  margin-right:auto;
}

/* The current recovery label adds noise while the arrow itself already shows the flow.
   Keep the paused explanation available when Social recovery is actually off. */
.v5-social-path:not(.is-blocked)>.v5-down-arrow small{display:none}

/* The arrow remains, but the redundant architecture caption below Moment does not. */
.automation-value-chain-v5>.v4-down small{display:none}

/* Review & intelligence should read as an actual flow, not isolated cards. */
.v4-intel .v4-route-card{position:relative;overflow:visible}
.v4-intel .v4-route-card:before,
.v4-intel .v4-route-card:after{content:'';position:absolute;top:50%;height:2px;transform:translateY(-50%);z-index:2}
.v4-intel .v4-route-card:before{left:-11px;width:11px;background:var(--v5-flow-line)}
.v4-intel .v4-route-card:before{box-shadow:none}
.v4-intel .v4-route-card.admit:before,
.v4-intel .v4-route-card.all:before{background:var(--v5-flow-line)}
.v4-intel .v4-route-card.defer:before{background:#a77d39}
.v4-intel.targeted .v4-route-card.admit:after,
.v4-intel.paused .v4-route-card.all:after{right:-11px;width:11px;background:var(--v5-flow-line)}
.v4-intel.targeted .v4-route-card.defer:after,
.v4-intel.full .v4-route-card.all:after{right:-11px;width:11px;background:#a77d39}

/* Add a second directional cue on the long final connectors. */
.v4-direct-arrow>span:before,
.v4-ai-arrow>span:before{content:'';position:absolute;left:50%;top:50%;width:7px;height:7px;border-top:2px solid currentColor;border-right:2px solid currentColor;transform:translate(-50%,-50%) rotate(45deg)}
.v4-direct-arrow>span{color:var(--good)}
.v4-ai-arrow>span{color:#ffc66d}

@media (min-width:1251px){
  .v5-live-path{border-right:0!important}

  .v5-live-path>.v5-path-label,
  .v5-social-path>.v5-path-label{
    width:320px;
    margin-left:auto;
    margin-right:auto;
    text-align:center;
    align-self:center;
  }

  /* Social recovery is the common gateway. Draw a real fork from its center
     into the two source-specific routes instead of using a decorative caption line. */
  .v5-route-caption{
    position:relative!important;
    display:block!important;
    width:100%!important;
    height:52px!important;
    margin:0!important;
    align-self:stretch!important;
  }
  .v5-route-caption:before{
    content:'';
    position:absolute;
    left:50%;
    top:0;
    width:2px;
    height:22px;
    transform:translateX(-1px);
    background:var(--v5-flow-line);
  }
  .v5-route-caption:after{
    content:'';
    position:absolute;
    left:25%;
    right:25%;
    top:21px;
    height:2px;
    background:var(--v5-flow-line);
  }
  .v5-route-caption>span{
    position:absolute!important;
    top:21px!important;
    width:2px!important;
    height:31px!important;
    background:var(--v5-flow-line)!important;
  }
  .v5-route-caption>span:first-child{left:25%!important}
  .v5-route-caption>span:last-child{left:75%!important}
  .v5-route-caption>strong{
    position:absolute;
    left:50%;
    top:21px;
    z-index:2;
    transform:translate(-50%,-50%);
    padding:0 10px;
    background:#0d1216;
  }
  .v5-route-caption.blocked:before,
  .v5-route-caption.blocked:after,
  .v5-route-caption.blocked>span{background:#293238!important}

  /* Use the exact same solid color for every active collector segment. A tiny
     2px overlap guarantees continuity without the brighter alpha-stacking seam. */
  .v5-live-path>.v5-down-arrow>span,
  .v5-source-route.active>.v5-down-arrow>span,
  .v5-converge .live,
  .v5-converge .social-left,
  .v5-converge .social-right,
  .v5-converge .bar,
  .v5-converge .down{
    background:var(--v5-flow-line)!important;
  }

  .v5-converge .live,
  .v5-converge .social-left,
  .v5-converge .social-right{
    top:-2px!important;
    width:2px!important;
    height:26px!important;
    transform:translateX(-1px)!important;
  }

  .v5-converge .bar{
    top:23px!important;
    height:2px!important;
  }

  /* The shared drop belongs to the common Moment object, so keep it exactly
     on the horizontal center of the centered Moment card. */
  .v5-converge .down{
    left:50%!important;
    top:23px!important;
    width:2px!important;
    transform:translateX(-1px)!important;
  }

  .v5-converge.social-blocked .social-left,
  .v5-converge.social-blocked .social-right,
  .v5-discovery-section:has(.v5-source-route.piecewise.blocked) .v5-converge .social-right{
    background:#293238!important;
  }
}
