* { margin: 0; padding: 0; box-sizing: border-box; }

html { font-size: 18px; font-family: "Nunito", sans-serif; color: #2E261C; 
        display: flex; flex-direction: column; max-width: 700px; justify-content: center; flex-shrink: 1; padding: 0rem .5rem; margin-left: calc((100vw - 700px) / 2) }

header { border-bottom: solid; border-bottom-width: 3px; border-color: #8B5E34;
        display: flex; flex-direction: row; align-items: end; justify-content: space-between; }
h1, h2, h3 { font-family: "Playwrite US Trad", "cursive"; font-size: 125%; color: #A8570C;  }
body { background-color: #F7F1E8; 
        display: flex; flex-direction: column; max-width: 700px; justify-content: center; flex-shrink: 1; padding: 0rem .5rem; }
main { background-color: #FFF9F1; border: solid; border-color: #888; border-width: .5px; border-radius: 40px;
        display: flex; flex-direction: column; padding: 1rem; }

a { color: #8B5E34; text-decoration: none;}
a:hover { color: #A8570C; text-decoration: underline;}
ul { list-style-type: none; }
/* Doesn't work */
/* input[type=number][size] { width: calc(attr(size type(<number>)) * 1ch + 2rem); } */
div input { border-radius: 3px; border-width: 1px; height: 1.5rem; }
div input[type=number] { width: 3.25rem; padding: 1ch; }
div input[type=text] { padding: 1ch; }
output { color: red; }

.title { font-size: 180%; }
.loginTxt {font-size: 125%; }
.loginTxt form div { display: flex; flex-direction: row; gap: 1rem; align-items: baseline; }
.loginTxt form div input { width: 80%; justify-content: right; padding: .25rem; }
.loginTxt form button { width: 50%; justify-content: center; min-width: 200px; margin-top: 1rem; padding: .25rem; margin-left: 25%;}
#showpass { width: 15px; height: 15px; }

.info { font-weight: 600; }
.mainBttn { color: #F7F1E8; background-color: #8B5E34; padding: .5em 1em; border-radius: 15px; border: 0; font-size: 100%; }
.mainBttn:hover { color: #FFF9F1; background-color: #A8570C; }

.recipeSection { background-color: white; box-shadow: 0 2px 5px rgba(0,0,0,0.5); padding: .5rem; border-radius: 12px;
                 flex-wrap: wrap; align-content: top; max-width: calc(100%); height: fit-content; }
.recipeSection img { width: 100%; }
#recipeGrid { display: grid; grid-template-columns: calc(33.33% - .66rem) calc(33.33% - .66rem) calc(33.33% - .66rem); padding: 1rem 0; gap: 1rem; }

.recipe .recipeDesc { line-height: 1.25; }
.recipeDesc { display: flex; flex-direction: column; padding-bottom: 2rem; }
.recipePic { transform: rotate(2deg); border: solid; border-color: white; border-width: 5px 5px 5px 5px; border-radius: 3px;
            display: flex; margin-bottom: .5rem; width: 100%;}
#recipeInfo { display: flex; flex-direction: row; gap: .5rem; flex-wrap: wrap; line-height: 1.25rem; }
#recipeInfo dd { width: 60%; }
#recipeMetadata { display: flex; flex-direction: row; gap: 1.5rem; flex-wrap: wrap; row-gap: .5rem; }
#recipeMetadata ul { display: flex; flex-direction: row; gap: .5rem; align-items: center;}
.recipeIng { padding-left: 1rem; text-indent: -1rem; }
.recipeSteps { padding-left: 1em; }
#recipePicSplit { display: flex; flex-direction: row; gap: 1rem; padding: 2rem 0; }
#recipeInstruct { display: flex; flex-direction: row; gap: 1rem; }
#recipeLeft { display: flex; flex-direction: column; width: 33%; }
#recipeRight { display: flex; flex-direction: column; width: 66%; }
form .title { display: flex; flex-direction: row; justify-content: space-between; align-items: top;}
form .title button { height: fit-content; }
textarea { width: 100%; resize: vertical; }
.recipeSteps textarea { vertical-align: top; }
form .title input { font-family: "Playwrite US Trad", "cursive"; font-size: 125%; color: #A8570C; width: 90%; }
.recipeSteps ol { display: flex; flex-direction: column; }
.recipeSteps ul { list-style-type: circle; margin-left: 1rem; padding-bottom: 1rem; display: flex; flex-direction: column; }
.recipeSteps ul li { gap: .25rem; padding-top: 0.25rem; }
.ingredUnit { width: 5rem; }

.endHeader { display: flex; flex-direction: row; padding-bottom: 3rem; justify-content: space-between; padding-top: .25rem; }
.endHeader ul { display: flex; flex-direction: row; gap: 1rem; }
.endHeader form { display: flex; flex-direction: row; gap: .25rem; }
.mainHeader { display: flex; flex-direction: row; padding-bottom: 2rem; justify-content: center; gap: 1rem; padding-top: 1rem; }

#searchBox input { width: 100%; padding: .25rem; }
#author {display: flex; flex-direction: row; justify-content: space-between; padding-bottom: 1rem; }
#author div { display: flex; flex-direction: column; }
#author img { width: 5rem; height: 5rem; }

.tag { color: #888; display: flex; flex-direction: row; flex-wrap: wrap; gap: .5rem; line-height: 1rem; text-wrap: nowrap;}
.visually-hidden { display: none }
#visually-hidden { display: none }

@media (max-width: 500px) { 
        main { border-width: .5px 0; }
        html { padding: 0; margin: 0; }
        header { padding: 0 .5rem; margin: 0; }
        .endHeader { padding: 0.25rem .5rem 3rem .5rem; }

        #recipeMetadata { flex-direction: column; }
        #recipePicSplit { flex-direction: column; }
        #recipeInstruct { flex-direction: column; gap: 2rem; }
        #recipeLeft + #recipeRight{ width: 100%; }
 }

 @media (max-width: 700px) {
        html { margin: 0; }
        .loginTxt form div { flex-direction: column; gap: 0;}
        .loginTxt form { display: flex; flex-direction: column; gap: 1rem; }
        .loginTxt form button { margin-left: 12.5%; }
 }

 @media (max-width: 600px) {
        #recipeGrid { display: grid; grid-template-columns: calc(50% - 1rem) calc(50% - 1rem); padding: 1rem 0; gap: 1rem; }
 }

 @media (max-width: 400px) {
        #recipeGrid { display: grid; grid-template-columns: calc(100% - 2rem); padding: 1rem 0; gap: 1rem; }
 }