@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,400;0,700;1,400;1,700&display=swap");

/* math font */
@font-face {
    font-family: "Latin Modern Math";
    src:
        local("Latin Modern Math"),
        url("./latinmodern-math.otf");
}

/* code font */
@font-face {
    font-family: "Cascadia Code";
    src:
        local("Cascadia Code"),
        url("./CascadiaCode.woff2");
}

*, *::after, *::before {
    box-sizing: border-box;
}

body {
    font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.4;
    color: #333;

    width: 100%;
    margin: 0;
}

main, footer {
    padding: 12px 8px;
    width: 650px;
    max-width: 100%;
    margin: auto;
}

footer {
    border-top: 1px solid black;
    text-align: center;
}

h1, h2, h3 {
    line-height: 1;
}

h1 {
    text-decoration: underline;
    text-align: center;
    margin: 12px 0 4px 0;
}

aside.subheader {
    text-align: center;
    font-style: italic;
}

p, ul {
    margin: 12px 0;
}

dt {
    font-weight: bold;
}

math {
    font-family: "Latin Modern Math", "Cambria Math";
    font-size: 1.075em;
}

code {
    font-family: "Cascadia Code", monospace;
}

a {
    color: #0c70d4;
}

a:visited {
    color: rebeccapurple;
}

a:active {
    color: rgb(243, 66, 22);
}

hr {
    width: 100%;
    border: none;
    border-bottom: 2px dashed #333;

    margin: 24px 0;
}

table {
    table-layout: fixed;
    border-collapse: collapse;

    border: 1px solid black;

    margin: 12px 0;
}

caption {
    text-decoration: underline;
}

th {
    border: 1px solid black !important;
    background-color: rgb(81, 100, 117);
    color: whitesmoke;
}

th, td {
    padding: 4px 8px;
}

td:first-child {
    text-align: right;
}

td {
    text-align: center;
    border: 1px solid darkgray;
}

td[colspan] {
    text-align: center !important;
}

td:last-child {
    text-align: left;
}

tr:nth-child(2n) {
    background-color: whitesmoke;
}

tr:nth-child(2n+1) {
    background-color: rgb(212, 219, 226);
}

.note {
    font-size: 0.9em;
    margin: 4px 0;
}
