body {
    font-family: sans-serif;
    line-height: 1.5em;
    color: hsl(0, 0%, 10%);
    background-color: hsl(0, 0%, 98%);
    margin: 0 auto;
    padding: 3em;
    max-width: 60em;
}

header {
    padding: 0 0 1.5em;
    border-bottom: 2px solid hsl(0, 0%, 90%);
}

header h1 {
    font-size: 1.125em;
    margin: 0;
}

header h2 {
    font-size: 0.875em;
    font-weight: normal;
    color: hsl(0, 0%, 40%);
    margin: 0;
}

p {
    margin: 1.5em 0;
}

fieldset {
    margin: 3em 0;
    padding: 0;
    border: 0;
}

fieldset legend {
    padding: 0;
    margin-bottom: 1.5em;
}

fieldset p {
    margin: 0;
}

fieldset label {
    display: block;
    padding: 1.5em;
    border: solid hsl(0, 0%, 90%);
    border-width: 1px 1px 0;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

fieldset p:last-child label {
    border-bottom-width: 2px;
}

fieldset label:hover {
    background-color: hsl(0, 0%, 95%);
}

button {
    border: solid hsl(220, 100%, 20%);
    border-width: 1px 1px 2px;
    margin: 0;
    padding: 1.5em;
    background: hsl(220, 80%, 40%);
    color: hsl(0, 0%, 98%);
    font: inherit;
    font-weight: bold;
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
    opacity: 30%;
}

button:hover,
button:focus {
    background-color: hsl(220, 80%, 35%);
}

@media (max-width: 480px) {
    body {
        padding: 1.5em;
    }

    fieldset label {
        font-size: 0.875em;
        padding: 0.57143em;
    }
}

@media (min-width: 800px) {
    fieldset div {
        display: flex;
    }

    fieldset p {
        width: 25%;
    }

    fieldset label {
        border-width: 1px 0 2px 1px;
        text-align: center;
    }
    
    fieldset p:last-child label {
        border-right-width: 1px;
    }
}