* {
    box-sizing: border-box;
}

body {
    width: 100%;
    margin: 0;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #f7f7f7;
    color: #222222;
    font-family: Arial, sans-serif;
}

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

:is(
    header,
    .search-block,
    .cards-area,
    .recipes,
    .recipes-list,
    .recipe-columns,
    .profile-intro,
    .login-form,
    .page,
    .recipe-page
) {
    width: 100%;
    max-width: 700px;
}

:is(.top, .nav, .account-links) {
    display: flex;
    align-items: center;
    gap: 16px;
}

.top {
    justify-content: space-between;
    flex-wrap: wrap;
}

.account-links {
    flex-wrap: wrap;
}

:is(.cards-area, .recipes, .recipes-list, .recipe-columns) {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.card,
.recipe-columns > * {
    width: 100%;
}

:is(.search-block form, .profile-intro, .login-form) {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.5rem;
}

.recipe-hero {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recipe-author,
.recipe-description {
    margin: 0;
}

.recipe-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.recipe-tag {
    padding: 4px 10px;
    border-radius: 999px;
    background-color: #e8f0fb;
    color: #1d4f8c;
    font-size: 0.9rem;
}

.recipe-photo {
    width: 100%;
    border-radius: 8px;
}

.recipe-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
}

.recipe-meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    border-radius: 8px;
    background-color: #f1f5fa;
}

:is(.recipe-columns ul, .recipe-columns ol) {
    margin: 0;
    padding-left: 20px;
}

.recipe-columns li + li {
    margin-top: 8px;
}

.recipe-box {
    width: 100%;
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid #2f6db3;
    background-color: #ffffff;
    border-radius: 8px;
}

.recipe-rating-summary {
    margin: 0 0 12px 0;
    font-weight: 600;
}

.rating-feedback {
    min-height: 20px;
    margin: 0;
    color: #1d4f8c;
    font-weight: 600;
}

a {
    color: #2f6db3;
}

@media (max-width: 700px) {
    body {
        padding: 12px;
    }

    :is(.top, .nav, .account-links) {
        width: 100%;
    }
}

@media (min-width: 700px) {
    :is(.cards-area .card, .recipes .card, .recipes-list .card, .recipe-columns > *) {
        width: calc(50% - 8px);
    }
}