:root {
  --paper: #f6edd9;
  --ink: #050505;
  --red: #922b21;
  --hover: #e1d8c8;
  --line: rgba(5, 5, 5, 0.42);
  --soft-line: rgba(5, 5, 5, 0.12);
  --max: 1324px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 13px;
  line-height: 1.35;
}

a,
button {
  color: inherit;
  font: inherit;
}

a {
  text-decoration: none;
}

button {
  border: 0;
  background: transparent;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(var(--max), calc(100% - 20px));
  min-height: 43px;
  margin: 0 auto;
  padding: 8px 0 0;
  background: var(--paper);
  font-family: Inter, Arial, sans-serif;
  font-size: 16px;
  font-weight: 500;
}

.site-nav::after,
.section-title::after {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  margin-top: 8px;
  background: var(--line);
}

.brand {
  align-self: flex-start;
  padding: 4px 0;
  letter-spacing: 0;
}

.brand:focus-visible,
.recipe-title-link:focus-visible,
.toggle-summary:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.recipes {
  width: min(var(--max), calc(100% - 20px));
  margin: 28px auto 80px;
}

.recipe-list {
  display: flex;
  flex-direction: column;
  gap: 60px;
}

.recipe-header {
  display: grid;
  grid-template-columns: minmax(300px, 520px) minmax(420px, 588px);
  justify-content: space-between;
  align-items: stretch;
  gap: clamp(48px, 15vw, 210px);
  width: 100%;
}

.recipe-card {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.recipe-title {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

h1 {
  margin: 0;
  font-family: "Zilla Slab", Georgia, serif;
  font-size: 40px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0;
}

.recipe-title-link {
  display: block;
  border-radius: 8px;
}

.recipe-title-link:hover h1 {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.alt-names {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  font-size: 16px;
}

.alt-names span:first-child {
  color: var(--red);
}

.toggle-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  min-height: 48px;
  margin: 0;
  padding: 8px 16px 8px 0;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: background-color 160ms ease;
}

.toggle-summary:hover,
.toggle-summary:focus-visible {
  background: var(--hover);
}

.toggle-summary span {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 20px;
  white-space: nowrap;
}

.toggle-summary span:not(:last-child)::after {
  content: "";
  width: 1px;
  height: 20px;
  margin-left: 16px;
  background: var(--red);
}

.toggle-summary svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.6;
}

.toggle-summary .chevron {
  width: 28px;
  height: 18px;
  transform: rotate(-90deg);
  transition: transform 180ms ease;
}

.recipe-card.is-collapsed {
  gap: 0;
}

.is-collapsed .recipe-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.is-collapsed .recipe-title {
  flex: 1 1 auto;
  gap: 0;
}

.is-collapsed .recipe-title-link {
  flex: 1 1 auto;
  min-width: 0;
}

.is-collapsed h1 {
  max-width: 100%;
}

.is-collapsed .alt-names,
.is-collapsed .recipe-image {
  display: none;
}

.is-collapsed .toggle-summary {
  flex: 0 0 72px;
  justify-content: center;
  min-height: 48px;
  padding: 8px;
  background: transparent;
}

.is-collapsed .toggle-summary:hover,
.is-collapsed .toggle-summary:focus-visible {
  background: var(--hover);
}

.is-collapsed .toggle-summary span:not(:last-child) {
  display: none;
}

.is-collapsed .toggle-summary span:not(:last-child)::after {
  display: none;
}

.is-collapsed .toggle-summary .chevron {
  transform: rotate(90deg);
}

.recipe-image {
  margin: 0;
  width: 100%;
  min-height: 226px;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(255, 250, 240, 0.35);
}

.recipe-image img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 226px;
  object-fit: cover;
}

.recipe-card[data-slug="beef-brisket"] .recipe-image {
  margin-top: 16px;
}

.recipe-detail {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.recipe-body {
  display: grid;
  grid-template-columns: minmax(420px, 520px) minmax(460px, 588px);
  justify-content: space-between;
  gap: 72px;
}

.section-title {
  margin: 0 0 20px;
  font-size: 19px;
  font-weight: 400;
  line-height: 1.35;
}

.ingredient-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 220px));
  gap: 28px 80px;
}

.ingredient-group h3 {
  margin: 0 0 12px;
  color: var(--red);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: uppercase;
}

.ingredient-group ul,
.steps {
  padding: 0;
  margin: 0;
  list-style: none;
}

.ingredient-group li {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 8px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--soft-line);
}

.ingredient-group b {
  font-family: Inter, Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.tip {
  margin: 20px 0 0;
  padding: 8px 0;
  border-bottom: 1px solid var(--soft-line);
}

.tip strong {
  color: var(--red);
  font-weight: 400;
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.step {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 16px;
}

.step-number {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--red);
  color: var(--paper);
  font-size: 16px;
}

.step h3 {
  min-height: 32px;
  display: flex;
  align-items: center;
  margin: 0;
  font-size: 16px;
  font-weight: 400;
}

.step p {
  margin: 0;
}

.settings {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-top: 2px;
  padding: 4px 0;
  font-family: Inter, Arial, sans-serif;
  font-weight: 700;
}

.settings span {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  white-space: nowrap;
}

.settings span:not(:last-child)::after {
  content: "";
  width: 1px;
  height: 12px;
  margin-left: 16px;
  background: var(--red);
}

.empty-detail {
  max-width: 520px;
  margin-top: 8px;
  font-size: 16px;
}

@media (max-width: 980px) {
  .recipe-header,
  .recipe-body {
    grid-template-columns: 1fr;
  }

  .recipe-body {
    gap: 40px;
  }

  .recipe-image {
    min-height: 260px;
  }

  .recipe-image img {
    min-height: 260px;
  }
}

@media (max-width: 640px) {
  .site-nav,
  .recipes {
    width: min(100% - 32px, var(--max));
  }

  .recipes {
    margin-top: 24px;
    margin-bottom: 64px;
  }

  .recipe-list {
    gap: 54px;
  }

  h1 {
    font-size: 34px;
  }

  .alt-names {
    font-size: 15px;
  }

  .toggle-summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
  }

  .toggle-summary span:not(:last-child)::after {
    display: none;
  }

  .is-collapsed .recipe-header {
    gap: 12px;
  }

  .is-collapsed .toggle-summary {
    flex-basis: 56px;
  }

  .recipe-image,
  .recipe-image img {
    min-height: 220px;
  }

  .recipe-card[data-slug="beef-brisket"] .recipe-image {
    margin-top: 0;
  }

  .ingredient-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}
