@media (prefers-color-scheme: light) {
    :root {
        --foreground: black;
        --background: white;
        --accent-1: lightgray;
        --accent-2: gray;
        --accent-3: #7f7fff;
    }
}
@media (prefers-color-scheme: dark) {
    :root {
        --foreground: white;
        --background: black;
        --accent-1: gray;
        --accent-2: lightgray;
        --accent-3: #007f7f;
    }
}
* {
    font-family: monospace;
    text-decoration: none;
    margin: 0;
    padding: 0;
}

body{
    color: var(--foreground);
    background-color: var(--background);
    height: 100%;
    min-height: 100%;
    flex-direction: column;
    display: flex;
    align-items: stretch;
    /* padding: 1rem 25vw; */

    a {
        color: blue;
    }

    header{
        display: flex;
        flex-direction: column;
        align-items: stretch;
        h1 {
            text-align: center;
        }
        nav {
            display: flex;
            &#subdomain{
                align-items: center;
                justify-content: space-between;
                color: var(--background);
                background-color: var(--foreground);
                ul {
                    li {
                        padding: 0.125rem 1rem;
                        img {
                            display: block;
                            padding: 0.5rem 0.5rem 0.25rem 0.5rem;
                            width: 2rem;
                        }
                    }
                }

                b {
                    color: var(--background);
                    padding-right: 1rem;
                    a{
                        color: var(--accent-3)
                    }
                }
            }
            ul{
                display: flex;
                flex-direction: row;
                align-items: center;
                flex-wrap: wrap;
                li{
                    padding: 0.5rem 1rem;
                    list-style: none;
                    font-weight: bolder;
                    font-size: 1.5rem;
                }
            }
        }
    }

    main{
        display: flex;
        flex-direction: column;
        align-items: center;
        margin: 3rem;

        article {
            max-width: 75vw;
            
            h1, h2 {
                margin-bottom: 1rem;
            }
            h3 {
                margin-bottom: 0.5rem;
            }
            section {
                display: flex;
                flex-direction: column;
                margin-left: 2rem;
                margin-bottom: 1rem;
                ul {
                    margin-left: 2rem;
                    margin-bottom: 1rem;

                }
                img {
                    margin-bottom: 1rem;
                    max-width: 70vw;
                }
                pre{
                    display: flex;
                    flex-direction: column;
                    margin-left: 2rem;
                    margin-bottom: 1rem;
                }
                section {
                    display: flex;
                    flex-direction: column;
                    margin-left: 2rem;
                    margin-bottom: 1rem;
                }
            }
            ol {
                margin-left: 2rem;
                margin-bottom: 2rem;
                padding-left: 1rem;
                list-style-type: none;
                border-left: 1px solid var(--accent-1);
                ol {
                    margin: 0;
                }
                li{
                    a{
                        text-decoration: none;
                        color: blue;
                    }
                }
            }
            figcaption{
                text-align: center;
                margin-left: 3rem;
                margin-bottom: 1rem;
            }
        }
        p{
            margin-bottom: 1rem;
        }
        table{
            border: 1px solid var(--foreground);
            border-collapse: collapse;
            table-layout: fixed;
            thead{
                tr{
                    border: 1px solid var(--foreground);
                    th{
                        padding: 0 1rem; 
                    }
                }
            }
            tbody{
                tr:nth-child(even) {
                    background-color: var(--accent-1);
                }
                tr:nth-child(odd) {
                    background-color: var(--background);
                }
                td{
                    padding: 0 1rem; 
                    text-align: center;
                    button{
                        background: transparent;
                        border: none;
                        padding: 0;
                        font: inherit;
                        color: inherit;
                        cursor: pointer; 
                        outline: none;
                    }
                }
            }
        }
    }

    footer {
        color: var(--background);
        background-color: var(--foreground);
        display: flex;
        flex-direction: column;
        align-items: center;
        position: fixed;
        left: 0;
        bottom: 0;
        width: 100%;
        padding: 1rem;
    }
}