/* Palette and type from style-guide.md. */
:root {
  --clr-white: hsl(0, 0%, 100%);
  --clr-stone-100: hsl(30, 54%, 90%);
  --clr-stone-150: hsl(30, 18%, 87%);
  --clr-stone-600: hsl(30, 10%, 34%);
  --clr-stone-900: hsl(24, 5%, 18%);
  --clr-brown-800: hsl(14, 45%, 36%);
  --clr-rose-800: hsl(332, 51%, 32%);
  --clr-rose-50: hsl(330, 100%, 98%);

  --font-display: "Young Serif", Georgia, serif;
  --font-body: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--clr-stone-100);
  color: var(--clr-stone-600);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
}

main {
  display: flex;
  justify-content: center;
}

.recipe {
  width: 100%;
  max-width: 736px;
  background-color: var(--clr-white);
}

/* The design shows the image flush to the edges on mobile and inset with
   rounded corners from the tablet width up. */
@media (min-width: 48em) {
  body {
    padding: 8rem 1.5rem;
  }

  .recipe {
    padding: 2.5rem;
    border-radius: 24px;
  }
}

.recipe__image {
  display: block;
  width: 100%;
  height: auto;
}

@media (min-width: 48em) {
  .recipe__image {
    border-radius: 12px;
  }
}

.recipe__body {
  padding: 2.5rem 2rem;
}

@media (min-width: 48em) {
  .recipe__body {
    padding: 2.5rem 0 0;
  }
}

.recipe__title {
  margin: 0 0 1.5rem;
  color: var(--clr-stone-900);
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 400;
  line-height: 1.05;
}

.recipe__intro {
  margin: 0 0 2rem;
}

.recipe__time {
  padding: 1.5rem;
  margin-bottom: 2rem;
  background-color: var(--clr-rose-50);
  border-radius: 12px;
}

.recipe__time-title {
  margin: 0 0 1rem;
  color: var(--clr-rose-800);
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 600;
}

.recipe__section {
  padding-top: 2rem;
}

.recipe__section + .recipe__section {
  border-top: 1px solid var(--clr-stone-150);
}

.recipe__section h2 {
  margin: 0 0 1.5rem;
  color: var(--clr-brown-800);
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 400;
}

.recipe__note {
  margin: 0 0 1.5rem;
}

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

li {
  padding-left: 1rem;
  margin-bottom: 0.5rem;
}

li:last-child {
  margin-bottom: 0;
}

li::marker {
  color: var(--clr-brown-800);
  font-weight: 700;
}

.recipe__time li::marker {
  color: var(--clr-rose-800);
}

.nutrition {
  width: 100%;
  border-collapse: collapse;
}

.nutrition th,
.nutrition td {
  padding: 0.75rem 2rem;
  text-align: left;
  border-bottom: 1px solid var(--clr-stone-150);
}

.nutrition tr:last-child th,
.nutrition tr:last-child td {
  border-bottom: none;
}

.nutrition th {
  font-weight: 400;
}

.nutrition td {
  color: var(--clr-brown-800);
  font-weight: 700;
}

/* Available to screen readers, out of the visual layout. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
