html {
    scrollbar-gutter: stable;
}

.d2,
.d2:before,
.d2:after {
    content: '';
    display: block;
    height: 2px;
    width: 25px;
    border-radius: 2px;
    background: #fff;
    transition: .3s;
    position: absolute;
}

.d2:before {
    bottom: 8px;
}

.d2:after {
    top: 8px;
}

dialog#d1 {
    position: fixed;
    inset: 0;
    max-width: unset;
    color: unset;
    border: unset;
    overflow: unset;
    margin: unset;
    inset-inline-start: unset;
    inset-inline-end: unset;
    inset-block-start: unset;
    inset-block-end: unset;
    border: none;
    width: 100vw;
    max-height: 100svh;
    height: 100vh;
    right: 0;
    top: 0;
    padding: 6em 3em 0 3em;
    background: #f7f8f8;
    text-align: center;
    list-style: none;
    opacity: 0;
    transition: all .8s allow-discrete;
    z-index: 9;
}

.d5.io {
    background: #fff;
    border: solid 1px #005bac;
}

.d5.io .d2 {
    background: transparent;
}

.d5.io .d2:before {
    bottom: 0;
    transform: rotate(45deg);
    background: #005bac;
}

.d5.io .d2:after {
    top: 0;
    transform: rotate(-45deg);
    background: #005bac;
}

#d3 {
    font-size: 1em;
    margin: 0;
    font-weight: 400;
    color: #ccc;
}

a.d3:visited {
    color: #000;
}

a.d3 {
    display: block;
    color: #000;
}

dialog::backdrop {
    background: #666666bb;
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: all .3s allow-discrete;
}

dialog#d1[open],
dialog#d1[open]::backdrop {
    opacity: 1;
}

@starting-style {

    .d5.io .d2:before,
    .d5.io .d2:after {
        transform: rotate(0deg);
        background: #444;
    }

    dialog#d1[open],
    dialog#d1[open]::backdrop {
        opacity: 0;
    }
}

html:has(dialog#d1[open]) {
    overflow: hidden;
    overscroll-behavior: none;
}

:where(html[dm] dialog *) {
    outline: none;
    line-height: 4;
}

[data-modal-open]:where(html[dm] *) {
    outline: none;
}