@font-face {
    font-family: "Source Serif 4";
    font-style: normal;
    font-weight: 200 900;
    font-display: swap;
    src: url("/fonts/SourceSerif4-Regular.ttf") format("truetype");
}

body {
    background-color: #dddddd;
    color: black;
    font-family: "Source Serif 4", Georgia, serif;
    font-optical-sizing: none;
    font-weight: 350;
    line-height: 1.6;
    margin: 0;
    padding: 15px clamp(18px, 5vw, 40px) clamp(3em, 7vw, 5em);
}

header {
    font-weight: 350;
}

header h1 {
    color: #26619C;
    font-weight: 350;
    margin: 0;
}

header h1 a,
header h1 a:hover {
    color: inherit;
    text-decoration: none;
}

.site-header,
main {
    max-width: 64em;
}

main {
    border-top: 1pt solid #d0d0d0;
    padding-top: clamp(1.75em, 4vw, 3.5em);
}

.series-index {
    display: grid;
    gap: clamp(3em, 7vw, 5em);
    grid-template-columns: min(100%, 400px);
}

.series-card {
    width: min(100%, 400px);
}

.series-index-with-summaries {
    grid-template-columns: min(100%, 64em);
}

.series-card-with-summary {
    width: min(100%, 64em);
}

.series-card-content {
    align-items: start;
    display: grid;
    gap: clamp(1.5em, 5vw, 4em);
    grid-template-columns: minmax(140px, 400px) minmax(10em, 1fr);
}

.series-summary {
    margin: 0;
    max-width: 24em;
}

.series-card h2,
.category-page > h2,
.series-page h2 {
    color: black;
    font-size: clamp(1.2em, 2.5vw, 1.5em);
    font-weight: 350;
    margin: 0 0 0.75em;
}

.series-card h2 a {
    color: inherit;
    text-decoration: none;
}

.series-card h2 a:hover,
.back-link a:hover {
    text-decoration: underline;
}

.thumbnail-link {
    color: inherit;
    display: block;
    text-decoration: none;
    width: min(100%, 400px);
}

.thumbnail {
    background-color: #f2f2f2;
    border: 1px solid rgba(0, 0, 0, 0.8);
    box-shadow: 0 0 0 2px white;
    display: block;
    height: auto;
    max-width: 100%;
    width: 400px;
}

.series-page {
    max-width: 38em;
}

.series-page.square-series {
    max-width: 64em;
}

.essay-series-page {
    max-width: 64em;
}

.series-content {
    align-items: start;
    display: grid;
    gap: clamp(1.5em, 6vw, 5em);
    grid-template-columns: minmax(10em, 1fr) minmax(140px, 400px);
}

.series-essay {
    max-width: 32em;
}

.essay-disclosure > summary {
    display: none;
}

.series-essay h3 {
    font-size: 1.15em;
    font-weight: 350;
    line-height: 1.4;
    margin: 0 0 1.5em;
}

.series-essay p {
    margin: 0 0 1.4em;
}

.essay-note {
    border-bottom: 1px solid #c4c4c4;
    border-top: 1px solid #c4c4c4;
    color: #333333;
    font-size: 0.9em;
    margin: 0 0 2.25em;
    padding: 0.9em 0;
}

.series-essay .essay-note p {
    margin: 0;
}

.essay-assets {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    margin: 0 0 2.25em;
    overflow-x: auto;
    padding: 2px;
}

.essay-asset-link {
    flex: 0 0 auto;
}

.essay-asset-thumbnail {
    background-color: #f2f2f2;
    border: 1px solid rgba(0, 0, 0, 0.8);
    box-shadow: 0 0 0 2px white;
    display: block;
    height: 100px;
    width: auto;
}

.series-essay a {
    color: #26619C;
}

.series-essay .essay-sequence {
    margin: 2em 0;
}

.essay-references {
    border-top: 1px solid #c4c4c4;
    font-size: 0.85em;
    margin-top: 2.75em;
    padding-top: 1.4em;
}

.essay-references summary {
    cursor: pointer;
    margin: 0;
}

.essay-references[open] summary {
    margin-bottom: 1.4em;
}

.essay-references ol {
    margin: 0;
    padding-left: 1.4em;
}

.essay-references .reference {
    margin-bottom: 1.6em;
    padding-left: 0.25em;
}

.essay-references .reference-title,
.essay-references .reference-author,
.essay-references .reference-summary {
    display: block;
}

.essay-references .reference-author {
    color: #333333;
    font-size: 0.9em;
    margin-top: 0.25em;
}

.essay-references .reference-summary {
    margin-top: 0.4em;
}

.category-page > h2 {
    margin-bottom: 1.5em;
}

.back-link {
    font-size: 0.9em;
    margin: 0 0 2em;
}

.back-link a {
    color: black;
    text-decoration: none;
}

.thumbnail-list {
    display: grid;
    gap: clamp(2em, 6vw, 4em);
}

.thumbnail-list.square-grid {
    grid-template-columns: repeat(
        auto-fill,
        minmax(min(100%, 400px), 400px)
    );
}

.snapshots-page .series-index {
    grid-template-columns: min(100%, 200px);
}

.snapshots-page .series-card,
.snapshots-page .thumbnail-link {
    width: min(100%, 200px);
}

.snapshots-page .thumbnail {
    width: 200px;
}

.snapshots-page .thumbnail-list.square-grid {
    grid-template-columns: repeat(
        auto-fill,
        minmax(min(100%, 200px), 200px)
    );
}

body.image-display {
    padding: 0;
}

.image-step {
    color: rgba(0, 0, 0, 0.55);
    font-size: 1.1rem;
    line-height: 1;
    padding: 0.4rem;
    text-decoration: none;
}

.image-step:hover,
.image-step:focus {
    color: #26619C;
}

.image-step-group {
    display: flex;
    left: clamp(6px, 2vw, 18px);
    position: fixed;
    top: clamp(6px, 2vw, 18px);
    z-index: 1;
}

.image-display-page {
    --image-display-clearance: min(
        200px,
        calc(100vw - 1px),
        calc(100vh - 1px)
    );
    border-top: 0;
    box-sizing: border-box;
    display: grid;
    max-width: none;
    min-height: 100vh;
    min-height: 100dvh;
    padding: calc(var(--image-display-clearance) / 2);
    place-items: center;
}

@supports (height: 100dvh) {
    .image-display-page {
        --image-display-clearance: min(
            200px,
            calc(100vw - 1px),
            calc(100dvh - 1px)
        );
    }
}

.image-display-link {
    align-items: center;
    display: flex;
    justify-content: center;
    max-height: 100%;
    max-width: 100%;
}

.image-display-image {
    border: 1px solid rgba(0, 0, 0, 0.8);
    box-shadow: 0 0 0 2px white;
    box-sizing: border-box;
    display: block;
    height: auto;
    max-height: calc(100vh - var(--image-display-clearance));
    max-height: calc(100dvh - var(--image-display-clearance));
    max-width: calc(100vw - var(--image-display-clearance));
    object-fit: contain;
    width: auto;
}

@media (max-width: 850px) {
    .series-content {
        grid-template-columns: minmax(0, 1fr);
    }

    .essay-disclosure > summary {
        cursor: pointer;
        display: list-item;
    }

    .essay-disclosure[open] > summary {
        margin-bottom: 1.5em;
    }

}
