@import url('https://fonts.googleapis.com/css2?family=Lilex:ital,wght@0,100..700;1,100..700&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&family=Source+Serif+4:ital,opsz,wght@0,8..60,200..900;1,8..60,200..900&display=swap');

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

h1 {
    font-weight: 300;

    a {
        @media print{
            &::after {
                content: "";
            }
        }
    }
}

h2, h3, h4, h5 {
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 500;
}

code {
    font-family: 'Lilex', monospace;
    font-size-adjust: 0.475;
    line-height: 1.2;
}

a {
    color: #EC6800;

    &:hover {
        text-decoration: none;
    }

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

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

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

.next-lecture::after {
    content: "\1F6A7"
}


dl {
    padding-top: 0;
}

dt {
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 500;
}

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;

    td {
        padding: 0.5em;
        &.assumption {
            padding: 0;
            margin: 0;
        }
    }
    th {
        padding: 0.5em;
        border-bottom: thin solid;
    }

    &.proof {
        min-width: 360px;
        border-top: none;
        border-bottom: none;
    }
    &.assumption {
        width: 100%;
        border: solid thin;
        margin: .25em 0;
    }
    &.test td {
        border: thin dotted;
    }

    &.window {
        border-collapse: collapse;
        td {
            border: thin solid;
        }
    }
    &.hoare {
        min-width: 360px;
        border: none;

        td {
            padding: 0 0.5em;
            margin: 0;
        }

        pre {
            padding: 0;
            margin: 0;
        }
    }
}


.algorithm, .claim, .corollary, .lemma, .proposition, .theorem {
    font-style: italic;
    &::before {
        counter-increment: theorem;
        content: attr(class) " " counter(section) "." counter(theorem) ". ";
        font-family: 'Source Sans 3', sans-serif;
        font-weight: 600;
        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: 'Source Sans 3', sans-serif;
            font-weight: 600;
            font-style: normal;
            text-transform: capitalize;
        }
        &[data-ref]:first-child::before {
            content: attr(class) " " counter(section) "." counter(theorem) " (" attr(data-ref) "). ";
        }
    }
    &::after{
        content: "\2617";
        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: 'Source Sans 3', sans-serif;
            font-style: italic;
        }
    }
    &::after{
        content: "\25FB\FE0E";
        position: absolute;
        bottom: 0;
        right: 0;
    }
}


.pull {
    font-size: 200%;
    line-height: 1.2;
    display: block;
    float: right;
    width: 50%;

    blockquote {
        margin: 0 0 0 1em;
        font-weight: 300;
    }

    p {
        margin: 0;
        text-align: left;
        hyphens: none;
    }

    footer {
        font-size: 50%;
    }
}

