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

:root {
    font: 1.2em/1.4 Arial, Helvetica, sans-serif;
}

.container {
    max-width: 80rem;
    margin-inline: auto;
    padding-inline: 1rem;
}

body {
    padding: 0 0 1em;
}

header {
    background-color: #333;
    color: #fff;
    border: 5px solid #000;
}

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

header a {
    color: #fff;
    text-decoration: none;
    display: block;
    padding: 0.5em 1em;
    border-top: 1px solid #999;


}

header .title {
    font-size: 150%;
    font-style: italic;
    font-weight: bold;
    padding: 1em;
}

main {
    padding: 0 1em;

}

.cards {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cards li {
    border: 5px solid #000;
    margin-bottom: 1em;
}

.cards h2 {
    background-color: #333;
    color: #fff;
    margin: 0;
    padding: 0.5em 1em;
}

.cards .inner {
    padding: 0.5em 1em;
    max-width: 20em;
}

.sidebar {
    background-color: #333;
    border: 5px solid #000;
    padding: 0.5em 1em;
    color: #fff;

    :not(.overlay-link) {
        display: flex;
        justify-content: flex-end;
    }

}

@media(min-width: 40em) {
    header {
        display: flex;
        justify-content: space-between;
        align-items: center;

        ul {
            display: flex;
        }

        a {
            border-block-start: 0;
        }
    }

    .cards {

        display: flex;
        flex-wrap: wrap;
        gap: 1rem;
    }

    main {
        display: flex;
        gap: 1rem;
    }

    aside {
        margin-block-start: 1rem;

    }
}