#page {
    grid-row: title / bottomstart;
}

#pagebody-header {
    grid-row: toc;
}

#pagebody a:link {
    color: var(--blue-6);
}

#pagebody a.new {
    color: red;
    text-decoration: underline wavy;
}

#pagebody a:not(.new):visited {
    color: var(--pink-6);
}

#pagebody a:hover , #pagebody a:visited:hover {
    color: var(--blue-4);
}

.mw-heading {
    display: flex;
    margin-bottom: calc(var(--space));
}

#page p {
    margin-bottom: calc(var(--space) * 2);
    line-height: calc(var(--space) * 3);
    text-wrap: pretty;
}

#mw-content-text {
    grid-row: toc / bottomstart;
}

.mw-heading h2{
    margin-left: calc(var(--space) / 2);
    margin-bottom: calc(var(--space) / 2);
}

.mw-heading2 {
    border-bottom: 2px solid;
    margin-bottom: calc(var(--space));
    margin-top: calc(var(--space) * 3);
    border-image: linear-gradient(90deg, var(--gold-7), transparent 90%) 30;
}

.mw-heading h3 {
    margin-left: calc(var(--space) *4);
    margin-top: calc(var(--space));
}

.mw-heading h4 {
    margin-left: calc(var(--space) * 8);
}

.mw-heading3 .mw-editsection, .mw-heading4 .mw-editsection {
    display: none;
}

@media (min-width: 1081px) {
    #page {
        margin-top: calc(var(--space) * 6);
        grid-column: pagestart / pageend ;
        grid-row: title / bottomstart ;
        display: grid;
        grid-template-rows: subgrid;
        grid-template-columns: 1fr;
    }

    #pagebody {
        grid-row: pagebody
    }


    .mw-heading {
        align-items: baseline;
        justify-content: space-between;
    }

}

@media (max-width: 1080px) {
    #page {
        grid-column: 1;

        display: grid;
        grid-template-rows: subgrid;
        grid-template-columns: subgrid;
        margin-top: calc(var(--space) * 4);
    }

    #pagebody {
        grid-row: 2;
    }

    #pagebody p {
        margin-left: var(--space);
        margin-right: var(--space);
    }

    .mw-heading {
        margin-left: var(--space);
        margin-right: var(--space);
    }

    .mw-heading > .mw-editsection {
        position: absolute;
        right: var(--space);
    }

}


@media (max-width: 720px) {

}