@font-face {
    font-family: 'Excalifont';
    src: url('/Excalifont-Regular-subset.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

body {
    margin: 0;
    padding-top: 40px;
    line-height: 1.6;
    font-size: 18px;
    color: #2c2c2c;
    background: #f4f1ec;
}

.nav {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: flex;
    justify-content: center;
    gap: 24px;
    width: 100%;
    max-width: 650px;
    box-sizing: border-box;
    padding: 8px 16px;
    background: #f4f1ec;
    border-bottom: 1px solid #e6e1d7;
    border-left: 1px solid #e6e1d7;
    border-right: 1px solid #e6e1d7;
    font-family: 'Excalifont';
    font-size: 18px;
}

.nav a {
    color: #8a7f6f;
    text-decoration: none;
    padding: 4px 12px;
    border: 1px solid #e6e1d7;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.nav a:hover {
    color: #2c2c2c;
    background: #eae5dc;
    border-color: #d8d1c4;
}

.section {
    background: #ffffff;
    max-width: 650px;
    min-height: 100vh;
    margin: 0 auto;
    padding: 40px 10px;
    box-sizing: border-box;
    border-left: 1px solid #e6e1d7;
    border-right: 1px solid #e6e1d7;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
}

@media (max-width: 700px) {
    body {
        padding-top: 80px;
    }

    .section {
        max-width: none;
        padding: 24px 16px;
        border-left: 0;
        border-right: 0;
        box-shadow: none;
    }

    .nav {
        max-width: none;
        flex-wrap: wrap;
        gap: 6px 12px;
        border-left: 0;
        border-right: 0;
    }
}

.section > img {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

h1,
h2,
h3 {
    line-height: 1.2;
    text-align: center;
    font-family: 'Excalifont';
}

blockquote {
    font-family: 'Excalifont';
    background: #fcfbf8;
    border-radius: 10px;
    padding: 8px 12px;
    margin: 16px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

blockquote > * {
    margin: 0;
}

blockquote > * + * {
    margin-top: 6px;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #d8d1c4;
    border-radius: 10px;
    overflow: hidden;
    margin: 24px 0;
}

th,
td {
    border-right: 1px solid #e0d8cc;
    border-bottom: 1px solid #e0d8cc;
    padding: 8px 12px;
    text-align: left;
}

tr:last-child td {
    border-bottom: 0;
}

th:last-child,
td:last-child {
    border-right: 0;
}

/* Footnotes */
.footnote-definition {
    display: flex;
    gap: 0.5em;
    font-size: 0.9em;
    margin: 0.5em 0;
}

.footnote-definition-label {
    flex-shrink: 0;
}

.footnote-definition p {
    margin: 0;
}

/* Left-align the footnotes heading */
hr.footnotes-sep + h1,
.footnotes h1 {
    text-align: left;
}

@media print {
    body {
        padding-top: 0;
        background: #ffffff;
    }

    .nav {
        display: none;
    }

    .section {
        min-height: auto;
        border: 0;
        box-shadow: none;
    }

    table {
        overflow: visible;
    }
}
