/* 60-30-10 rule */
:root {
    --background-color: #fff;
    --accent: rgb(0, 250, 217);
    --text-color: #444
}
*, *::after, *::before {
    box-sizing: border-box;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    margin: 0
}
@supports (text-wrap: pretty) {
    *, *::after, *::before {
        text-wrap: pretty
    }
}
html {
    font-size: 16px;
    scroll-behavior: smooth
}
@supports (scrollbar-gutter: stable) {
    html {
        scrollbar-gutter: stable
    }
}
body, main {
    max-width: 100%;
    min-height: 100vh
}
@supports (min-height: 100svh) {
    body, main {
        min-height: 100svh
    }
}
body, body * {
    background-color: var(--background-color);
    color: var(--text-color)
}
header h1, footer {
    text-align: center
}
header h1 {
    border-bottom: 0.25rem solid var(--background-color);
    font-size: 40px
}
h2 {
    font-size: 32px
}
h3 {
    font-size: 24px
}
@supports (text-wrap: balance) {
    header h1, h2, h3 {
        text-wrap: balance
    }
}
.spaced-bottom {
    margin-bottom: 2rem
}
.spaced-top {
    margin-top: 2rem
}
.spaced-top-bottom {
    margin: 2rem 0
}
main section:not(:last-child) {
    margin-bottom: 10rem
}
main section h2 {
    margin-top: 6rem
}
main section h3 {
    margin-top: 3rem
}
main section img {
    height: 300px;
    width: 300px
}
button {
    border-color: var(--background-color);
    transition: filter box-shadow 500ms cubic-bezier(0.075, 0.82, 0.165, 1);
    &:hover, &:focus {
        box-shadow: 0 0 0.25rem 0;
        filter: brightness(1.2)
    }
}
button, main section#countdowns span#date-clock-result {
    background-color: var(--accent)
}
main section#countdowns span#date-clock-result {
    border: 0.1rem solid var(--background-color)
}
@media (prefers-color-scheme: dark) {
    /* 60-30-10 rule, flipped bg with fg, and changed accent for WCAG compliance */
    :root {
        --background-color: #444;
        --accent: rgb(180, 0, 0);
        --text-color: #fff
    }
    body, body * {
        background-color: var(--background-color);
        color: var(--text-color)
    }
    header h1 {
        border-color: var(--text-color)
    }
    button {
        border-color: var(--text-color);
        &:hover, &:focus {
            filter: brightness(0.8)
        }
    }
    button, main section#countdowns span#date-clock-result {
        background-color: var(--accent)
    }
}