article:not(.journal-item):not(.title-element) {
    max-width: var(--max-width);
}

article.journal-item {
    margin-left: 0;
}

.block-type-text,
.block-type-title,
.block-type-heading,
.block-type-files,
.block-type-table,
.block-type-subsection,
.block-type-gallery,
.block-type-chronology,
.block-type-twins,
.block-type-huge,
.block-type-contact,
.block {
    max-width: var(--max-width);
    /* margin: auto; */
    padding: 0;
    margin-block: var(--gap);

}



.block-type-header {
    text-align: center;
    text-decoration: underline;
    text-underline-offset: .2em;
    text-decoration-thickness: .01em;
}



.block-type-heading {
    --c-margin: calc(var(--bm) * 4);
    padding-top: var(--c-margin);
    margin-top: calc(-1 * var(--c-margin));

    h2 {
        text-decoration: none;

        padding-top: var(--bm);

    }


}


.block-type-gallery {
    max-width: var(--max-width-big);


}

.block-type-gallery {



    >figure {
        text-align: center;
        max-width: var(--max-width--big);
        margin: auto;

        picture {
            width: 100%;


            &:has(>img.portrait) {

                max-height: 90vh;
                width: 100%;
                margin: auto;

            }

            img {
                width: 100%;
                height: auto;

                &.portrait {
                    width: 100%;
                    height: auto;
                    max-height: 90svh;
                }
            }


        }
    }
}



.block-type-table {
    margin-block: var(--bm);

    table {

        width: 100%;
        line-height: 1.2;
    }

    tr {

        border-bottom: var(--border);

        &:first-of-type {}

        &:last-of-type {
            border-bottom: none;

        }


        &:hover {
            /* color: var(--away); */
        }
    }



    td {
        padding: .4em .4em;
        /* border-left: 1px dashed black; */
    }

    td:last-of-type {
        /* border-right: 1px dashed black; */
    }
}

.block-type-subsection {
    /* 
    padding-inline: var(--gap); */
    margin-block: var(--bm);




    summary {
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: space-between;
        border-bottom: var(--border);


        padding-bottom: 4px;





    }

    span {

        transition: transform 0.3s ease;
    }

    &:hover span {
        /* transform: rotate(45deg); */

    }

    details[open] span {
        transform: rotate(45deg);
    }

    details[open] summary:hover span {
        /* transform: rotate(-90deg); */
    }


    details>summary {
        list-style: none;
    }

    details>summary::-webkit-details-marker {
        display: none;
    }

    section.content {
        margin-top: var(--gap)
    }


    .swiper {
        width: calc(100vw - var(--bm) * 2 - 2rem) !important;

    }


}


.block-type-files {
    .files {
        display: flex;
        flex-direction: row;
        gap: var(--bm);
        flex-wrap: wrap;

    }


    .file {
        min-height: 5lh;
        display: grid;
        flex-direction: row;
        align-items: first baseline;
        justify-content: space-between;
        max-width: calc(var(--max-width)/2 - var(--bm) * 2);
        grid-template-columns: repeat(3, 1fr);

        span:first-of-type {
            grid-column: 1/4;
            hyphens: auto;
        }

        .infos {
            align-self: flex-end;
            font-variant-caps: initial;
            text-transform: uppercase;
            text-align: right;
            grid-column: 1/4;
            grid-row: 2;
        }
    }

    margin-bottom: 1lh;

}

.block-type-twins {
    width: calc(100vw - var(--article-margin) - var(--bm) * 4);
    max-width: 120ch;

    section.twins {
        display: flex;
        flex-direction: row;
        gap: var(--bm);
        min-height: 300px;


        .twin {
            padding: var(--bm);
            border-radius: var(--border-radius);
            /* border: 1px solid var(--away); */
            background-color: var(--far-away);
            max-width: 50%;
            width: 50%;

        }
    }
}

.chronology.cards-group {
    left: calc(var(--bm) * -1 - var(--article-margin)) !important;
    width: 100vw;

    .cards {
        padding-left: calc(var(--article-margin) + var(--bm) * 2) !important;


        .card {
            scroll-snap-align: left;
            aspect-ratio: unset;
        }

        .card:last-child {
            margin-right: var(--article-margin);
        }
    }

    .cards:has(> :nth-child(2):last-child) {
        width: calc(100vw - var(--article-margin) - var(--bm) * 2);
        max-width: var(--max-width);
        padding-inline: var(--bm);

        /* overflow: visible; */

        .card:last-child {
            margin-right: 0;
        }

        .card {
            min-width: 50%;
        }
    }
}


/* .block-type-chronology {

    .card:after {

        content: "";
        display: block;
        width: 100%;
        height: 1px;
        background-color: var(--near);
        margin-top: var(--bm);
    }
} */


.block-type-twins,
.block-type-chronology {
    margin-bottom: var(--bm);
}

article {


    hr:last-child {
        margin-top: calc(var(--bm) * 5);

    }
}


.contact-block {
    margin-inline: auto;

    width: fit-content;

    padding: var(--bm);
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    max-width: var(--max-width);
    gap: 1lh;


    section.header {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        gap: var(--gap);

        .button {
            margin-inline: 0;
        }

        .name {}
    }

    section.links {
        flex-direction: flex-end;
        text-align: right;

        p.bio {
            text-align: left;
        }
    }

}

.block-type-huge {
    .card {
        aspect-ratio: unset;
        max-width: var(--max-width);
        margin: auto;
        background-color: var(--far-away);
        padding: var(--bm);
        margin-block: var(--gap);

        p {

            hyphens: auto;
        }
    }
}

@media (width < 968px) {
    .block-type-twins {
        width: 100%;
        max-width: none;

        section.twins {
            flex-direction: row;
            overflow: scroll;
            width: 100vw;
            margin-inline: calc(50% - 50vw);

            .twin {
                min-width: 90vw;
                margin-inline: var(--bm);
            }
        }
    }


    .block-type-subsection {

        padding: 0rem;
        margin-block: var(--bm);

    }

    .block-type-files {


        .file {
            width: 100%;
            gap: var(--gap);
        }

        span {

            font-size: var(--fs);
        }

        span.infos {
            font-size: var(--small-fs);
        }
    }


    element {
        pointer-events: auto;
    }

    .contact-block {
        & section.header {
            flex-direction: column;
            align-items: center;

        }
    }

    blockquote {
        margin-left: 0;
        margin-right: 0;
        padding-left: 0;


    }




    .block-type-table {

        table {}
    }
}