* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-family: Nunito, Arial, Sans-Serif;
    font-size: 18px;
    width: 100%;
    max-width: 700px;
    background-color: #F7F1E8;
    color: #2E261C;
}
body {
    padding: 0 .5rem;
    font-size: 18px;
}
header {
    padding-bottom: 3rem;
    font-family: Playwrite US Trad, Arial, Sans-Serif;
}
.site-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding-top: 0.25rem;
}
.site-nav button {
    display: flex;
    padding: 0.25rem;
}
.site-nav__search{
    display: flex;
    padding: 0.25rem;
}
main {
    padding: 1rem;
    background-color: #FFF9F1;
    border-style: solid;
    border-width: 2px;
    border-color: #888;
    border-radius: 30px;
}
.mainbuttons {
    font-family: Nunito, Arial, Sans-Serif;
    background-color: #8b5E34;
    color: #FFF9F1;
    border-style: none;
    border-radius: 10px;
    padding: .5em 1em;
    font-size: 18px;
}
.mainbuttons:hover {
    background-color: #A8570C;
    color: #FFF 
}
.mainButtonAdjustments {
    padding-top: 1rem;
    gap: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
}
input[type=number][size] {
    width: calc(attr(size number) * 1ch + 2rem);
}
h1 {
    font-size: 32px;
    font-family: Playwrite US Trad, Arial, Sans-Serif;
    color: #A8570C;
}
h2 {
    padding-bottom: 2rem;
    font-size: 32px;
    color: #A8570C;
    font-family: Playwrite US Trad, Arial, Sans-Serif;
}
h3 {
    font-size: 23px;
    color: #A8570C;
    font-family: Playwrite US Trad, Arial, Sans-Serif;
}
.login-form {
    font-size: 23px;
}
ul {
    list-style-type: none;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}
li {
    padding: 0.25rem
}
ol {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    padding-left: 1rem;
    flex-direction: column;
}
.recipe {
    display: flex;
    padding-top: 2rem;
    padding-left: 1rem;
    text-indent: -1rem;
    line-height: 1.25;
}
ul.recipe {
    align-items: flex-start;
    list-style-type: none;
    display: flex;
    flex-direction: column;
}
dt {
    font-weight: 600;
}
a {
    color: #8b5E34;
    padding: 0 1rem;
    text-decoration: none;
}
a:hover {
    color: #A8570C;
    text-decoration: underline;
}
.rotate {
    transform: rotate(2deg);
    border-style: solid;
    border-width: 3px;
    border-color: #FFF;
    border-radius: 5px;
    display: flex;
    padding-bottom: .5rem;
    width: 100%;
    height: 100%;
}
p {
    font-family: Nunito, Arial, Sans-Serif;
}
.underbordered {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    align-items: baseline;
    border-bottom: 2px solid #A8570C;
}
dl.prep {
    display: flex;
    column-gap: 0.5rem;
    flex-wrap: wrap;
    row-gap: 0.25rem;
}
dl.prep dt {
    width: calc(25% - 0.25rem);
}
dl.prep dd {
    width : calc(75% - 0.25rem);
}

.underbordered p {
    align-items: flex-end;
}
.underbordered a {
    align-items: flex-end;
}
.horizontal {
    display: flex;
    align-items: baseline;
}
.visually-hidden {
    display: none
}
.gridview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding: 0 1rem;
    align-items: flex-start;
}
.gridview .card {
    background: #FFF;
    border-radius: 8px;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
}
.gridview .card img {
    max-width: 100%;
    height: auto;
}
.card ul{
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
    line-height: 1;
}
.searchbox {
    width: 100%;
}
.searchbox input {
    width: 100%;
    padding: 0.25rem;
}
.usermeta {
    display: flex;
    align-items: flex-start;
}
.usermeta h2 {
    padding-bottom: 0rem;
}
.usermeta-text {
    display: flex;
    flex-direction: column;
    padding-bottom: 2rem;
}
.usermeta-details {
    display: flex;
}
.usermeta img {
    margin-left: auto;
    width: 5rem;
    height: 5rem;
    object-fit: cover;
}
.recipe-layout {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 0 1rem;
    align-items: flex-start;
}
.recipe-layout p {
    max-width: 100%;
}
/* only affect h2 when directly followed by .meta */
h2:has(+ .meta),
h2 + .meta { /* keep fallback for older UAs */
    margin-block-end: 0;
    padding-block-end: 0;
}

/* meta container: stacked, tight line-height, make children stretch full width */
.meta {
    display: flex;
    flex-direction: column;
    line-height: 1;
}
.meta p,
.meta ul,
.meta li {
    margin: 0;
    padding: 0;
    line-height: 1;
}
.meta ul {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}
.meta a {
    padding: 0;
}
.split {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1rem;
}
.split .recipe {
    padding-top: 0;
}
.column{
    display: flex;
    flex-direction: column;
    padding-bottom: 1rem;
    align-items: baseline;
}
.column input {
    width: 80%;
    align-content: flex-end;
    padding: 0.25rem;
}
.loginbutton {
    display: block;
    margin: 0 auto;
    min-width: 200px;
    width: 50%;
}

.SaveEdit {
    display: flex;
    flex-direction:row;
    justify-content: space-between;
}
textarea {
    resize: vertical;
    flex-grow: 1;
}
.StepDescription {
    vertical-align: top;
}
.RecipeTitle {
    font-size: 32px;
    color: #A8570C;
    font-family: Playwrite US Trad, Arial, Sans-Serif;
}
.EditIngredientsList {
    text-indent: 1rem;
}
.EditIngredients {
    display: flex;
    flex-direction: row;
    padding-top:0.125rem;
    padding-bottom: 0.125rem;
}
.EditSteps{
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

@media (max-width: 700px) {
    .column {
        display: flex;
        flex-direction: column;
        gap: 0;
    }
    .column + .column {
        margin-top: 1rem;
    }
}
@media (max-width: 600px) {
    .gridview {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 500px) {
    .page {
        display: flex;
        flex-direction: column;
        gap: 2rem;
        padding: 0;
    }

    .page-header {
        padding: 0.5rem;
    }
}
@media (max-width: 400px) {
    .gridview {
        grid-template-columns: repeat(1, 1fr);
    }
}