* {
  box-sizing: border-box;
}

body {
  margin: 0 auto;
  max-width: 850px;
  line-height: 1.4;
  font-size: 1rem;
  color: #444;
  padding: 2rem;
}

header {
  margin-bottom: 3rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #ddd;
}

nav {
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

section {
  margin-bottom: 6rem;
}

li {
  margin-bottom: 0.5rem;
}

ol,
ul {
  margin: 0 0 1.5rem 0;
  padding-left: 1.5rem;
}

.recipe-image-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 1rem;
}

.recipe-image-grid figure {
  margin: 0;
}

.recipe-image-grid img {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 0.5rem;
}

.recipe-image-grid figcaption {
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.recipe-image-grid small {
  display: block;
  font-size: 0.8rem;
}

a {
  color: #2458c8;
}

.instruction-step {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.5rem;
  margin-bottom: 2.5rem;
  border: 1px solid #ddd;
  background: #fafafa;
}

.instruction-step .step-content {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}

.instruction-step .step-content .step-number {
  flex-shrink: 0;
  font-weight: bold;
  font-size: 1.1rem;
}

.instruction-step .step-text {
  margin: 0;
  flex: 1;
}

.instruction-step .step-figures {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.25rem;
}

.instruction-step .step-figures:empty {
  display: none;
}

.instruction-step .step-figures figure {
  margin: 0;
  flex: 0 0 calc((100% - 3rem) / 4);
}

.instruction-step .step-figures img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.instruction-step .step-figures figcaption {
  font-size: 0.8rem;
  margin-top: 0.35rem;
  line-height: 1.3;
}

.phase-heading {
  margin-top: 3rem;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.phase-heading:first-of-type {
  margin-top: 0;
}

#instructions-with-images .ingredient {
  text-decoration: underline;
}

.instruction-step .step-text p {
  margin: 0 0 0.75rem 0;
}

.instruction-step .step-text p:last-child {
  margin-bottom: 0;
}
