/* Feastably — recipe blog */
:root {
  --primary: #E8572A;
  --primary-hover: #d14a22;
  --accent: #2D6A4F;
  --accent-hover: #245a42;
  --bg: #FAFAF8;
  --bg-elevated: #FFFFFF;
  --text: #1A1A1A;
  --muted: #6B6B6B;
  --border: rgba(26, 26, 26, 0.08);
  --overlay: linear-gradient(
    180deg,
    rgba(26, 26, 26, 0.15) 0%,
    rgba(26, 26, 26, 0.65) 100%
  );
  --shadow-sm: 0 1px 3px rgba(26, 26, 26, 0.06);
  --shadow-md: 0 8px 30px rgba(26, 26, 26, 0.08);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --font-serif: "Playfair Display", Georgia, serif;
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --nav-h: 4.25rem;
  --transition: 0.25s ease;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #121212;
  --bg-elevated: #1C1C1C;
  --text: #F5F5F2;
  --muted: #9A9A9A;
  --border: rgba(255, 255, 255, 0.08);
  --overlay: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.2) 0%,
    rgba(0, 0, 0, 0.75) 100%
  );
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 12px 40px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--primary);
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.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;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 200;
  padding: 0.65rem 1rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg-elevated);
  border: 2px solid var(--primary);
  border-radius: var(--radius-sm);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 1rem;
  outline: none;
}

/* Fade-in on scroll */
.io-fade {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.io-fade.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Layout */
.container {
  width: min(1120px, 100% - 2rem);
  margin-inline: auto;
}

.container--narrow {
  width: min(720px, 100% - 2rem);
}

/* Header / Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: color-mix(in srgb, var(--bg-elevated) 92%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--nav-h);
  padding-block: 0.5rem;
}

.nav__brand {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--text);
  flex-shrink: 0;
}

.nav__brand:hover {
  color: var(--primary);
}

.nav__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.nav__toggle-icon {
  display: block;
  width: 1.35rem;
  height: 2px;
  background: currentColor;
  position: relative;
}

.nav__toggle-icon::before,
.nav__toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  transition: transform var(--transition);
}

.nav__toggle-icon::before {
  top: -7px;
}

.nav__toggle-icon::after {
  top: 7px;
}

.site-header--menu-open .nav__toggle-icon {
  background: transparent;
}

.site-header--menu-open .nav__toggle-icon::before {
  transform: translateY(7px) rotate(45deg);
}

.site-header--menu-open .nav__toggle-icon::after {
  transform: translateY(-7px) rotate(-45deg);
}

.nav__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  justify-content: flex-end;
}

.nav__search-wrap {
  position: relative;
  flex: 1;
  max-width: 280px;
}

.nav__search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.1rem;
  height: 1.1rem;
  color: var(--muted);
  pointer-events: none;
}

.nav__search {
  width: 100%;
  padding: 0.65rem 0.85rem 0.65rem 2.5rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
}

.nav__search::placeholder {
  color: var(--muted);
}

.nav__categories {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.nav__categories-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-right: 0.25rem;
}

.nav__link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  transition: background var(--transition), color var(--transition);
}

.nav__link:hover {
  background: var(--border);
  color: var(--text);
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color var(--transition), background var(--transition);
}

.theme-toggle:hover {
  border-color: var(--primary);
}

.theme-toggle svg {
  width: 1.15rem;
  height: 1.15rem;
}

/* Mobile nav panel */
.nav__panel {
  display: none;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem 0 1.25rem;
  border-top: 1px solid var(--border);
}

.nav__panel[aria-hidden="false"] {
  display: flex;
}

@media (min-width: 960px) {
  .nav__toggle {
    display: none;
  }

  .nav__panel {
    display: contents;
    border: none;
    padding: 0;
  }

  .nav__panel[aria-hidden="true"] {
    display: contents;
  }

  .nav__inner {
    flex: unset;
    gap: 1.25rem;
  }
}

@media (max-width: 959px) {
  .nav {
    flex-wrap: wrap;
  }

  .nav__inner {
    width: 100%;
    order: 3;
    justify-content: space-between;
  }

  .nav__search-wrap {
    max-width: none;
    flex: 1;
  }

  .nav__categories {
    width: 100%;
    padding-top: 0.5rem;
  }
}

/* Hero homepage */
.hero {
  position: relative;
  min-height: min(78vh, 640px);
  display: flex;
  align-items: flex-end;
  margin-bottom: 3rem;
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.45s ease;
}

@media (prefers-reduced-motion: reduce) {
  .hero__media img {
    transition: none;
  }
}

.hero__media img.is-hero-dim {
  opacity: 0;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: var(--overlay);
}

.hero__content {
  position: relative;
  z-index: 1;
  width: min(1120px, 100% - 2rem);
  margin-inline: auto;
  padding: 3rem 0 3.5rem;
}

.hero__tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #fff;
  background: var(--primary);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.hero__title {
  font-family: var(--font-serif);
  font-size: clamp(2.25rem, 6vw, 3.75rem);
  font-weight: 700;
  line-height: 1.1;
  color: #fff;
  margin: 0 0 1rem;
  max-width: 16ch;
  text-wrap: balance;
}

.hero__meta {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.75rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  background: var(--primary);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--transition), transform 0.15s ease;
}

.hero__cta:hover {
  background: var(--primary-hover);
  color: #fff;
}

.hero__cta:active {
  transform: scale(0.98);
}

.hero__carousel-controls {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.5rem;
}

@media (min-width: 768px) {
  .hero__carousel-controls {
    padding: 0 1rem;
  }
}

.hero__nav-btn {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  cursor: pointer;
  transition:
    background var(--transition),
    border-color var(--transition),
    transform 0.15s ease;
}

.hero__nav-btn:hover {
  background: rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.55);
}

.hero__nav-btn:active {
  transform: scale(0.96);
}

.hero__dots {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  max-width: calc(100% - 2rem);
  pointer-events: auto;
}

.hero__dot {
  width: 0.5rem;
  height: 0.5rem;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition:
    background 0.2s ease,
    transform 0.15s ease;
}

.hero__dot:hover {
  background: rgba(255, 255, 255, 0.65);
}

.hero__dot[aria-current="true"] {
  background: #fff;
  transform: scale(1.25);
}

/* Section titles */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.section-head h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Trending row / latest slider */
.trending {
  margin-bottom: 3rem;
}

.section-head--trending {
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem;
}

.section-head--trending .section-head__text {
  flex: 1 1 12rem;
  min-width: 0;
}

.trending__nav {
  display: flex;
  flex-shrink: 0;
  gap: 0.4rem;
}

.trending__nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.65rem;
  height: 2.65rem;
  padding: 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), transform 0.15s ease;
}

.trending__nav-btn:hover {
  background: var(--bg);
  border-color: var(--muted);
}

.trending__nav-btn:active {
  transform: scale(0.96);
}

[data-theme="dark"] .trending__nav-btn {
  background: var(--bg-elevated);
}

.trending__track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.75rem;
  margin-inline: calc(50% - 50vw);
  padding-inline: max(1rem, calc(50vw - min(560px, 50% - 1rem)));
  scrollbar-width: thin;
}

.trending__track::-webkit-scrollbar {
  height: 6px;
}

.trending__track::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 999px;
}

.trend-card {
  flex: 0 0 min(280px, 78vw);
  scroll-snap-align: start;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: box-shadow var(--transition), transform var(--transition);
}

.trend-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.trend-card__link {
  display: block;
  color: inherit;
}

.trend-card__link:hover {
  color: inherit;
}

.trend-card__img {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.trend-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.trend-card__body {
  padding: 1rem 1.1rem 1.15rem;
}

.trend-card__title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  line-height: 1.25;
}

.trend-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.trend-card__tag {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-weight: 500;
}

/* Category pills (home) */
.filters {
  margin-bottom: 2rem;
}

.filters__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.filter-pill {
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--text);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.filter-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-pill[aria-pressed="true"] {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

[data-theme="dark"] .filter-pill[aria-pressed="true"] {
  background: #fff;
  color: #121212;
  border-color: #fff;
}

/* Masonry grid */
.recipe-grid-section {
  margin-bottom: 4rem;
}

.masonry {
  column-count: 1;
  column-gap: 1.25rem;
}

@media (min-width: 560px) {
  .masonry {
    column-count: 2;
  }
}

@media (min-width: 900px) {
  .masonry {
    column-count: 3;
  }
}

.recipe-card {
  break-inside: avoid;
  margin-bottom: 1.25rem;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}

.recipe-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.recipe-card__link {
  display: block;
  color: inherit;
}

.recipe-card__link:hover {
  color: inherit;
}

.recipe-card__img {
  position: relative;
  overflow: hidden;
}

.recipe-card__img img {
  width: 100%;
  vertical-align: middle;
  object-fit: cover;
}

.recipe-card__badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.35rem 0.55rem;
  border-radius: 6px;
  background: var(--bg-elevated);
  color: var(--accent);
  border: 1px solid var(--border);
}

.recipe-card__body {
  padding: 1.1rem 1.15rem 1.2rem;
}

.recipe-card__title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
  line-height: 1.25;
}

.recipe-card__category {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
}

.recipe-card__author {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.recipe-card__author img {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
}

.recipe-card__origin {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.35;
}

.recipe-card__time {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
  column-span: all;
}

/* Newsletter */
.newsletter {
  padding: 3.5rem 1.5rem;
  margin-bottom: 3rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
}

.newsletter h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 0.5rem;
}

.newsletter p {
  margin: 0 0 1.5rem;
  color: var(--muted);
  max-width: 36ch;
  margin-inline: auto;
}

.newsletter__form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
  max-width: 420px;
  margin-inline: auto;
}

.newsletter__input {
  flex: 1 1 200px;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}

.newsletter__btn {
  padding: 0.75rem 1.5rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
}

.newsletter__btn:hover {
  background: var(--accent-hover);
}

.newsletter__status {
  min-height: 1.5em;
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  color: var(--accent);
}

.newsletter__status:empty {
  display: none;
}

.newsletter__iframe {
  position: absolute;
  width: 0;
  height: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
  clip: rect(0, 0, 0, 0);
}

.newsletter {
  position: relative;
}

/* Footer */
.site-footer {
  padding: 2.5rem 0 2rem;
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}

.footer__top {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.footer__brand {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
}

.footer__brand:hover {
  color: var(--primary);
}

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.footer__nav a {
  color: var(--muted);
  font-size: 0.9rem;
}

.footer__nav a:hover {
  color: var(--text);
}

.footer__social {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.footer__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-sm);
  color: var(--text);
  border: 1px solid var(--border);
  transition: border-color var(--transition), color var(--transition);
}

.footer__social a:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.footer__social svg {
  width: 1.15rem;
  height: 1.15rem;
}

.footer__bottom {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

/* Back to top */
.back-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 90;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg-elevated);
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity var(--transition), visibility var(--transition), transform var(--transition), border-color var(--transition);
}

.back-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-top:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.back-top svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* Recipe article */
.recipe-hero {
  position: relative;
  min-height: min(52vh, 480px);
  display: flex;
  align-items: flex-end;
  margin-bottom: 2rem;
  overflow: hidden;
}

.recipe-hero__media {
  position: absolute;
  inset: 0;
}

.recipe-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recipe-hero__gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(26, 26, 26, 0.05) 0%,
    rgba(26, 26, 26, 0.75) 100%
  );
}

[data-theme="dark"] .recipe-hero__gradient {
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.3) 0%,
    rgba(0, 0, 0, 0.85) 100%
  );
}

.recipe-hero__content {
  position: relative;
  z-index: 1;
  width: min(1120px, 100% - 2rem);
  margin-inline: auto;
  padding: 2rem 0 2.5rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.85);
}

.breadcrumb a:hover {
  color: #fff;
}

.breadcrumb span[aria-hidden="true"] {
  color: rgba(255, 255, 255, 0.5);
}

.breadcrumb [aria-current="page"] {
  color: #fff;
  font-weight: 500;
}

.recipe-hero__title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.12;
  color: #fff;
  margin: 0 0 1rem;
  max-width: 18ch;
  text-wrap: balance;
}

.recipe-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
}

.recipe-hero__category {
  flex-basis: 100%;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: rgba(255, 255, 255, 0.95);
}

.recipe-hero__origin {
  flex-basis: 100%;
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.88);
}

.recipe-hero__origin:empty {
  display: none;
}

.recipe-loading-banner {
  margin: 0 auto 1rem;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
}

.recipe-loading-banner code {
  font-size: 0.85em;
}

.recipe-loading-banner[hidden] {
  display: none;
}

.recipe-article {
  padding-bottom: 4rem;
}

.recipe-article__intro {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0 0 2rem;
  line-height: 1.65;
}

.recipe-tags-bar {
  margin: -0.5rem auto 1.75rem;
  text-align: center;
}

.recipe-tags-bar[hidden] {
  display: none;
}

.recipe-tag-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
}

.recipe-tag-list li {
  margin: 0;
}

.recipe-tag-list span {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--muted);
}

.recipe-youtube-wrap {
  margin-bottom: 2rem;
}

.recipe-youtube__inner {
  position: relative;
  width: 100%;
  max-width: 720px;
  margin-top: 0.5rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--bg);
}

.recipe-youtube__inner iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.recipe-youtube__link {
  display: inline-block;
  margin-top: 0.5rem;
  font-weight: 600;
  color: var(--primary);
}

.recipe-layout {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 900px) {
  .recipe-layout {
    grid-template-columns: 1fr 1.15fr;
    align-items: start;
  }
}

.ingredients {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.ingredients h2 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  margin: 0 0 1rem;
}

.ingredient-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ingredient-list li {
  margin-bottom: 0.65rem;
}

.ingredient-list label {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1.45;
}

.ingredient-list input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.2rem;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.ingredient-list input:checked + span {
  text-decoration: line-through;
  color: var(--muted);
}

.steps h2 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  margin: 0 0 1.25rem;
}

.steps ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  padding-left: 3rem;
  margin-bottom: 1.25rem;
  font-size: 1rem;
  line-height: 1.65;
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  background: var(--primary);
  border-radius: 50%;
}

.share {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.share h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 0 0 1rem;
}

.share__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.share__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}

.share__btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.share__btn svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.related {
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}

.related h2 {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  margin: 0 0 1.25rem;
}

.related__grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

@media (min-width: 600px) {
  .related__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.related-card {
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}

.related-card:hover {
  box-shadow: var(--shadow-md);
}

.related-card a {
  display: block;
  color: inherit;
}

.related-card a:hover {
  color: inherit;
}

.related-card__img {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.related-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-card__body {
  padding: 1rem;
}

.related-card h3 {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  margin: 0;
  line-height: 1.3;
}

.error-page {
  text-align: center;
  padding: 4rem 1rem;
}

.error-page h1 {
  font-family: var(--font-serif);
  font-size: 2rem;
}

.error-page p {
  color: var(--muted);
}

.error-page a {
  font-weight: 600;
}
