.lead {
    box-sizing: border-box;
    padding: 2em;
}

.comparison-table {
    thead {
        opacity: 0.6;
    }

    tbody th {
        font-weight: normal;
        opacity: 0.6;
    }

    td {
        position: relative;
        padding-inline-start: 2.5em;
        border-inline-start: 0.5em solid var(--color-bg);

        &[title] {
            cursor: help;

            /* &::before {
                float: inline-end;
                content: "";
                padding: 0 0.3em;
                opacity: 0.2;
            } */
        }

        &::after {
            display: block;
            float: inline-start;
            width: 1.5em;
            text-align: center;
            font-weight: 600;
            font-size: 1.5em;
            margin-inline-end: 0.2em;
            position: absolute;
            inset-inline-start: 0%;
            transform: translateY(-50%);
            inset-block-start: 50%;
        }

        &[data-check] {
            background-color: color-mix(in srgb, var(--color-check) 20%, transparent);
            &::after {
                content: var(--icon-check);
                color: var(--color-check);
            }           
        }

        &[data-check="yes"] {
            --icon-check: "✓";
            --color-check: rgb(17, 123, 17);
        }
        &[data-check="no"], 
        &[data-check="optional"] {
            --icon-check: "✗";
            --color-check: darkred;
        }
        &[data-check="limited"] {
            --icon-check: "？";
            --color-check: rgb(162, 107, 41);
        }
    }
}

@media (max-width: 800px) {
    .comparison-table { 
        thead { display: none; }
        tbody { display: block; }
        tbody tr { 
            display: flex;
            flex-direction: column; 
            margin-bottom: 1em; 
            padding: 0.75em; 
            border: 1px solid color-mix(in srgb, var(--color-primary) 12%, transparent);
            
            & td {
                &[data-check]::before {
                    content: attr(data-label);
                    display: block;
                    font-weight: 600;
                    font-size: 0.75em;
                    text-transform: uppercase;
                    letter-spacing: 0.03em;
                    margin-bottom: 0.15em;
                    opacity: 0.4;
                    float: none;
                }

                &[data-check]::after {
                    content: attr(title);
                    display: block;
                    font-size: 0.75em;
                    opacity: 0.4;
                    float: none;
                    position: static;
                    width: auto;
                    text-align: start;
                    transform: none;
                    color: inherit;
                }
            }
        }
    }
}