ol.organizational-chart,
ul.organizational-chart,
ol.organizational-chart ol,
ul.organizational-chart ol,
ol.organizational-chart li,
ul.organizational-chart li,
ul.organizational-chart li>div,
ol.organizational-chart li>div {
    position: relative;
}

ol.organizational-chart,
ol.organizational-chart ol,
ul.organizational-chart,
ul.organizational-chart ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

ol.organizational-chart {
    text-align: center;
}

ol.organizational-chart ol {
    padding-top: 1em;
}

ol.organizational-chart ol:before,
ol.organizational-chart ol:after,
ol.organizational-chart li:before,
ol.organizational-chart li:after,
ol.organizational-chart>li>div:before,
ol.organizational-chart>li>div:after {
    background-color: red;
    content: '';
    position: absolute;
}

ol.organizational-chart ol>li {
    padding: 1em 0 0 1em;
    color: white;
    font-size: 19px;
    font-family: "MinionPro", serif;
}

ol.organizational-chart>li ol:before {
    height: 1em;
    left: 50%;
    top: 0;
    width: 3px;
}

ol.organizational-chart>li ol:after {
    height: 3px;
    left: 3px;
    top: 1em;
    width: 50%;
}

ol.organizational-chart>li ol>li:not(:last-of-type):before {
    height: 3px;
    left: 0;
    background: red;
    top: 2em;
    width: 1em;
}

ol.organizational-chart>li ol>li:not(:last-of-type):after {
    height: 100%;
    left: 0;
    top: 0;
    width: 3px;
}

ol.organizational-chart>li ol>li:last-of-type:before {
    height: 3px;
    left: 0;
    top: 2em;
    width: 1em;
}

ol.organizational-chart>li ol>li:last-of-type:after {
    height: 2em;
    left: 0;
    top: 0;
    width: 3px;
}

ol.organizational-chart li>div {
    background-color: #fff;
    border-radius: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: Black;
    font-size: 23px;
    font-family: Franklin Gothic Medium;
    min-height: 2em;
    padding: 0.5em;
}


/*** PRIMARY ***/

ol.organizational-chart>li>div {
    background-color: #a2ed56;
    color: Black;
    font-size: 23px;
    font-family: Franklin Gothic Medium;
    margin-right: 1em;
}

ol.organizational-chart>li>div:before {
    bottom: 2em;
    height: 3px;
    right: -1em;
    width: 1em;
}

ol.organizational-chart>li>div:first-of-type:after {
    bottom: 0;
    height: 2em;
    right: -1em;
    width: 3px;
}

ol.organizational-chart>li>div+div {
    margin-top: 1em;
}

ol.organizational-chart>li>div+div:after {
    height: calc(100% + 1em);
    right: -1em;
    top: -1em;
    width: 3px;
}


/*** SECONDARY ***/

ol.organizational-chart>li>ol:before {
    left: inherit;
    right: 0;
}

ol.organizational-chart>li>ol:after {
    left: 0;
    width: 100%;
}

ol.organizational-chart>li>ol>li>div {
    background-color: #83e4e2;
    color: Black;
    font-size: 23px;
    font-family: Franklin Gothic Medium;
}


/*** TERTIARY ***/

ol.organizational-chart>li>ol>li>ol>li>div {
    background-color: #fd6470;
    color: Black;
    font-size: 23px;
    font-family: Franklin Gothic Medium;
}


/*** QUATERNARY ***/

ol.organizational-chart>li>ol>li>ol>li>ol>li>div {
    background-color: #fca858;
    color: Black;
    font-size: 23px;
    font-family: Franklin Gothic Medium;
}


/*** QUINARY ***/

ol.organizational-chart>li>ol>li>ol>li>ol>li>ol>li>div {
    background-color: #fddc32;
}

ol.organizational-chart>li>ol>li>ol>li>ol>li>ol>li>ol>li>div {
    background-color: #006cf0;
}

@media only screen and ( min-width: 64em) {
    ol.organizational-chart {
        margin-left: -1em;
        margin-right: -1em;
    }
    /* PRIMARY */
    ol.organizational-chart>li>div {
        display: inline-block;
        float: none;
        margin: 0 1em 1em 1em;
        vertical-align: bottom;
    }
    ol.organizational-chart>li>div:only-of-type {
        margin-bottom: 0;
        width: calc((100% / 1) - 2em - 4px);
    }
    ol.organizational-chart>li>div:first-of-type:nth-last-of-type(2),
    ol.organizational-chart>li>div:first-of-type:nth-last-of-type(2)~div {
        width: calc((100% / 2) - 2em - 4px);
    }
    ol.organizational-chart>li>div:first-of-type:nth-last-of-type(3),
    ol.organizational-chart>li>div:first-of-type:nth-last-of-type(3)~div {
        width: calc((100% / 3) - 2em - 4px);
    }
    ol.organizational-chart>li>div:first-of-type:nth-last-of-type(4),
    ol.organizational-chart>li>div:first-of-type:nth-last-of-type(4)~div {
        width: calc((100% / 4) - 2em - 4px);
    }
    ol.organizational-chart>li>div:first-of-type:nth-last-of-type(5),
    ol.organizational-chart>li>div:first-of-type:nth-last-of-type(5)~div {
        width: calc((100% / 5) - 2em - 4px);
    }
    ol.organizational-chart>li>div:before,
    ol.organizational-chart>li>div:after {
        bottom: -1em!important;
        top: inherit!important;
    }
    ol.organizational-chart>li>div:before {
        height: 1em!important;
        left: 50%!important;
        width: 3px!important;
    }
    ol.organizational-chart>li>div:only-of-type:after {
        display: none;
    }
    ol.organizational-chart>li>div:first-of-type:not(:only-of-type):after,
    ol.organizational-chart>li>div:last-of-type:not(:only-of-type):after {
        bottom: -1em;
        height: 3px;
        width: calc(50% + 1em + 3px);
    }
    ol.organizational-chart>li>div:first-of-type:not(:only-of-type):after {
        left: calc(50% + 3px);
    }
    ol.organizational-chart>li>div:last-of-type:not(:only-of-type):after {
        left: calc(-1em - 3px);
    }
    ol.organizational-chart>li>div+div:not(:last-of-type):after {
        height: 3px;
        left: -2em;
        width: calc(100% + 4em);
    }
    /* SECONDARY */
    ol.organizational-chart>li>ol {
        display: flex;
        flex-wrap: nowrap;
    }
    ol.organizational-chart>li>ol:before,
    ol.organizational-chart>li>ol>li:before {
        height: 1em!important;
        left: 50%!important;
        top: 0!important;
        width: 3px!important;
    }
    ol.organizational-chart>li>ol:after {
        display: none;
    }
    ol.organizational-chart>li>ol>li {
        flex-grow: 1;
        padding-left: 1em;
        padding-right: 1em;
        padding-top: 1em;
    }
    ol.organizational-chart>li>ol>li:only-of-type {
        padding-top: 0;
    }
    ol.organizational-chart>li>ol>li:only-of-type:before,
    ol.organizational-chart>li>ol>li:only-of-type:after {
        display: none;
    }
    ol.organizational-chart>li>ol>li:first-of-type:not(:only-of-type):after,
    ol.organizational-chart>li>ol>li:last-of-type:not(:only-of-type):after {
        height: 3px;
        top: 0;
        width: 50%;
    }
    ol.organizational-chart>li>ol>li:first-of-type:not(:only-of-type):after {
        left: 50%;
    }
    ol.organizational-chart>li>ol>li:last-of-type:not(:only-of-type):after {
        left: 0;
    }
    ol.organizational-chart>li>ol>li+li:not(:last-of-type):after {
        height: 3px;
        left: 0;
        top: 0;
        width: 100%;
    }
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.container ol {
    display: flex;
    align-items: center;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}


/* LEVEL-1 STYLES
–––––––––––––––––––––––––––––––––––––––––––––––––– */

.level-1,
.level-0 {
    width: 100%;
    border-radius: 8px;
    height: 90px;
    margin: 20px auto;
    border-radius: 25px;
    background: rgb(236, 170, 170);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    color: Black;
    font-size: 23px;
    font-family: Franklin Gothic Medium;
}

.level-0::before {
    content: '';
    width: 4px;
    height: 40px;
    background: red;
    position: absolute;
    bottom: -40px;
    left: 50%;
}

.chart ul {
    margin: 0;
    padding: 0;
    width: 90%;
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.chart ul li::before {
    content: '\00BB';
    position: relative;
    color: white;
    background: transparent;
    padding: 0px 5px;
}

.chart ul li {
    font-size: 14px;
    list-style: none;
    font-family: "MinionPro", serif;
    text-align: left;
    width: 90%;
    color: white;
    margin: 2px auto;
}

.level-2 {
    color: Black;
    font-size: 23px;
    font-family: Franklin Gothic Medium;
}

.level-2-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 5px auto;
}

.level-2-wrapper::before {
    height: 2px;
    position: absolute;
    content: '';
    top: 0px;
    width: 100%;
    background: red;
}

.level-2-wrapper::after {
    display: none;
    content: "";
    position: absolute;
    border: 2px solid red;
    width: 20px;
    height: 20px;
    background: red;
}

.level-2-wrapper li {
    position: relative;
}

.level-2-wrapper>li::before {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 20px;
    background: red;
}

.level-2-wrapper li ol li {
    position: relative;
    width: 33.3%;
    height: 90px;
    text-align: center;
    margin: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: capitalize;
    background: burlywood;
    border-radius: 25px;
}

.level-2-wrapper li ol li::before {
    content: '';
    top: -20px;
    left: 50%;
    width: 4px;
    height: 20px;
    background: red;
    position: absolute;
}

.level-2-wrapper li ol li::after {
    content: '';
    bottom: -20px;
    left: 50%;
    width: 4px;
    height: 20px;
    background: red;
    position: absolute;
}


/* for tablet devices*/

@media (min-width: 768px) and (max-width: 1023px) {
    .level-2-wrapper::before {
        width: 100%;
    }
}

@media only screen and (max-width: 760px) {
    .level-2-wrapper::before {
        width: 100%;
    }
    .level-1,
    .level-0 {
        font-size: 19px;
    }
    .chart ul {
        width: 96%;
    }
    .chart ul li {
        font-size: 13px;
    }
    .level-2 {
        font-size: 18px;
        padding: 0px 10px;
    }
    .level-2-wrapper li ol li {
        border-radius: 20px;
    }
    ol.organizational-chart>li>ol>li>ol>li>div,
    ol.organizational-chart>li>ol>li>ol>li>ol>li>div,
    ol.organizational-chart>li>ol>li>ol>li>div,
    ol.organizational-chart>li>ol>li>div,
    ol.organizational-chart li>div {
        font-size: 19px;
    }
}