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

body {
    font-family: sans-serif;
    display: grid;
    grid-template-columns: minmax(auto, 1024px);
    justify-content: center;
    margin: 0 10px;
    background: #5d5d5d;
}

.wrapper {
    display: grid;
    gap: 20px;
    background: #e6e6e6;
}

header h1 {
    text-align: center;  
}

nav,
footer {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 10px;
    background: #a3e7c1;
}

nav a,
footer a {
    line-height: 2;
    padding: 0 1em;
    text-decoration: none;
}

a:hover {
    color: #6e1414;
    text-decoration: underline;
}

nav :first-child {
    margin-right: auto;
}

p,
li {
    max-width: 70ch;
    line-height: 1.8;
}

form p, 
form input[type=submit] {
    margin-left: 5px;
}

.error-parent {
    background: #f4adad;
}

.error {
    display: block;
    color: #58045d;
    font-weight: bold;
}

#jokes {
    list-style-type: none;
}

#jokes li {
    background: #f7f4f4;
    box-shadow: 0 3px 4px black;
    padding-left: 5px;
}

#jokes li .joke {
    color: #007e25;
}

#jokes li .joke p {
    font-size: 1.2em;
}

#map {
    height: 400px;
}

@media screen and (min-width: 768px) {
    .wrapper {
        grid-template-columns: repeat(6, 1fr);
    }

    header,
    nav,
    footer {
        grid-column: span 6;
        flex-direction: row;
    }
    
    main {
        grid-column: span 4;
    }
}