* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 18px;
  display: flex;
  justify-content: center;
}

body {
  font-family: "Nunito", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
  color: #2e261c;
  background-color: #f7f1e8;
  max-width: 700px;
  width: 100%;
  padding: 0 0.5rem;
}

header {
  margin-bottom: 3rem;
}

a {
  color: #8b5e34;
  text-decoration: none;
}

a:hover {
  color: #a8570c;
  text-decoration: underline;
}

main {
  background-color: #fff9f1;
  border-top-left-radius: 25px;
  border-top-right-radius: 25px;
  border: 1px solid #888;
  border-bottom-width: 0px;
  padding: 1rem;
}

h2 {
  font-family: "Playwrite US Trad", cursive;
  font-optical-sizing: auto;
  font-size: 22.5px;
  font-style: normal;
  color: #a8570c;
}

h1 {
  color: #8b5e34;
}

.heading-area {
  margin-bottom: 2rem;
}

.login-form label,
.login-form input,
.login-form button {
  font-family: "Nunito", sans-serif;
  font-optical-sizing: auto;
  font-size: 22.5px;
  font-style: normal;
}

.login-form {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 1rem;
}

.login-form label {
  width: calc(20% - 1rem);
}

.login-form input {
  display: flex;
  width: calc(80% - 1rem);
  padding: 0.25rem;
  justify-content: end;
}

.login-form button {
  display: flex;
  width: 50%;
  justify-content: center;
  align-self: center;
  min-width: 200px;
}

h1 {
  font-family: "Playwrite US Trad", cursive;
  font-optical-sizing: auto;
  font-size: 32.4px;
  font-style: normal;
  color: #a8570c;
}

ul {
  list-style: none;
}

.bold {
  font-weight: 600;
}

.tags li a::before {
  content: "#";
  color: #888;
  margin-right: 0.25em;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  text-wrap: nowrap;
  gap: 0 0.5rem;
}

.polaroid {
  transform: rotate(2deg);
  border: 5px solid #fff;
  border-radius: 3px;
  display: block;
  max-width: 100%;
  display: flex;
  padding-bottom: 0.5rem;
}

.dish-cards {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: start;
  margin-top: 2rem;
}

.dish-cards .card {
  background-color: #fff;
  box-shadow: 0 2px 2px #888;
  border-radius: 5px;
  display: flex;
  width: calc((100% - 2rem) / 3);
  flex-direction: column;
  padding: 0.5rem;
}

.dish-cards .card .tags {
  display: flex;
  flex-wrap: wrap;
  text-wrap: nowrap;
  gap: 0.5rem;
}

.full-image {
  display: block;
  max-width: 100%;
}

.buttons {
  display: flex;
  justify-content: center;
  column-gap: 1rem;
  padding-top: 1rem;
}

.buttons a {
  padding: 0.5em 1em;
  border-radius: 17px;
  background-color: #8b5e34;
  color: #fff9f1;
}

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

.visually-hidden {
  display: none;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: end;
}

.header-line {
  border: none;
  height: 2px;
  background-color: #8b5e34;
  padding: 0;
}

.header-bottom {
  display: flex;
  justify-content: space-between;
}

.header-bottom nav {
  display: flex;
  column-gap: 1rem;
}

.header-bottom form {
  display: flex;
  gap: 0.25rem;
  padding: 0.25rem;
}

.header-bottom form input {
  display: flex;
  padding: 0.25rem;
}

.header-bottom form button {
  display: flex;
  padding: 0.25rem;
}

.recipe-meta {
  display: flex;
  flex-wrap: wrap;
  column-gap: 1.5rem;
  flex-direction: row;
}

.sidebar {
  display: flex;
  flex-direction: column;
  margin-right: 1rem;
  flex: 1;
}

.sidebar dl {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  gap: 0.25rem 0.5rem;
}

.sidebar dl dt {
  width: calc(25% - 0.5rem);
  font-weight: 600;
}
.sidebar dl dd {
  width: calc(75% - 0.5rem);
}

.description {
  flex: 2;
}

.steps {
  flex: 2;
  margin-top: 1rem;
}

.ingredients-list {
  line-height: 1.25;
  padding-left: 1rem;
  text-indent: -1rem;
}

.ingredients {
  display: flex;
  flex-direction: column;
  margin-right: 1rem;
  margin-top: 1rem;
  flex: 1;
}

.steps-list {
  line-height: 1.25;
  padding-left: 1rem;
}

.search input {
  width: 100%;
  padding: 0.25rem;
}

.profile {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.profile-info {
  display: flex;
  flex-direction: column;
}

.profile-meta {
  display: flex;
  flex-direction: row;
  gap: 1rem;
}

.profile-photo {
  width: 5rem;
  height: 5rem;
}

.recipe-layout {
  display: flex;
  flex-direction: row;
  align-items: start;
}

textarea {
  width: 100%;
  resize: vertical;
}

.page-title {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: start;
}

.step-description {
  vertical-align: top;
}

.recipe-title {
  font-size: 36px;
  font-family: "Playwrite US Trad", cursive;
  color: #a8570c;
}

.step-ingredients {
  list-style-type: circle;
  gap: 0.25rem;
  padding-bottom: 1rem;
}

input[type=number][size] { 
  width: calc(attr(size number) * 1ch + 2rem); 
}

output.error-list {
  color: red;
}

.right-align {
  display: flex;
  flex-direction: column;
  align-items: start;
}

.view-password-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  white-space: nowrap;
  padding-left: 10px;
  width: 100%;
}

.login-form input[type="checkbox"] {
  width: auto;
  margin-right: 0.5rem;
  padding: 0.25rem;
  justify-content: flex-start;
}

@media (max-width: 700px) {
  .login-form {
    gap: 0rem;
  }

  .login-form label {
    width: 100%;
  }

  .login-form input {
    width: 100%;
    margin: 0 0 1rem;
  }
}

@media (max-width: 600px) {
  .dish-cards .card {
    width: calc((100% - 1rem) / 2);
  }
}

@media (max-width: 500px) {
  .recipe-layout {
    display: flex;
    flex-direction: column;
  }

  .sidebar {
    margin: 0 0 2rem;
  }

  .description {
    margin: 0 0 2rem;
  }

  .ingredients {
    margin: 0 0 2rem;
  }

  .steps {
    margin: 0rem;
  }

  body {
    padding: 0;
  }

  main {
    border-left: 0;
    border-right: 0;
  }

  .header-top {
    padding: 0 0.5rem;
  }

  .header-bottom {
    padding: 0 0.5rem;
  }
}

@media (max-width: 400px) {
  .dish-cards .card {
    width: 100%;
  }
}
