*,
::before,
::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.2rem;
    background-color: #ffe7b3;
}

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

main {
    width: 30em;
    margin: 0 auto;
    padding-bottom: 2rem;
}

h1 {
    margin-bottom: 2rem;
    margin-top: 2rem;
    font-size: 2.4rem;
    text-align: center;
}

a.button,
button {
    cursor: pointer;
    display: inline-block;
    padding: 0.8rem;
    font-size: 1.2rem;
    font-weight: bold;
    background: none;

    text-decoration: none;
    border-radius: 8px;

    &:hover {
        box-shadow: inset 0px -0.2em 0px currentColor;
    }
}

button {
    border: 2px solid #000;
}

a {
    color: #912222;
}

a.button {
    border: 2px solid #912222;

}

a:not(.button) {
    display: inline;
    text-decoration: none;
    box-shadow: inset 0px -0.1em 0px currentColor;

    &:hover {
        box-shadow: inset 0px -0.2em 0px currentColor;
    }
}

svg.icon {
    width: 1em;
    height: 1em;
    margin-bottom: -.15em;
}

.error {
    background: #a20000;
    color: white;
    margin: 0;
    margin-bottom: 1rem;
    padding: .25rem;
    margin-bottom: 1rem;
    font-size: .9em;
}

.error::before {
    content: '';
    width: 1em;
    height: 1em;
    background-color: currentColor;
    mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-exclamation-triangle' viewBox='0 0 16 16'><path d='M7.938 2.016A.13.13 0 0 1 8.002 2a.13.13 0 0 1 .063.016.15.15 0 0 1 .054.057l6.857 11.667c.036.06.035.124.002.183a.2.2 0 0 1-.054.06.1.1 0 0 1-.066.017H1.146a.1.1 0 0 1-.066-.017.2.2 0 0 1-.054-.06.18.18 0 0 1 .002-.183L7.884 2.073a.15.15 0 0 1 .054-.057m1.044-.45a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767z'/><path d='M7.002 12a1 1 0 1 1 2 0 1 1 0 0 1-2 0M7.1 5.995a.905.905 0 1 1 1.8 0l-.35 3.507a.552.552 0 0 1-1.1 0z'/></svg>");
    display: inline-block;
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: cover;
    margin-right: .25em;
    margin-bottom: -.05em;
}

div:has(label) {
    margin-bottom: 1rem;

    .error {
        margin: 0;
    }
}

label,
dt {
    display: block;
    font-weight: bold;
    font-size: 1rem;
    margin: 0;
}

dd {
    margin-bottom: 1rem;
    margin-left: 0;
}

input[type="email"],
input[type="password"],
textarea {
    width: 100%;
    padding: 0.5rem;
    font-family: inherit;
    font-size: 1.2rem;
}

textarea {
    resize: vertical;
    field-sizing: content;
}

input[type="checkbox"] {
    width: 1.2rem;
    height: 1.2em;
    margin: 0;
    margin-right: .5rem;
}

.action {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 1rem;
    gap: 1rem;
}

header {
    padding-right: 2rem;
    padding-left: 2rem;
    border-bottom: 1px solid #4d4646;

    ul {
        justify-content: flex-end;

        li:first-of-type {
            flex: 1;
        }
    }
}

nav {
    width: 100%;
    display: flex;
    padding: 1rem 0;
    gap: 2rem;

    ul {
        margin: 0;
        padding: 0;
        display: flex;
        flex: 1;
        gap: 2rem;
        align-items: baseline;

        li {
            list-style: none;
        }
    }
}

main nav ul {
    justify-content: center;
}

ul.list-items,
ol.list-items {
    padding: 0;

    li {
        list-style: none;
        padding: 1em;
        gap: 1em;
        display: flex;
        position: relative;

        &:not(:last-child) {
            border-bottom: 1px solid black;
        }

        > :first-child {
            flex: 1;
        }
    }
}

.badges {
    display: flex;
    gap: .5rem;
}

.badge {
    display: inline-block;
    border: 2px solid #912222;
    border-radius: .3em;
    padding: .1em .5em;
    color: #912222;
}

section.settings {
    padding: 2rem 1rem;
    background: white;
    border-radius: 1rem;

    h2 {
        text-align: center;
        margin-top: 0;
    }
}

section.settings+section.settings {
    margin-top: 3rem;
}
