html {
    font-size: 18px;
    display: flex;
    justify-content: center;
}

body {
    font-family: "Nunito", sans-serif;
    font-size: 18px;
    line-height: 1.25;
    background-color: #F7F1E8;
    display: flex;
    flex-direction: column;
    max-width: 700px;
    width: 100%;
    padding: 0 0.5rem;
    margin: 0;
    gap: 1rem;
}

p {
    color: #2e261c;
}

strong {
    font-weight: bold;
}

dt {
    font-weight: 600;
}

ul {
    list-style-type: none;
}

a {
    color: #8b5e34;
    text-decoration: none;
    gap: 1rem;
}

a:hover {
    color: #a8570c;
    text-decoration: underline;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Playwrite US Trad", cursive;
    color: #a8570c;
}

h1 {
    font-size: 32.4px;
}

h2,
h3,
h4,
h5,
h6 {
    font-size: 22.5px;
}

main {
    border-width: 2px;
    border-radius: 20px;
    border-style: solid;
    border-color: #2e261c;
    background-color: #fff9f1;
    box-shadow: inset;
    border-bottom: none;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
}

.page-header {
    display: flex;
    flex-direction: column;
    padding-bottom: 3rem;
}

.header-title-and-profile {
    border-bottom: 2px solid #8b5e34;
    display: flex;
    justify-content: space-between;
    align-items: end;
    padding-bottom: .25rem;
}

.header-links nav {
    display: flex;
    justify-content: space-between;
    padding-top: .25rem;
}

.header-links ul {
    display: flex;
    flex-direction: row;
    gap: 1rem;
}

.main-page-buttons {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 1rem;
    padding-bottom: 2rem;
}

.recipe-cards {
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    width: 100%;
    gap: 1rem;
}

.recipe-cards>li {
    border-radius: 10px;
    background-color: #fff;
    box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.4);
    gap: 1rem;
    padding: 0.5rem;
}

.recipe-cards h3 {
    font-size: 18px;
}

.recipe-cards img {
    width: 100%;
    height: auto;
}

.recipe-header {
    display: flex;
    flex-direction: column;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.recipe-header h1 {
    padding-bottom: 0.5rem;
    position: relative;
}

.recipe-header h1 button,
.recipe-header h1 .save-button,
.recipe-header .save-button {
    position: absolute;
    right: 0;
    top: 0;
}

.recipe-header h1 input[type="text"] {
    font-family: "Playwrite US Trad", cursive;
    font-size: 2.5rem;
}

.recipe-header ul {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0 0.5rem;
}

.recipe-facts {
    display: flex;
    flex-direction: row;
}

.recipe-facts-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.recipe-facts-info img {
    max-width: 100%;
    height: auto;
    padding-right: 1rem;
    padding-bottom: 0.5rem;
}

.recipe-facts-description {
    display: flex;
    flex-direction: column;
}

.recipe-facts dl {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.recipe-facts dt {
    width: calc(25% - 0.5rem);
    padding-right: 0.5rem;
}

.recipe-facts dd {
    width: calc(75% - 0.5rem);
    padding-left: 0.5rem;
}

.recipe-steps-and-ingredients {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    width: 100%;
}

.recipe-steps-and-ingredients h2 {
    padding: .5rem;
}

.recipe-ingredients {
    text-indent: -1rem;
    width: 40%;
    padding: 0 2rem 0 1rem;
}

.recipe-steps {
    padding-left: 1em;
    width: 60%;
}

.recipe-row {
    display: flex;
    flex-direction: row;
    gap: 1rem;
}

.steps {
    padding-left: 1.5rem;
}

.steps li {
    margin-bottom: 1rem;
}

.step-item {
    padding-bottom: 1rem;
}

.steps .ingredients {
    list-style-type: disc;
    margin-left: 2rem;
    margin-top: 0.5rem;
    padding-left: 1rem;
}

.steps .ingredients li {
    margin-bottom: 0.25rem;
    padding: 0.25rem 0;
}

.ingredient-boxes {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.ingredient-list {
    display: flex;
    flex-direction: row;
}

.ingredient-boxes input[type="number"],
.ingredient-boxes input[type="text"] {
    padding: 0.25rem;
}

textarea {
    width: 100%;
    resize: vertical;
    vertical-align: top;
    font-family: "Nunito", sans-serif;
}

.recipe-title-input {
    font-family: "Playwrite US Trad", cursive;
    font-size: 2.5rem;
    border: none;
    padding: 0;
}

.login-form {
    display: flex;
    flex-direction: row;
}

.login-form input {
    width: 80%;
    justify-content: end;
    padding: 0.25rem;
    align-items: baseline;
}

.login-form button {
    align-items: baseline;
    width: 80%;
    min-width: 200px;
}

.login-form input,
.login-form label,
.login-form button {
    font-size: 22.5px;
}

.search-section {
    padding: 0.25rem;
}

.search-section input {
    width: 100%;
}

.search-section button {
    display: none;
}

.profile-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.profile-header h1 {
    padding: 0.5rem 0;
}

.profile-header img {
    width: 5rem;
    height: 5rem;
}

.visually-hidden {
    display: none;
}

#sign-in-link,
#browse-recipes-link {
    color: #F7F1E8;
    border-width: 0.5px;
    border-style: solid;
    background-color: #8b5e34;
    padding: .5em 1em;
    border-radius: 20px;
}

#sign-in-link:hover,
#browse-recipes-link:hover {
    color: #fff9f1;
    border-width: 0.5px;
    border-style: solid;
    background-color: #a8570c;
    padding: .5em 1em;
    border-radius: 20px;
}

#recipe-picture {
    transform: rotate(2deg);
    border-width: 5px;
    border-color: #fff;
    border-radius: 3px;
}

.steps .ingredients {
    list-style-type: disc;
    margin-left: 2rem;
    padding-left: 1rem;
}

.steps .ingredients li.ingredient-item {
    display: flex; 
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

@media (max-width: 500px) {
    .recipe-row {
        flex-direction: column;
        gap: 2rem;
    }

    main {
        padding: 0;
        border-left: none;
        border-right: none;
    }

    .recipe-header {
        padding: 0.5rem;
    }
}

@media (max-width: 700px) {
    .login-form {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}