body {
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    line-height: 1.6;
    max-width: 40rem;
    margin: 0 auto;
    padding: 2rem 1rem;
}

check-box.disabled {
    opacity: 0.4;
}

check-box.disabled label {
        cursor: not-allowed;
    }

h1 {
    margin-bottom: 1rem;
    border-bottom: 2px solid;
}

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

li {
    margin-bottom: 0.5rem;
}
:root {
    --primary-accent: black;
    --primary-highlight: #00bbcb;
}

/**
 * Don't show until JavaScript is instantiated
 */
check-box:not(:defined) {
    display: none;
}

check-box {
    display: block;
}

label.checkbox-label {
    display: grid;
    gap: 1em;
    align-items: center;
    font-size: 2rem;
    grid-template-columns: 1rem auto;
    cursor: pointer;
    width: fit-content;
}

label.checkbox-label input {
        border-radius: 0;
    }

label.checkbox-label span {
        font-size: 1.2rem;
        margin-bottom: 0.2em;
    }

:is(label.checkbox-label:focus,label.checkbox-label:focus-within) input[type="checkbox"] {
            outline-color: var(--primary-accent);
            border-color: var(--primary-accent);
            outline-offset: 2px;
        }

input[type="checkbox"] {
    appearance: none;
    background-color: #fff;
    margin: 0;
    font: inherit;
    color: currentcolor;
    width: 1.15em;
    height: 1.15em;
    border: 2px solid currentcolor;
    transform: translateY(-0.075em);
    position: relative;
    cursor: pointer;
    transition: none;
}

input[type="checkbox"]::before {
        content: '';
        position: absolute;
        background: var(--primary-accent);
        width: 5px;
        height: 25px;
        top: 50%;
        left: 50%;
        transition: transform 150ms;
        transform-origin: center;
        transform: translate(-50%, -50%) rotate(45deg) scale(0);
    }

input[type="checkbox"]::after {
        content: '';
        position: absolute;
        background: var(--primary-accent);
        width: 5px;
        height: 25px;
        top: 50%;
        left: 50%;
        transition: transform 150ms;
        transform-origin: center;
        transform: translate(-50%, -50%) rotate(-45deg) scale(0);
    }

input[type="checkbox"]:checked::before {
        transform: translate(-50%, -50%) rotate(45deg) scale(1);
    }

input[type="checkbox"]:checked::after {
        transform: translate(-50%, -50%) rotate(-45deg) scale(1);
    }

/* Remove focus ring and border change only when clicking with mouse */

input[type="checkbox"]:focus:not(:focus-visible) {
        outline: none;
        border-color: currentcolor;
    }

/* Keep focus ring for keyboard navigation */

input[type="checkbox"]:focus-visible {
        outline: 2px solid var(--primary-highlight);
        outline-offset: 2px;
    }
