
@font-face {
    font-family: "Fira Code";
    font-weight: normal;
    src: url('./FiraCode-Regular.woff2');
}

@font-face {
    font-family: "Fira Code";
    font-weight: bold;
    src: url('./FiraCode-Bold.woff2');
}



:root {
    --color-bg: #ffe;
    --color-bg-box: #f0f0efcc;
    --color-bg-accent: #e0e0cc;
    --color-bg-highlight: #909055;
    --color-text: #223;
    --color-text-border: #889;
    --color-leader: #909055;

    --font-main: 0.95rem 'Fira Code', monospace;
}

/* Quilt */

/* Center behind the main content */
#background-container {
    position: absolute;
    z-index: -999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;

    background: var(--color-bg);
}

@media (max-aspect-ratio: 1/1) {
    #background-container {
        flex-direction: column;
    }
}

#quilt {
    min-width: 100%;
    min-height: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
}

.quilt-row {
    display: flex;
    flex-grow: 1;
}

.quilt-tile {
    flex-grow: 1;
    transition: 0.75s color ease-out;
    visibility: hidden;
    color: var(--color-bg-highlight);
}

.quilt-tile.active {
    visibility: initial;
    color: var(--color-bg-accent);
}

.quilt-left {
    background: linear-gradient(-45deg,
            transparent,
            transparent 44%,
            currentColor 45%,
            currentColor 55%,
            transparent 56%
        );
}

.quilt-right {
    background: linear-gradient(45deg,
            transparent,
            transparent 44%,
            currentColor 45%,
            currentColor 55%,
            transparent 56%
        );
}

.quilt-left.quilt-right {
    background: linear-gradient(45deg,
            transparent,
            transparent 44%,
            currentColor 45%,
            currentColor 55%,
            transparent 56%
        ), linear-gradient(-45deg,
            transparent,
            transparent 44%,
            currentColor 45%,
            currentColor 55%,
            transparent 56%
        );
}

html, body {
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

html {
    background: var(--color-bg);
    font: var(--font-main);
}

main {
    max-width: 30em;
    flex-grow: 1;
    margin: auto 3em;
    background: var(--color-bg-box);
    border: 1px solid var(--color-text-border);
    padding-bottom: 0.25em;
}

main h1 {
    font: inherit;
    font-weight: bold;
    margin: 0;
    margin-bottom: 0.75em;
    padding: 0.25em;
    padding-left: 0.5em;
    background: var(--color-text-border);
    color: var(--color-bg);
}

main p {
    font-style: italic;
    display: block;
    margin: 0.5em 0.75em;
    color: var(--color-text);
}

main hr {
    margin: 1em 0.5em;
    border-bottom: none;
}

main .row {
    margin: 0.5em 1em 0;
    display: flex;
}

main .leader {
    border-bottom: 2px dotted var(--color-leader);
    flex-grow: 1;
    align-self: center;
    margin: 0.5em 0.25em 0;
}

@media screen and (max-width: 32rem) {
    #main {
        max-width: unset;
        margin: 0;
        margin-bottom: auto;
        border-style: none;
        border-bottom-style: solid;
    }
}