.eres-dg-overview,
.eres-dg-gallery {
    --eres-dg-border: rgba(127, 127, 127, .3);
    --eres-dg-muted: rgba(80, 80, 80, .75);
    --eres-dg-surface: rgba(127, 127, 127, .05);
    width: 100%;
}

@supports (color: color-mix(in srgb, black 50%, transparent)) {
    .eres-dg-overview,
    .eres-dg-gallery {
        --eres-dg-border: color-mix(in srgb, currentColor 18%, transparent);
        --eres-dg-muted: color-mix(in srgb, currentColor 68%, transparent);
        --eres-dg-surface: color-mix(in srgb, currentColor 4%, transparent);
    }
}

.eres-dg-year + .eres-dg-year {
    margin-top: 2.5rem;
}

.eres-dg-table-wrap {
    overflow-x: auto;
}

.eres-dg-table {
    width: 100%;
    border-collapse: collapse;
    font-size: inherit;
}

.eres-dg-table th,
.eres-dg-table td {
    padding: .8rem .75rem;
    border-bottom: 1px solid var(--eres-dg-border);
    text-align: left;
    vertical-align: top;
}

.eres-dg-table th:first-child,
.eres-dg-table td:first-child {
    width: 10rem;
}

.eres-dg-table th:last-child,
.eres-dg-table td:last-child {
    width: 11rem;
}

.eres-dg-back {
    margin: 0 0 1.5rem;
}

.eres-dg-lock {
    max-width: 42rem;
    padding: clamp(1.25rem, 4vw, 2rem);
    border: 1px solid var(--eres-dg-border);
    border-radius: .75rem;
    background: var(--eres-dg-surface);
}

.eres-dg-lock h2 {
    margin-top: 0;
}

.eres-dg-password-form label {
    display: block;
    margin-bottom: .4rem;
    font-weight: 600;
}

.eres-dg-password-row {
    display: flex;
    gap: .6rem;
    align-items: stretch;
}

.eres-dg-password-row input {
    flex: 1 1 16rem;
    min-width: 0;
    padding: .7rem .8rem;
}

.eres-dg-button {
    display: inline-flex;
    min-height: 2.75rem;
    align-items: center;
    justify-content: center;
    padding: .65rem 1rem;
    border: 1px solid #1d2327;
    border-radius: .35rem;
    background: #1d2327;
    color: #fff;
    font: inherit;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
}

.eres-dg-button:hover,
.eres-dg-button:focus-visible {
    opacity: .84;
    color: #fff;
}

.eres-dg-button--secondary {
    background: transparent;
    color: inherit;
}

.eres-dg-toolbar {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--eres-dg-border);
}

.eres-dg-summary,
.eres-dg-zip-form {
    margin: 0;
}

.eres-dg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(11rem, 100%), 1fr));
    gap: clamp(.65rem, 2vw, 1rem);
}

.eres-dg-image-card,
.eres-dg-file-card {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--eres-dg-border);
    border-radius: .45rem;
    background: var(--eres-dg-surface);
}

.eres-dg-image-card__open {
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #ececec;
}

.eres-dg-image-card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .2s ease;
}

.eres-dg-image-card__open:hover img,
.eres-dg-image-card__open:focus-visible img {
    transform: scale(1.025);
}

.eres-dg-image-card figcaption {
    padding: .55rem .7rem;
    text-align: center;
}

.eres-dg-download-link {
    font-size: .9em;
}

.eres-dg-file-card {
    display: flex;
    min-height: 12rem;
    flex-direction: column;
    gap: .75rem;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    text-align: center;
}

.eres-dg-file-card__icon {
    font-weight: 600;
}

.eres-dg-file-card__name {
    overflow-wrap: anywhere;
}

.eres-dg-notice,
.eres-dg-zip-progress {
    padding: .85rem 1rem;
    border: 1px solid var(--eres-dg-border);
    border-left-width: .3rem;
    border-radius: .25rem;
    background: var(--eres-dg-surface);
}

.eres-dg-notice--error,
.eres-dg-zip-progress--error {
    border-left-color: #b32d2e;
}

.eres-dg-zip-progress--ready {
    border-left-color: #008a20;
}

.eres-dg-zip-progress progress {
    display: block;
    width: 100%;
    margin: .7rem 0 1rem;
}

.eres-dg-zip-progress__download[hidden] {
    display: none;
}

.eres-dg-lightbox {
    width: 100vw;
    max-width: none;
    height: 100vh;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(0, 0, 0, .94);
    color: #fff;
}

.eres-dg-lightbox::backdrop {
    background: rgba(0, 0, 0, .94);
}

.eres-dg-lightbox__frame {
    position: relative;
    display: grid;
    width: 100%;
    height: 100%;
    grid-template-columns: 3.5rem minmax(0, 1fr) 3.5rem;
    grid-template-rows: minmax(0, 1fr) auto;
    align-items: center;
}

.eres-dg-lightbox__image {
    grid-column: 2;
    grid-row: 1;
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 6rem);
    margin: auto;
    object-fit: contain;
}

.eres-dg-lightbox__close,
.eres-dg-lightbox__previous,
.eres-dg-lightbox__next {
    z-index: 2;
    border: 0;
    background: transparent;
    color: #fff;
    font: inherit;
    font-size: 2.4rem;
    cursor: pointer;
}

.eres-dg-lightbox__close {
    position: absolute;
    top: .5rem;
    right: .75rem;
}

.eres-dg-lightbox__previous {
    grid-column: 1;
    grid-row: 1;
}

.eres-dg-lightbox__next {
    grid-column: 3;
    grid-row: 1;
}

.eres-dg-lightbox__footer {
    display: flex;
    grid-column: 1 / -1;
    grid-row: 2;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    padding: .75rem 4rem 1rem;
}

.eres-dg-lightbox__caption {
    max-width: min(45rem, 60vw);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.eres-dg-lightbox__download {
    background: #fff;
    color: #111;
}

.eres-dg-lightbox-open {
    overflow: hidden;
}

@media (max-width: 640px) {
    .eres-dg-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        clip-path: inset(50%);
        white-space: nowrap;
    }

    .eres-dg-table,
    .eres-dg-table tbody,
    .eres-dg-table tr,
    .eres-dg-table td {
        display: block;
        width: 100%;
    }

    .eres-dg-table tr {
        padding: .5rem 0;
        border-bottom: 1px solid var(--eres-dg-border);
    }

    .eres-dg-table td,
    .eres-dg-table th:first-child,
    .eres-dg-table td:first-child,
    .eres-dg-table th:last-child,
    .eres-dg-table td:last-child {
        width: auto;
        padding: .3rem 0;
        border: 0;
    }

    .eres-dg-table td::before {
        display: block;
        color: var(--eres-dg-muted);
        content: attr(data-label);
        font-size: .8em;
        font-weight: 600;
    }

    .eres-dg-toolbar,
    .eres-dg-password-row,
    .eres-dg-lightbox__footer {
        align-items: stretch;
        flex-direction: column;
    }

    .eres-dg-lightbox__frame {
        grid-template-columns: 2.75rem minmax(0, 1fr) 2.75rem;
    }

    .eres-dg-lightbox__footer {
        padding-inline: 1rem;
    }

    .eres-dg-lightbox__caption {
        max-width: 90vw;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .eres-dg-image-card img {
        transition: none;
    }
}
