:root {
}

.part section.body-section,
.halftitlepage section.body-section,
.titlepage section.body-section {
    position: relative;
    text-indent: 0;
    text-align: center;
    margin: 0 0 3rem 0;
}

figure > div {
    margin: 0 auto;
}

img {
    width: 100%;
    margin: 0 auto;
}

figure.full-page {
    padding: 0;
    width: 100%;
    margin: 1.5rem 0;
}


@media (max-width: 39.999rem) {

    .chapter-title-page p, .chapter-title-page h1 {
        font-size: calc(2vw * 1.41);
    }

    span.chapter-number {
        font-size: calc(18vw * 1.41);
    }

    section.full-page,
    section.chapter-title-page {
        min-height: calc(76vw * 1.41);
        width: 80%;
        padding: calc(14vw * 1.41) 10% 0 10%;
        margin: 0;
    }

    figure.titlepage-logo {
        position: relative;
        width: 30%;
        margin: 10rem auto 0 auto;

    }

    .part section.body-section,
    .halftitlepage section.body-section,
    .titlepage section.body-section,
    .appendix section.body-section,
    .copyright-page section.body-section,
    .dedication section.body-section,
    .epigraph section.body-section,
    .contributors section.body-section,
    .foreword section.body-section,
    .preface section.body-section,
    .prologue section.body-section,
    .introduction section.body-section,
    .toc section.body-section,
    .index section.body-section,
    .glossary section.body-section,
    .bibliography section.body-section,
    .epilogue section.body-section,
    .afterword section.body-section,
    .chapter section.body-section {
        box-sizing: border-box;
        margin: 1rem .5rem;
        padding: 1rem 0;
    }

    aside.chapter-margin-right-line {
        float: none;
        width: 80%;
        margin: 1rem 0;
        padding-left: 1em;
        border-left: solid 3px;
        border-right: none;
    }

    aside.chapter-margin-right-line p {
        text-align: left;

    }

    aside.chapter-margin-right {
        float: none;
        width: 80%;
        margin: 1rem 0;
    }

    aside.chapter-margin-right p {
        text-align: left;

    }

    aside.chapter-margin-glossary {
        float: none;
        width: 80%;
        margin: 1rem 0;
    }

    aside.chapter-margin-glossary p {
        text-align: left;

    }

}

@media (min-width: 40rem) {

    .chapter-title-page p, .chapter-title-page h1 {
        font-size: 1.2rem;
    }

    span.chapter-number {
        font-size: 10rem;
    }

    section.full-page,
    section.chapter-title-page {
        box-sizing: border-box;
        min-height: calc(36rem * 1.41);
        max-width: 40rem;
        padding: calc(40rem * 0.14 * 1.41) calc(40rem * 0.1 * 1.41) 0 calc(40rem * 0.1 * 1.41);
        margin: 0 auto;
    }

    figure.titlepage-logo {
        margin: calc(10vw * 1.41) 0 0 0;
    }

    figure.titlepage-logo > div {
        margin: 0 auto;
        width: 20%;
    }

    .part section.body-section,
    .halftitlepage section.body-section,
    .titlepage section.body-section,
    .appendix section.body-section,
    .copyright-page section.body-section,
    .dedication section.body-section,
    .epigraph section.body-section,
    .contributors section.body-section,
    .foreword section.body-section,
    .preface section.body-section,
    .prologue section.body-section,
    .introduction section.body-section,
    .toc section.body-section,
    .index section.body-section,
    .glossary section.body-section,
    .bibliography section.body-section,
    .epilogue section.body-section,
    .afterword section.body-section,
    .chapter section.body-section {

        box-sizing: border-box;
        margin: 1rem auto;
        max-width: 40rem;
        padding: 1rem 0;
    }


    aside.chapter-margin-right-line {
        width: 25%;
        float: right;
        margin-bottom: 1em;
        margin-top: 1em;
        margin-left: 1.5em;
        padding-left: 1em;
        border-left: solid 3px;
        display: inline-block;
    }

    aside.chapter-margin-right-line p {
        font-size: 0.95em;
        text-align: left;
    }


    h2 + aside.chapter-margin-right-line {
        margin-top: 0;
    }

    aside.chapter-margin-right {
        width: 25%;
        float: right;
        margin-bottom: 1em;
        margin-top: 1em;
        margin-left: 1.5em;
        display: inline-block;
    }

    aside.chapter-margin-right p {
        font-size: 0.95em;
        text-align: left;
    }


    aside.chapter-margin-glossary {
        width: 25%;
        float: right;
        margin-bottom: 1em;
        margin-top: 1em;
        margin-left: 1.5em;
        display: inline-block;
    }

    aside.chapter-margin-glossary p {
        font-size: 0.95em;
        text-align: left;
    }

    aside.chapter-margin-glossary + p {
        margin-top: 1em;
    }

    aside.marginalia {
        margin-top: 0.1rem
    }

    p + aside + p,
    p + aside + aside + p {
        text-indent: 1.5rem;
        margin-top: 0;
    }


    h1 + aside.marginalia,
    h1 + aside.marginalia + aside.marginalia,
    h1 + aside.marginalia + aside.marginalia + p {
        margin-top: 5rem;
        text-indent: 0;
    }

}


@media (max-width: 39.999rem) {
    body {
        padding: 1.5rem;
    }
}

@media (min-width: 40rem) {
    body {
        padding: 4rem;
    }
}