:root {
    color-scheme: light dark;
    --bg-color: light-dark(#fff, #222);
    --fg-color: light-dark(#222, #eee);
    --mid-fg: light-dark(#444, #ccc);
    --faded-color: #888;
    --article-bg-color:  light-dark(rgba(255,255,255,0.7), rgba(30,30,30,0.7));
    --article-shadow-color: light-dark(#DDD, #666);
    --primary-color: light-dark(#733799, #9357b9);
}
* {
    box-sizing: border-box;
}
@font-face {
    font-family: 'Poiret One';
    src: url('/fonts/PoiretOne-Regular.ttf') format('truetype');
}
@font-face {
    font-family: 'Thasadith';
    src: url('/fonts/Thasadith-Regular.ttf') format('truetype');
    font-weight: normal; font-style: normal;
}
@font-face {
    font-family: 'Thasadith';
    src: url('/fonts/Thasadith-Bold.ttf') format('truetype');
    font-weight: bold; font-style: normal;
}
@font-face {
    font-family: 'Thasadith';
    src: url('/fonts/Thasadith-BoldItalic.ttf') format('truetype');
    font-weight: bold; font-style: italic;
}
@font-face {
    font-family: 'Thasadith';
    src: url('/fonts/Thasadith-Italic.ttf') format('truetype');
    font-weight: normal; font-style: italic;
}

html {
    font-size: 62.5%;
}

body {
    margin: 0;
    padding: 20px;
    /*background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAT0lEQVQYV2N89+7dfyEhIUYGPACkBqwAn2KYHNwkbIqRxVCsRJZA14jhNpACkHPQ3U2ewrt37/5XVlbG6kG4iciKYCGF4RlsitAVMxIb4ABjV0edxqjJlQAAAABJRU5ErkJggg==) repeat;*/
    background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAAY0lEQVR4AVzNiQnAIBBEUbUFW7D/imzBGgxPWDEbGJzjR1tJ31prp6r8IEDvvTpf8EIGgNEp83QghUERkvVyYxRClt7ewmRAnnNu+3mO8YchBBhjVPlAzAu+gO1CQoBxg44+AAAA///9eCbYAAAABklEQVQDABiPP9ludwjvAAAAAElFTkSuQmCC) repeat;
    font-family: 'Thasadith', sans-serif;
    font-size: 1.5em; /* currently ems cause chrome bug misinterpreting rems on body element */
    line-height: 1.6;
    font-weight: 400;
    background-color: var(--bg-color);
    color: var(--fg-color);
}

@media (prefers-color-scheme: dark) {
    body {
        background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAAYUlEQVR4AVzNiQnAIBBEUbU2W7BKW7A3wxNWzAYG5/jRVtLXe9+pKj8IsNaqzhe8kAFgdMo8HUhhUIRkvdwYhZClt7cwGZDHGNt+nmP8YQgB5pxVPhDzgi9gu5AQYNygow8AAP//P67vwQAAAAZJREFUAwDTtD3eS1ecuAAAAABJRU5ErkJggg==) repeat;
    }

}

h1 {
    font-size: 2em;
    margin: 0.67em 0;
}


h1, h2, h3, h4, h5, h6 {
    font-family: 'Poiret One', cursive;
    margin-top: 0;
    margin-bottom: 2rem;
    font-weight: 300; }
h1 { font-size: 4.0rem; line-height: 1.2;  letter-spacing: -.1rem;}
h2 { font-size: 3.6rem; line-height: 1.25; letter-spacing: -.1rem; }
h3 { font-size: 3.0rem; line-height: 1.3;  /*letter-spacing: -.1rem; */}
h4 { font-size: 2.4rem; line-height: 1.35; letter-spacing: -.08rem; }
h5 { font-size: 1.8rem; line-height: 1.5;  letter-spacing: -.05rem; }
h6 { font-size: 1.5rem; line-height: 1.6;  letter-spacing: 0; }

@media (min-width: 550px) {
    h1 { font-size: 5.0rem; }
    h2 { font-size: 4.2rem; }
    h3 { font-size: 3.6rem; }
    h4 { font-size: 3.0rem; }
    h5 { font-size: 2.4rem; }
    h6 { font-size: 1.5rem; }
}

.container {
    position: relative;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box; }

p {
    margin-top: 0;
}

#header {
    text-align: center;
    padding: 25px 0px 90px 0px;
    position: relative;
    h1 {
        margin-bottom: 0;
        font-size: 6em;
    }
    h2 {
        margin-top: 1rem;
        font-size: 3rem;
        color: var(--faded-color);
    }
    h3 {
        position: absolute;
        bottom: 10px;
        width: 100%;
        font-size: 1.5rem;
        color: var(--faded-color);
        font-style: italic;
     /*   font-family: Thasadith;*/
    }
}

#instructions {
    font-family: 'Poiret One', cursive;
    text-align: center;
    margin: 0 auto;
    margin-bottom: 50px;
    position: relative;
    width: 100%;
    max-width: 960px;

    background-color: var(--article-bg-color);
    padding: 1em;
    border-radius: 1em;
    box-shadow: 2px 2px 30px var(--article-shadow-color);

    p:last-child {
        margin-bottom: 0;
    }

    color: var(--mid-fg);
    font-style: italic;

}

/*
section {
    background-color: rgba(255,255,255,0.7);
    padding: 1em;
    border-radius: 1em;
    box-shadow: 2px 2px 30px #DDD;
    margin-bottom: 20px;
}
*/
/* h3 { */
/*     color: #444; */
/*     font-size: 1.5em; */

/* } */

li a {
    display: inline-block;
    padding-right: 10px;
    font-weight: bold;
}
/*
img {
    width: 300px;
    max-width: 100%;
    cursor: pointer;
    ///    transition: 2s;
}
img:target, img:active {
    position: absolute;
    left:0;
    width: 100%;
}
*/
a {
    font-weight: bold;
}
a:link{color:var(--primary-color);text-decoration:none;}
a:visited{color:#7c6789;text-decoration:none;}
a:hover{color:#d591ff;text-decoration:underline}

article {
    margin: 0 auto;
    margin-bottom: 50px;
    position: relative;
    width: 100%;
    max-width: 960px;

    background-color: var(--article-bg-color);
    padding: 1em;
    border-radius: 1em;
    box-shadow: 2px 2px 30px var(--article-shadow-color);


    h2 {
        text-align: center;
        margin-bottom: 0;
        color: var(--primary-color);
    }

    h3 {
        font-size: 1em;
        color: var(--faded-color);
        text-align: center;
    }


    main {
        display: flex;

        section {
            /*align-self: center;*/
            flex-grow: 1;
            padding: 30px;
        }
        figure {

            position: relative;
            margin: 0 auto;
            width: content-width;
            max-width: 400px;
            ul {
                margin: 0;
                margin-bottom: 20px;
                /*width: 100%;*/
                max-height: 300px;
                padding: 0px 20px;
                display: flex;
                gap: 4vw;
                overflow-x: scroll;
                overflow-y: hidden;
                scroll-snap-type: x mandatory;

                &:focus {
                    outline: none;
                }
                /*
                anchor-name: --my-carousel;


                scroll-marker-group: after;

                &::scroll-button(*) {
                    border: 0;
                    font-size: 2rem;
                    background: none;
                    color: var(--fg-color);
                    opacity: 0.7;
                    cursor: pointer;
                }

                &::scroll-button(*):hover,
                &::scroll-button(*):focus {
                    opacity: 1;
                }

                &::scroll-button(*):active {
                    translate: 1px 1px;
                }

                &::scroll-button(*):disabled {
                    opacity: 0.2;
                    cursor: unset;
                }
                &::scroll-button(left) {
                    content: "◄";
                    color: var(--primary-color);
                }

                &::scroll-button(right) {
                    content: "►";
                    color: var(--primary-color);
                }

                &::scroll-button(*) {
                    position: absolute;
                    position-anchor: --my-carousel;
                }
                &::scroll-button(left) {
                    right: calc(anchor(left) - 35px);
                    top: calc(anchor(bottom) + 2px);
                }

                &::scroll-button(right) {
                    left: calc(anchor(right) - 35px);
                    top: calc(anchor(bottom) + 2px);
                }
                &::scroll-marker-group {
                    position: absolute;
                    position-anchor: --my-carousel;
                    top: calc(anchor(bottom) + 9px);
                    justify-self: anchor-center;

                    display: flex;
                    justify-content: center;
                    gap: 4px;
                }
                */
                li {

                    list-style-type: none;
                    position: relative;
                    flex: 0 0 100%;
                    scroll-snap-align: center;
                    /*
                    &::scroll-marker {
                        content: "";
                        width: 8px;
                        height: 8px;
                        background-color: transparent;
                        border: 2px solid var(--primary-color);
                        border-radius: 50%;
                    }
                    &::scroll-marker:target-current {
                        background-color: var(--primary-color);
                    }
                   */
                    &:hover {
                        .pagination {
                            opacity: 20%;
                        }
                    }

                    .pagination {
                        font-weight: bold;
                        position: absolute;
                        bottom: 0px;
                        left: 0px;
                        color: var(--primary-color);
                        padding: 2px 5px;
                        background-color: var(--bg-color);
                        border-top-right-radius: 3px;
                        opacity: 60%;
                        transition: opacity 1s;
                        pointer-events: none;

                    }

                    img {
                        width: 100%;
                        height: 100%;
                        object-fit: cover; /* or contain, fill, etc. */
                        cursor: default;

                    }
                    text-align: center;
                    video {
                        max-width: 100%;
                        max-height: 300px;
                    }

                    figcaption {
                        position: absolute;
                        top: 10px;
                        left: 10px;
                        width: 100%;

                        a, a:link, a:visited {
                            color: var(--fg-color);
                            background-color: var(--bg-color);
                            text-align: center;
                            border-radius: 5px;
                            padding: 0px 10px;
                            opacity: 50%;
                        }
                        a:hover, a:active {
                            opacity: 100%;
                        }
                    }
                }
            }
        }
    }
}


@media (max-width: 700px) {
    article {
        main {
            display: block;
        }
    }
}

.accordion {
    /* margin: 18px 0px; */
    overflow: hidden;
    .accordion-label {
        /*display: flex;
        align-items: center;
        align-content: center;
        padding: 1rem; */
        font-weight: bold;
        cursor: pointer;
        user-select: none;
        color: var(--primary-color);
        /*font-size: 1.2em;*/
    }
    .accordion-content {
        position: relative;
        max-height: 0;
        display: none;
    }

    input.accordion-toggle {
        position: absolute;
        opacity: 0;
        z-index: -1;


        &:checked ~ .accordion-label-closed {
            display: none;
        }
        &:not(:checked) ~ .accordion-label-closed {
            display: block;
        }

        &:checked ~ .accordion-label-open {
            display: block;
        }
        &:not(:checked) ~ .accordion-label-open {
            display: none;
        }


        &:checked ~ .accordion-content {

            padding-top: 1em;
            display: block;
            max-height: 10000vh;
        }
    }
    .toggle-indicator {
        text-align: center;
    }
}

a.contact {
    font-size: 1.5em;
    text-align: center;
    display: block;
}
