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;
        }

check-box label {
        font-size: 2rem;
    }

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

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

li {
    margin-bottom: 0.5rem;
}
/**
 * Don't show until JavaScript is ready
 */
check-box:not(:defined) {
    visibility: hidden;
}

check-box {
    display: block;
}

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

:is(check-box label.checkbox-label) span {
            margin-bottom: 0.2em;
        }

check-box input[type="checkbox"] {
        appearance: none;
        background-color: var(--substrate-surface, #fff);
        border-radius: var(--substrate-radius, 0);
        margin: 0;
        font: inherit;
        color: currentcolor;
        width: 1.15em;
        height: 1.15em;
        border: 2px solid var(--substrate-border, currentcolor);
        transform: translateY(-0.075em);
        position: relative;
        cursor: pointer;
        transition: all 0.2s;
        outline: var(--substrate-focus-width, 2px) solid transparent;
        outline-offset: 2px;
    }

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

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

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

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

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

:is(check-box input[type="checkbox"]):focus:not(:focus-visible) {
            outline-color: transparent;
            border-color: var(--substrate-border, currentcolor);
        }

/* Keep focus ring for keyboard navigation */

:is(check-box input[type="checkbox"]):focus,:is(check-box input[type="checkbox"]):focus-visible {
            outline: var(--substrate-focus-width, 2px) solid
                var(--substrate-focus, currentcolor);
            outline-offset: 2px;
        }
