.recipes-page {
  padding: 32px 16px 64px;
}

.recipes-shell {
  max-width: 1120px;
  margin: 0 auto;
}

.recipes-card {
  background: var(--surface-1, #121a22);
  border: 1px solid var(--border-1, #2a3548);
  border-radius: 18px;
  padding: 28px clamp(16px, 4vw, 40px) 32px;
}

.recipes-hero {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: flex-end;
}

.recipes-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 6px 0 10px;
}

.recipes-hero h1 span {
  color: var(--accent, #d4a017);
}

.recipes-hero .lead {
  max-width: 60ch;
  margin: 0;
  opacity: 0.86;
}

.recipes-stats {
  display: flex;
  gap: 12px;
}

.recipes-stats article {
  min-width: 96px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--surface-2, #17222e);
  border: 1px solid var(--border-1, #2a3548);
  text-align: center;
}

.recipes-stats strong {
  display: block;
  font-size: 1.6rem;
  color: var(--accent, #d4a017);
}

.recipes-stats span {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.7;
}

.recipes-boundary {
  margin: 24px 0;
  padding: 14px 16px;
  border-left: 3px solid var(--accent, #d4a017);
  background: var(--surface-2, #17222e);
  border-radius: 10px;
}

.recipes-boundary p {
  margin: 6px 0 0;
  opacity: 0.85;
}

.recipes-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0;
}

.recipes-search,
.recipes-select {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--surface-2, #17222e);
  border: 1px solid var(--border-1, #2a3548);
}

.recipes-search {
  flex: 1 1 280px;
}

.recipes-search input,
.recipes-select select {
  flex: 1;
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
  outline: none;
}

.recipes-select select option {
  color: #111;
}

.recipes-results-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin: 12px 0;
}

.recipes-results-heading h2 {
  margin: 0;
  font-size: 1.1rem;
}

.recipes-error {
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(220, 90, 70, 0.14);
  border: 1px solid rgba(220, 90, 70, 0.4);
}

.recipes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.recipe-card {
  text-align: left;
  padding: 16px;
  border-radius: 14px;
  background: var(--surface-2, #17222e);
  border: 1px solid var(--border-1, #2a3548);
  color: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.recipe-card:hover,
.recipe-card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--accent, #d4a017);
}

.recipe-card h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.recipe-card p {
  margin: 0 0 12px;
  font-size: 0.9rem;
  opacity: 0.82;
}

.recipe-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.8rem;
  opacity: 0.8;
}

.recipe-card-meta strong {
  color: var(--accent, #d4a017);
}

.recipe-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.recipe-tag {
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(212, 160, 23, 0.14);
  border: 1px solid rgba(212, 160, 23, 0.35);
}

.recipes-empty {
  grid-column: 1 / -1;
  padding: 24px;
  text-align: center;
  opacity: 0.75;
}

.recipes-footer {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.recipes-footer p {
  max-width: 60ch;
  margin: 0;
  opacity: 0.85;
}

.recipes-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.recipes-dialog {
  border: 1px solid var(--border-1, #2a3548);
  border-radius: 16px;
  padding: 0;
  max-width: 640px;
  width: calc(100% - 32px);
  background: var(--surface-1, #121a22);
  color: inherit;
}

.recipes-dialog::backdrop {
  background: rgba(4, 8, 12, 0.72);
}

.recipes-dialog-shell {
  padding: 20px 22px 26px;
}

.recipes-dialog-shell header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.recipes-dialog-shell header h2 {
  margin: 4px 0 0;
}

.recipes-dialog-shell header button {
  background: transparent;
  border: 0;
  color: inherit;
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
}

.recipe-dialog-summary {
  opacity: 0.85;
}

.recipe-macros {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 16px 0;
}

.recipe-macros div {
  text-align: center;
  padding: 10px 6px;
  border-radius: 10px;
  background: var(--surface-2, #17222e);
  border: 1px solid var(--border-1, #2a3548);
}

.recipe-macros strong {
  display: block;
  font-size: 1.2rem;
  color: var(--accent, #d4a017);
}

.recipe-macros span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.7;
}

.recipe-ingredients {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
}

.recipe-ingredients li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-1, #2a3548);
}

.recipe-steps {
  padding-left: 20px;
  margin: 0 0 16px;
}

.recipe-steps li {
  margin-bottom: 8px;
}

.recipe-disclaimer {
  font-size: 0.8rem;
  opacity: 0.7;
  margin: 0;
}

@media (max-width: 520px) {
  .recipe-macros {
    grid-template-columns: repeat(2, 1fr);
  }
}
