main {
	max-width: 600px;
	width: 60%;
}

aside, .aside {
	display: inline;
	float: right;
	position: relative;
	width: 20vw;
	margin-right: -24vw;
	font-size: 16px;
	color: darkgreen;
}

@media (max-width: 768px) {
	aside, .aside {
		display: block;
		float: none;
		margin: 5% 10% 5% 10%;
		width: 80%;
		font-size: 15px;
		color:darkgreen;}
}

.sidenote {
    font-size: 80%;
    position: relative;
}
/* Wide viewport */
@media (min-width: 800px) {
    .sidenote {
        float: right;
        clear: right;
        margin-right: -24vw;
        text-align: left;

        top: -3rem;
        width: 20vw;
        margin-top: 1rem;
		color:darkgreen;
    }
}

/* Narrow viewport */
@media (max-width: 800px) {
    .sidenote {
        float: right;
        text-align: right;
        width: 80%;
        margin: 1rem 0;
        padding-right: 15%;
		color:darkgreen;
    }
}

/* Sidenote counter */
body {
    counter-reset: sidenote-counter;
}
.sidenote-number {
    counter-increment: sidenote-counter;
}
/* Counter before the sidenote in the margin. */
.sidenote::before {
    content: counter(sidenote-counter)".";
    position: relative;
    vertical-align: baseline;
    font-size: 0.9em;
    font-weight: bold;
}
/* Counter in the main body. */
.sidenote-number::after {
    content: counter(sidenote-counter);
    vertical-align: super;
    font-size: 0.7em;
    font-weight: bold;
    margin-right: 0.5rem;
}

@media (min-width: 1400px) {
    /* Highlight the sidenote when mouse hovers on the sidenote number in body. */
    .sidenote-number:hover .sidenote {
        background-color: yellow;
    }
}