html {
    background-color: #e0e0e0;  /* Light grey for margins */
    lang: "en-GB";
}

body {
    font-family: "Optima";
    font-size: 12pt;
    width: 171.8mm;
    box-sizing: border-box; /* This is important! */
    margin: 0 auto;    
    background: white;
    padding: 25.4mm;
    text-align: justify;
    hyphens: auto;
    word-break: break-word;
}

@page {
	counter-increment: page;
}

@page {
	@bottom-center {
		content: counter(page);
	}
}

/* If you want "Page X of Y" format */
@page {
	@bottom-center {
		content: "Page " counter(page) " of " counter(pages);
	}
}

hr {
	margin-top:  18pt;
	margin-bottom:  16pt;
} 

#contents li {
	list-style: none;
}

file-header p:first-child {
	margin-top: 0pt;
}

div.csl-bib-body {
		text-align: left;
	}

	div.csl-entry:not(:last-child) {
		margin-bottom: 6pt;
	}

	span.mark {
		background-color: lightgray;
	}

	span.final-grade, span.final-grade-entered {
		background-color: lightgreen;
		padding: 6pt;
		border: 1pt solid darkgreen;
	}

	file-header {
		display: block;
	}

	file-header * {
		background-color: inherit;
	}

	@media print {
		span.final-grade-entered {
	        display: inline-block;
	    }

		@page {
			margin: 1in;
		}

		body {
			padding: 0pt;
		}

		file-header {
			display: none;
		}

		hr {
	        border: none;           /* Remove the visible line */
	        height: 0;             /* Take up no space */
	        margin: 0;             /* No margins */
            visibility: hidden;
	    }

	    hr:not(:first-of-type) {
	        page-break-before: always;
	    }
	}