* {
    box-sizing: border-box;
}

html {
    background: whitesmoke;
}

body {
    max-width: 700px;
    margin: 0 auto;
    padding: 1rem 1.25rem 2rem;
    background: white;
    color: black;
    font-family: Arial, sans-serif;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

h1,
h2,
h3,
p,
ul,
ol {
    margin-top: 0;
}

header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid lightgray;
}

.top,
.nav,
.recipes,
.recipes-list,
.cards-area,
.search-block,
.profile-intro,
.recipe-top,
.recipe-info,
.recipe-columns,
.login-form,
.comments-section {
    margin-bottom: 1rem;
}

.top,
.nav,
.search-block,
.profile-intro,
.recipe-top,
.recipe-info,
.recipe-columns,
.login-form,
.recipe-card,
.comments-section {
    padding: 1rem;
    border: 1px solid lightgray;
    background: snow;
}

.recipe-card {
    margin-bottom: 1rem;
}

.recipe-card h2,
.recipe-card-description {
    margin-bottom: 0;
}

.recipe-box,
.card {
    margin-bottom: 1rem;
}

.top,
.nav,
.profile-intro,
.recipe-top,
.recipe-info,
.recipe-columns,
.recipes,
.recipes-list,
.cards-area,
.comments-list {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.top {
    justify-content: space-between;
    align-items: center;
}

.recipe-card,
.recipe-column,
.profile-intro-block,
.recipe-top-main,
.recipe-photo,
.recipe-info-item {
    flex: 1 1 200px;
    min-width: 0;
}

.comment-form,
.comment-item {
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid lightgray;
    background: white;
}

.comments-list {
    flex-direction: column;
}

.comment-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.comment-form textarea {
    width: 100%;
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    border: 1px solid lightgray;
    font: inherit;
    resize: vertical;
}

.comment-meta {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.comment-body,
.comment-empty-message,
.comment-signin-message,
.comment-form-message {
    margin-bottom: 0;
}

.comment-form-message {
    margin-top: 0.75rem;
    color: darkgreen;
}

.comment-form-message.error {
    color: darkred;
}

.recipe-top {
    align-items: flex-start;
}

.recipe-author,
.recipe-tags {
    margin-bottom: 1rem;
}

.recipe-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.recipe-tag {
    padding: 0.25rem 0.5rem;
    border: 1px solid lightgray;
    background: whitesmoke;
}

.recipe-info-item {
    padding: 0.75rem;
    border: 1px solid lightgray;
    background: white;
}

.recipe-column {
    padding: 1rem;
    border: 1px solid lightgray;
    background: white;
}

.recipe-column-title {
    margin-bottom: 0.75rem;
}

.ingredient-list,
.step-list {
    margin-bottom: 0;
    padding-left: 1.25rem;
}

.ingredient-list li,
.step-list li {
    margin-bottom: 0.5rem;
}

.recipe-info-label {
    margin-bottom: 0.35rem;
    font-weight: bold;
}

.recipe-info-value {
    margin-bottom: 0;
}

img {
    max-width: 100%;
    height: auto;
}

input,
button {
    max-width: 100%;
}

@media (max-width: 600px) {
    body {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .top,
    .nav {
        flex-direction: column;
        align-items: flex-start;
    }

    .recipe-photo,
    .profile-intro-block {
        flex-basis: 100%;
    }

    .recipe-card,
    .recipe-column,
    .recipe-top-main,
    .recipe-info-item {
        flex-basis: 100%;
    }
}
