@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@300..700&family=Inria+Sans:ital,wght@0,300;0,400;0,700;1,300;1,400;1,700&family=Inria+Serif:ital,wght@0,300;0,400;0,700;1,300;1,400;1,700&display=swap');

body {
    background: #fffffc;
    color: #0a0a0a;
    font-family: 'Inria Serif', serif;
	padding: 1em;
	margin: 0 auto;
    font-size: 14pt;
    line-height: 1.4;
	width: 40em;
    counter-reset: theorem;

    @media print{
        font-size: 12pt;
        line-height: 1.2;
    }
}

code {
    font-family: 'Fira Code', monospace;
    font-size: 0.9em;
    line-height: 1.2;
}

h1 {
    font-family: 'Inria Serif', serif;
    font-weight: 300;

    a {
        font-weight: 300;
        @media print{
            &::after {
                content: "";
            }
        }
    }
}

h2, h3, h4, h5 {
    font-family: 'Inria Sans', sans-serif;
	font-weight: 700;
}

a {
    color: #3981B7;

    @media screen{
        font-family: 'Inria Sans', sans-serif;
    }

    @media print {
        font-weight: inherit;
        color: inherit;
        text-decoration: none;

        &::after{
            font-family: 'Inria Sans', sans-serif;
            font-size: 0.9em;
            content: " (" attr(href) ") ";
        }
    }
}

a:hover {
    text-decoration: none;
}

dl {
    padding-top: 0;
}

dt {
    font-family: 'Inria Sans', sans-serif;
    font-weight: bold;
}

p {
	text-align: justify;
    hyphens: auto;
}

address {
	padding-bottom: 1em;
}

.abstract {
	font-style: italic;
}

.citation {
}

.figure{
    display: block;
    padding: 1em;
    margin: auto;
    max-width: 80%;
}

blockquote {
    font-style: italic;
}

table {
    margin: 1em auto;
    border-top: medium solid;
    border-bottom: medium solid;
    border-collapse: collapse;

    th {
        border-bottom: thin solid;
    }
    td, th {
        padding: 0.5em;
    }
    &.window {
        border-collapse: collapse;
        td {
            border: thin solid;
        }
    }
}

.algorithm, .claim, .corollary, .lemma, .proposition, .theorem {
    font-style: italic;
    &::before {
        counter-increment: theorem;
        content: attr(class) " " counter(section) "." counter(theorem) ". ";
        font-family: 'Inria Sans', sans-serif;
        font-weight: bold;
        font-style: normal;
        text-transform: capitalize;
    }
    &[data-ref]::before {
        content: attr(class) " " counter(section) "." counter(theorem) " (" attr(data-ref) "). ";
    }
}

.algorithm {
    font-style: normal;
}

.example, .definition, .remark {
    position: relative;
    p {
        &:first-child::before {
            font-family: 'Inria Sans', sans-serif;
            font-weight: bold;
            font-style: normal;
            text-transform: capitalize;
        }
        &[data-ref]:first-child::before {
            content: attr(class) " " counter(section) "." counter(theorem) " (" attr(data-ref) "). ";
        }
    }
    &::after{
        content: "\2767";
        position: absolute;
        bottom: 0;
        right: 0;
    }
}

.remark {
    p:first-child::before {
        font-weight: 400;
        font-style: italic;
        content: "Remark. ";
    }
}

.definition {
    p:first-child::before {
        counter-increment: theorem;
        content: "Definition " counter(section) "." counter(theorem) ". ";
    }
}

.example {
    p:first-child::before {
        counter-increment: theorem;
        content: "Example " counter(section) "." counter(theorem) ". ";
    }
}

.proof {
    position: relative;
    p {
        &:first-child::before {
            content: "Proof. ";
            font-family: 'Inria Sans', sans-serif;
            font-style: italic;
        }
    }
    &::after{
        content: "\25FB\FE0E";
        position: absolute;
        bottom: 0;
        right: 0;
    }
}
