/** Both */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

/** Both */
section.section-preview {
    /* display: grid; */
    display: flex;
    /* place-items: center; */
    /* grid-template-rows: 1fr; */
    /* grid-template-columns: 1fr; */
    overflow: hidden;
    align-items: center;
    justify-content: center;
}

/** Both */
section.section-controls {
    width: calc(100% - 1em);
    box-sizing: border-box;
    overflow-y: scroll;
    display: grid;
    gap: 0.5em 0;
    align-items: flex-start;
    justify-content: stretch;
    align-content: flex-start;
    padding-bottom: 1em;
}

/** Decoder */
section.section-controls > label {
    width: 100%;
    display: grid;
    grid-template-columns: 9em 1fr;
    grid-auto-columns: 1fr;
    grid-auto-flow: column;
    gap: 0 0.5em;
}

/** Decoder */
section.section-controls > label > input {
    width: 100%;
    box-sizing: border-box;
}

/** Decoder */
section.section-controls > textarea,
section.section-controls > details > pre {
    height: 8em;
    width: 100%;
    box-sizing: border-box;
    resize: vertical;
}
section.section-controls > details > pre {
    text-wrap: wrap;
    font-size: 0.75em;
    height: 8rem;
}

section.section-controls > cite {
    width: 100%;
    text-align: center;
    font-size: 0.75em;
    padding: 0;
    margin: 0;
}
section.section-controls > details > pre {
    background-color: field;
    box-sizing: border-box;
    border: 1px solid buttonborder;
    overflow: hidden;
}
/** Both */
canvas {
    max-width: 100%;
    max-height: 100%;
}



nav {
    border-bottom: 1px solid currentColor;
    width: 100%;
}
nav ul {
    list-style: none;
    display: grid;
    grid-auto-flow: column;
    place-items: center;
    padding: 0;
    margin: .5em 0;
}
nav ul li a[data-current] {
    pointer-events: none;
    text-decoration: none;
    color: inherit;
    font-weight: bold;
}

div.toast-warn {
    position: fixed;
    z-index: 99;
    background-color: rgba(255,0,0,0.5);
    color: white;
    text-shadow: 0px 0px 5px black;
    width: 100%;
    min-height: 1.5em;
    height: max-content;
    inset: 0;
    padding: .5em;
    text-align: center;
    pointer-events: none;
    overflow: hidden;
}


@media screen and (orientation: landscape){
    /** Encoder */
    body {
        display: grid;
        grid-template-columns: 25em 1fr;
    }

}
@media screen and (orientation: portrait){
    body {
        display: flex;
        flex-flow: column nowrap;
        height: auto;
        align-items: center;
    }
    /** Encoder */
    body.hexa-encoder {
        /* grid-template-rows: 1fr 1fr; */
    }

    /** Decoder */
    body.hexa-decoder {
    }

    section.section-preview {
    }
}
