body {
    font-family: serif;
    font-variant-numeric: stacked-fractions;
    counter-reset: h3 h4 h5 h6 table;
}

a,
a:link,
a:visited {
    color: light-dark(black, white);
    text-decoration: underline;
}

img.centre {
    display: block;
    margin-inline-start: auto;
    margin-inline-end: auto;
}

nav.sidebar li.normal {
    font-weight: bold;
    text-decoration: underline;
}

nav.sidebar a {
    color: light-dark(black, white);
    text-decoration: none;
}

sup {
    font-size: small;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    text-align: center;
    margin-block-start: 2rem;
}

h6 {
    font-style: italic;
    font-size: small;
}

h2 {
    counter-set: h3 0;
}

h3::before {
    content: counter(h3) ". ";
    counter-increment: h3;
    counter-set: h4 0;
}

h4::before {
    content: counter(h3) "." counter(h4) " ";
    counter-increment: h4;
    counter-set: h5 0;
}

h5::before {
    content: counter(h3) "." counter(h4) "." counter(h5) " ";
    counter-increment: h5;
    counter-set: h6 0;
}

h6::before {
    content: counter(h3) "." counter(h4) "." counter(h5) "." counter(h6) " ";
    counter-increment: h6;
}

h2 {
    text-align: center;
    text-decoration: underline;
}

h2 a {
    text-decoration: none;
}

.symbol {
    font-style: italic;
    font-size: larger;
}

.small-caps {
    font-variant-caps: small-caps;
}

.boson {
    font-style: normal;
    font-variant-caps: small-caps;
}

table .boson {
    font-size: larger;
}

.antimatter {
    text-decoration: overline;
}

.grey-boxes {
    display: flex;
    justify-content: space-evenly;
    gap: 1em;
    flex-wrap: wrap;

    .grey-box {
        background-color: light-dark(rgb(210, 210, 210), rgb(45, 45, 45));
        border-radius: 10px;
        width: fit-content;
        min-width: 0;
        flex-shrink: 0;
        margin-block: 1em;
    }

    p {
        margin-inline-start: 0;
        margin-block: 0.5em;
    }
}



figcaption {
    font-size: smaller;
    text-align: center;
    margin-inline-start: -5%;
    margin-inline-end: -5%;
}

figcaption::before {
    content: "Fig " counter(table) ".";
    counter-increment: table;
    font-style: italic;
}

main p {
    line-height: 1.5;
    margin: 1em;
    text-indent: 1em;
}

main ul,
main ol {
    margin-inline-start: 10%;
}

main ol {
    list-style: lower-roman;
}

main table {
    margin-block-start: 2em;
}

main table td,
main table th {
    padding: 2px 1em;
}

main table.hierarchy td {
    border: none;
    height: 1em;
}

main table.hierarchy td:empty {
    background-color: revert;
}

main table.hierarchy tr:last-child td:empty {
    border-bottom: revert;
}

main table td:empty {
    background-color: light-dark(#ddd, #111);
    border: none;
}

main table tbody tr:last-child td:empty {
    border-bottom: 1px solid light-dark(black, white);
}

main table tr:last-child td:empty {
    border-bottom: revert;
}

main .toc {
    padding-inline-start: 5%;
    padding-block-end: 2rem;
}

main .toc p {
    margin-block-start: 0;
    margin-block-end: 0;
}

main .toc::before {
    content: "Chapters:";
    line-height: 3;
}

main .toc {
    counter-reset: number;
}

main .toc p::before {
    counter-increment: number;
    content: counter(number, upper-roman) '.';
    font-size: initial;
    font-variant: small-caps;
}

main div.planes-diagram {
    display: flex;
    justify-content: center;
}

main ol.planes-diagram {
    list-style: none;
    text-align: center;
    margin-inline-start: 0;
    padding-inline-start: 0;
}

main ol.planes-diagram li {
    margin-inline-start: 0;
    width: 15em;
    color: black;
}

main ol.planes-diagram li:nth-child(1) {
    background-color: #daf;
}

main ol.planes-diagram li:nth-child(3) {
    background-color: #99f;
}

main ol.planes-diagram li:nth-child(5) {
    background-color: #9f9;
}

main ol.planes-diagram li:nth-child(7) {
    background-color: #ff6;
}

main ol.planes-diagram li:nth-child(9) {
    background-color: #fc6;
}

main ol.planes-diagram li:nth-child(11) {
    background-color: #f96;
}

main ol.planes-diagram li:nth-last-child(2) {
    transform: scale(1, 2);
    line-height: 2.5;
}


main ol.planes-diagram li span.planes-arrows {
    display: flex;
    justify-content: space-between;
    margin: 0.5em;
    color: light-dark(black, white);
}

main ol.planes-diagram li span.planes-arrow {
    color: light-dark(black, white);
}

main ol.planes-diagram li span.planes-label {
    font-size: small;
}

main ol.planes-diagram li span.planes-label:first-child {
    margin-block-start: -5px;
}

main ol.planes-diagram li span.planes-label:last-child {
    margin-block-start: 5px;
}