html {
    font-family: system-ui;
    max-height: 100dvh;
}

button {
    background-color: transparent;
    border: 1px solid lightgray;
    border-radius: 2px;
    font: inherit;
}

body {
    display: grid;
    grid-template-rows: 1fr min-content;
    height: 100dvh;
    margin: 0;

    #spectrum {
        background: linear-gradient(to top, pink, hotpink);
        display: grid;
        font-size: 2rem;
        grid-template-rows: 1fr 1fr;
        position: relative;

        #from,
        #to {
            align-items: center;
            display: flex;
            padding: 2rem;
            padding-right: 3.5rem;
        }

        #from {
            align-items: start;
        }

        #to {
            align-items: end;
        }

        #numbers {
            display: flex;
            flex-direction: column;
            position: absolute;
            top: 0;
            right: 0;
            bottom: 0;
            align-items: end;
            justify-content: space-between;

            span {
                color: hsla(0, 0%, 0%, 0.35);
                padding: 3px 6px;
            }
        }

        #indicator {
            align-items: center;
            display: flex;
            position: absolute;
            right: 0;
            top: 50%;
            transform: translateY(-50%);
            z-index: 1;

            span {
                align-items: center;
                background-color: black;
                display: flex;
                color: white;
                height: 40px;
                padding-inline-start: 6px;
                padding-inline-end: 3px;
            }

            &::after {
                content: '';
                width: 0px;
                height: 0px;
                border-style: solid;
                border-width: 20px 0 20px 10px;
                border-color: transparent transparent transparent black;
                transform: rotate(0deg);
            }
        }
    }

    #menu {
        background-color: black;
        display: grid;
        grid-template-columns: repeat(5, 1fr);

        button {
            background-color: transparent;
            border: none;
            color: white;
            padding: 1rem 0;

            &:not(:last-child) {
                border-inline-end: 1px solid hsla(0, 0%, 100%, 0.25);
            }
        }
    }
}

dialog {
    box-shadow: 0 0.5rem 1.5rem hsla(0, 0%, 0%, 0.4);
    border: 0;
    gap: 0.5rem;
    grid-template-rows: max-content 1fr;
    line-height: 1.4;
    max-height: 70dvh;
    max-width: 80vw;
    padding: 1.5rem;

    &>* {
        margin-block: 0;
    }

    &[open] {
        display: grid;
    }

    button:first-child {
        justify-self: end;
    }

    ul {
        list-style-type: none;
        padding: 0;

        li+li {
            margin-block-start: 0.5rem;
        }

        button {
            text-align: start;

            &:not(:is(:hover, :focus)) {
                border: none;
            }
        }
    }

    &::backdrop {
        background-color: hsla(0, 0%, 0%, 0.3);
    }

    &#spectrums {
        ul {
            overflow-y: auto;
        }
    }

    &#onboarding {
        .title {
            font-weight: bold;
            font-size: x-large;
            text-align: center;
        }

        .tagline {
            color: hsla(0, 0%, 0%, 0.6);
            margin-block-end: 1rem;
            text-align: center;
        }

        .fake-sub-heading {
            font-size: large;
            font-weight: bold;
            margin-block-start: 1rem;
        }

        button {
            background-color: pink;
            border-color: hotpink;
            font-size: large;
            margin-block-start: 1rem;
        }
    }
}

.visually-hidden {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}