/*
Theme Name: Steffys Rezeptwelt
Theme URI: https://steffysrezeptwelt.de
Author: Steffys Rezeptwelt
Description: Warm, accessible and performance focused recipe publication theme.
Version: 0.3.7
Requires at least: 6.6
Requires PHP: 8.1
Text Domain: steffys-rezeptwelt
*/

:root {
  --color-primary: #a9472b;
  --color-primary-dark: #7d301d;
  --color-secondary: #315c4b;
  --color-accent: #d69a3a;
  --color-text: #2c2825;
  --color-muted: #6d645e;
  --color-background: #fff9f3;
  --color-surface: #ffffff;
  --color-surface-warm: #f5ebdd;
  --color-border: #e5d8cb;
  --color-success: #2f7253;
  --color-focus: #285e9b;
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-heading: Georgia, "Times New Roman", serif;
  --radius-small: 0.5rem;
  --radius-medium: 1rem;
  --radius-large: 1.5rem;
  --radius-round: 999px;
  --space-xs: 0.375rem;
  --space-sm: 0.75rem;
  --space-md: 1.25rem;
  --space-lg: 2rem;
  --space-xl: 3.5rem;
  --space-xxl: 5rem;
  --shadow-card: 0 14px 38px rgb(73 50 35 / 9%);
  --content-width: 1160px;
  --reading-width: 760px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--color-text);
  background: var(--color-background);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

body.menu-open {
  overflow: hidden;
}

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

a {
  color: var(--color-primary-dark);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

button,
input[type="submit"] {
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.65em;
  color: var(--color-text);
  font-family: var(--font-heading);
  line-height: 1.15;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.35rem, 7vw, 4.75rem);
  letter-spacing: -0.04em;
}

h2 {
  font-size: clamp(1.75rem, 4.3vw, 3rem);
  letter-spacing: -0.025em;
}

h3 {
  font-size: clamp(1.25rem, 2.8vw, 1.65rem);
}

p {
  margin: 0 0 1.2em;
}

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

.screen-reader-text:focus {
  z-index: 100000;
  top: 8px;
  left: 8px;
  width: auto;
  height: auto;
  padding: 12px 18px;
  clip: auto;
  color: var(--color-surface);
  background: var(--color-secondary);
}

.site-shell {
  width: min(calc(100% - 2rem), var(--content-width));
  margin-inline: auto;
}

.reading-width {
  width: min(100%, var(--reading-width));
  margin-inline: auto;
}

.section {
  padding-block: var(--space-xl);
}

.section-warm {
  background: var(--color-surface-warm);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.section-heading p {
  max-width: 42rem;
  margin: 0;
  color: var(--color-muted);
}

.eyebrow {
  display: block;
  margin-bottom: var(--space-sm);
  color: var(--color-primary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.button,
.wp-element-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.7rem 1.15rem;
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-round);
  color: #fff;
  background: var(--color-primary);
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.button:hover,
.wp-element-button:hover {
  color: #fff;
  border-color: var(--color-primary-dark);
  background: var(--color-primary-dark);
  transform: translateY(-1px);
}

.button-secondary {
  color: var(--color-secondary);
  border-color: var(--color-secondary);
  background: transparent;
}

.button-secondary:hover {
  color: #fff;
  background: var(--color-secondary);
}

.button-quiet {
  color: var(--color-text);
  border-color: var(--color-border);
  background: var(--color-surface);
}

.button-quiet:hover {
  color: var(--color-primary-dark);
  border-color: var(--color-primary);
  background: var(--color-surface);
}

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  border-bottom: 1px solid rgb(229 216 203 / 75%);
  background: rgb(255 249 243 / 94%);
  backdrop-filter: blur(16px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 82px;
  gap: var(--space-md);
}

.site-logo {
  display: inline-flex;
  width: clamp(210px, 24vw, 285px);
  flex: 0 0 auto;
}

.site-logo img {
  display: block;
  width: 100%;
}

.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: var(--color-surface);
}

.menu-toggle span,
.menu-toggle::before,
.menu-toggle::after {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  content: "";
  background: var(--color-text);
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(0.8rem, 2.2vw, 1.8rem);
  padding: 0;
  margin: 0;
  list-style: none;
}

.site-nav a {
  color: var(--color-text);
  font-size: 0.96rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav .current-menu-item > a {
  color: var(--color-primary);
}

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(4.5rem, 10vw, 8rem);
  background:
    radial-gradient(circle at 88% 15%, rgb(214 154 58 / 18%) 0, transparent 28%),
    radial-gradient(circle at 8% 95%, rgb(49 92 75 / 12%) 0, transparent 32%),
    var(--color-background);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  align-items: center;
  gap: clamp(2rem, 7vw, 6rem);
}

.hero-copy p {
  max-width: 43rem;
  color: var(--color-muted);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.hero-search,
.archive-search {
  display: flex;
  max-width: 720px;
  padding: 7px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-round);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.hero-search input,
.archive-search input {
  width: 100%;
  min-width: 0;
  padding: 0.75rem 1rem;
  border: 0;
  outline: 0;
  background: transparent;
}

.hero-search button,
.archive-search button {
  flex: 0 0 auto;
}

.suggested-searches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: var(--space-md);
}

.suggested-searches a,
.taxonomy-pill,
.recipe-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-round);
  color: var(--color-text);
  background: rgb(255 255 255 / 70%);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}

.hero-visual {
  position: relative;
  min-height: 390px;
}

.hero-plate {
  position: absolute;
  inset: 4% 5% 4% 4%;
  display: grid;
  place-items: center;
  border: 26px solid #fff;
  border-radius: 50%;
  background:
    radial-gradient(circle at 45% 45%, #f2c879 0 7%, transparent 8%),
    radial-gradient(circle at 61% 56%, #b65232 0 9%, transparent 10%),
    radial-gradient(circle at 42% 65%, #6f944f 0 10%, transparent 11%),
    radial-gradient(circle at 58% 35%, #e68d5a 0 11%, transparent 12%),
    radial-gradient(circle, #ead4a4 0 49%, #e0c38c 50% 58%, #f5e7ca 59%);
  box-shadow: 0 35px 70px rgb(79 51 29 / 17%);
  transform: rotate(-8deg);
}

.hero-note {
  position: absolute;
  right: 0;
  bottom: 8%;
  max-width: 180px;
  padding: 1rem 1.15rem;
  border-radius: var(--radius-medium);
  background: var(--color-secondary);
  color: #fff;
  box-shadow: var(--shadow-card);
  font-weight: 700;
  transform: rotate(3deg);
}

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2.5vw, 1.75rem);
}

.recipe-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-large);
  background: var(--color-surface);
  box-shadow: 0 8px 30px rgb(73 50 35 / 5%);
  transition: box-shadow 180ms ease, transform 180ms ease;
}

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

.recipe-card-image {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--color-surface-warm);
}

.generated-image-badge {
  position: absolute;
  z-index: 3;
  left: 0.75rem;
  top: 0.75rem;
  display: inline-flex;
  padding: 0.28rem 0.6rem;
  border: 1px solid rgb(255 255 255 / 65%);
  border-radius: var(--radius-round);
  color: #fff;
  background: rgb(44 40 37 / 78%);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  backdrop-filter: blur(8px);
}

.recipe-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms ease;
}

.recipe-card:hover .recipe-card-image img {
  transform: scale(1.025);
}

.recipe-card-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: var(--color-secondary);
  font-family: var(--font-heading);
  font-size: 1.35rem;
}

.recipe-card-body {
  padding: 1.15rem 1.25rem 1.35rem;
}

.recipe-card h3 {
  margin-bottom: 0.4rem;
}

.recipe-card h3 a {
  color: var(--color-text);
  text-decoration: none;
}

.recipe-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  color: var(--color-muted);
  font-size: 0.9rem;
}

.favorite-button {
  position: absolute;
  z-index: 2;
  top: 0.8rem;
  right: 0.8rem;
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--color-primary);
  background: rgb(255 255 255 / 92%);
  box-shadow: 0 5px 18px rgb(50 30 20 / 16%);
  font-size: 1.25rem;
}

.favorite-button[aria-pressed="true"] {
  color: #fff;
  background: var(--color-primary);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.category-card {
  min-height: 160px;
  padding: var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-large);
  background: var(--color-surface);
  text-decoration: none;
}

.category-card strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--color-text);
  font-family: var(--font-heading);
  font-size: 1.35rem;
}

.category-card span {
  color: var(--color-muted);
  font-size: 0.9rem;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.tool-card {
  padding: clamp(1.3rem, 3vw, 2rem);
  border-radius: var(--radius-large);
  color: #fff;
  background: var(--color-secondary);
}

.tool-card:nth-child(2) {
  background: var(--color-primary);
}

.tool-card:nth-child(3) {
  color: var(--color-text);
  background: var(--color-accent);
}

.tool-card h3,
.tool-card a {
  color: inherit;
}

.page-header,
.archive-header {
  padding-block: clamp(3.5rem, 8vw, 6rem) var(--space-lg);
}

.archive-header p,
.page-header p {
  max-width: 48rem;
  color: var(--color-muted);
  font-size: 1.1rem;
}

.recipe-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.8rem;
  padding: var(--space-md);
  margin-block: var(--space-lg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-large);
  background: var(--color-surface);
}

.filter-field {
  display: grid;
  gap: 0.3rem;
  color: var(--color-muted);
  font-size: 0.8rem;
  font-weight: 750;
}

.filter-field select {
  width: 100%;
  min-height: 44px;
  padding: 0.55rem 2rem 0.55rem 0.7rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-small);
  color: var(--color-text);
  background: #fff;
}

.filter-actions {
  display: flex;
  align-items: end;
  gap: 0.5rem;
}

.result-count {
  margin-bottom: var(--space-md);
  color: var(--color-muted);
}

.pagination {
  margin-top: var(--space-xl);
}

.pagination .nav-links {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
}

.pagination .page-numbers {
  display: grid;
  min-width: 42px;
  height: 42px;
  padding: 0.4rem;
  place-items: center;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  text-decoration: none;
}

.pagination .current {
  color: #fff;
  border-color: var(--color-primary);
  background: var(--color-primary);
}

.breadcrumbs {
  padding-block: 1rem;
  color: var(--color-muted);
  font-size: 0.85rem;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.breadcrumbs li:not(:last-child)::after {
  margin-left: 0.35rem;
  content: "/";
  color: var(--color-border);
}

.recipe-hero {
  padding-block: var(--space-lg) var(--space-xl);
}

.recipe-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
}

.recipe-lead {
  color: var(--color-muted);
  font-size: clamp(1.05rem, 2vw, 1.22rem);
}

.recipe-hero-image {
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: clamp(1.25rem, 4vw, 2.5rem);
  background: var(--color-surface-warm);
  box-shadow: var(--shadow-card);
}

.recipe-hero-figure {
  margin: 0;
}

.generated-image-notice {
  padding: 0.65rem 0.85rem;
  color: var(--color-muted);
  font-size: 0.78rem;
  line-height: 1.45;
  text-align: center;
}

.generated-image-notice strong {
  color: var(--color-text);
}

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

.recipe-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
  padding: 1rem;
  margin-block: var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);
  background: var(--color-surface);
}

.recipe-meta-item {
  display: grid;
  gap: 0.1rem;
}

.recipe-meta-item span {
  color: var(--color-muted);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.recipe-meta-item strong {
  font-size: 0.95rem;
}

.recipe-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.recipe-intro {
  width: min(calc(100% - 1.2rem), var(--reading-width));
  margin-inline: auto;
  padding-block: var(--space-lg);
  font-size: 1.08rem;
}

.recipe-card-full {
  overflow: hidden;
  margin-block: var(--space-xl);
  border: 1px solid var(--color-border);
  border-radius: clamp(1.25rem, 4vw, 2rem);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.recipe-card-header {
  padding: clamp(1.5rem, 5vw, 3rem);
  color: #fff;
  background: var(--color-secondary);
}

.recipe-card-header h2,
.recipe-card-header p {
  color: inherit;
}

.recipe-card-content {
  display: grid;
  grid-template-columns: minmax(260px, 0.78fr) minmax(0, 1.22fr);
}

.ingredients-panel,
.instructions-panel {
  padding: clamp(1.3rem, 4vw, 2.5rem);
}

.ingredients-panel {
  border-right: 1px solid var(--color-border);
  background: var(--color-background);
}

.servings-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.65rem;
  margin-bottom: var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-round);
  background: var(--color-surface);
}

.servings-control button {
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--color-primary);
  font-size: 1.2rem;
}

.servings-control input {
  width: 62px;
  border: 0;
  color: var(--color-text);
  background: transparent;
  font-weight: 800;
  text-align: center;
}

.ingredient-group + .ingredient-group {
  margin-top: var(--space-lg);
}

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

.ingredient-item,
.instruction-step {
  position: relative;
  border-bottom: 1px solid var(--color-border);
}

.ingredient-item label,
.instruction-step label {
  display: flex;
  gap: 0.75rem;
  padding-block: 0.7rem;
  cursor: pointer;
}

.ingredient-item input,
.instruction-step input {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  margin-top: 0.15rem;
  accent-color: var(--color-success);
}

.ingredient-item.is-complete .ingredient-text,
.instruction-step.is-complete .instruction-content {
  color: var(--color-muted);
  text-decoration: line-through;
}

.ingredient-quantity {
  font-weight: 800;
}

.instruction-step {
  padding-block: 0.7rem;
}

.step-number {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--color-secondary);
  font-weight: 800;
}

.instruction-content h3 {
  margin-bottom: 0.35rem;
  font-family: var(--font-body);
  font-size: 1.05rem;
}

.instruction-content p {
  margin: 0;
}

.timer-badge {
  display: inline-flex;
  margin-top: 0.6rem;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-round);
  color: var(--color-secondary);
  background: var(--color-surface-warm);
  font-size: 0.82rem;
  font-weight: 750;
}

.nutrition-panel {
  padding: clamp(1.3rem, 4vw, 2.5rem);
  border-top: 1px solid var(--color-border);
}

.nutrition-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.nutrition-item {
  padding: 0.8rem;
  border-radius: var(--radius-small);
  background: var(--color-background);
}

.nutrition-item span,
.nutrition-item strong {
  display: block;
}

.nutrition-item span {
  color: var(--color-muted);
  font-size: 0.78rem;
}

.taxonomy-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0;
  margin: var(--space-lg) 0;
  list-style: none;
}

.ingredient-knowledge {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);
  background: var(--color-surface-warm);
  font-size: 0.88rem;
}

.ingredient-knowledge a {
  font-weight: 750;
}

.rating-panel {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: var(--space-xl);
  padding: clamp(1.2rem, 4vw, 2.5rem);
  margin-block: var(--space-xl);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-large);
  background: var(--color-surface);
}

.rating-panel form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.rating-panel label {
  display: grid;
  gap: 0.35rem;
  color: var(--color-muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.rating-panel input,
.rating-panel select,
.rating-panel textarea {
  width: 100%;
  padding: 0.65rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-small);
  background: #fff;
}

.rating-review,
.rating-panel [data-rating-message] {
  grid-column: 1 / -1;
}

.site-footer {
  padding-block: var(--space-xl) var(--space-lg);
  margin-top: var(--space-xl);
  color: #fff;
  background: var(--color-secondary);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--space-xl);
}

.site-footer h2,
.site-footer h3,
.site-footer a {
  color: #fff;
}

.site-footer ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

.site-footer li + li {
  margin-top: 0.45rem;
}

.footer-bottom {
  padding-top: var(--space-lg);
  margin-top: var(--space-lg);
  border-top: 1px solid rgb(255 255 255 / 18%);
  color: rgb(255 255 255 / 72%);
  font-size: 0.85rem;
}

.empty-state {
  padding: var(--space-xl);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-large);
  background: var(--color-surface);
  text-align: center;
}

.tool-page {
  min-height: 65vh;
}

.tool-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  padding: clamp(1rem, 3vw, 2rem);
  margin-bottom: var(--space-xl);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-large);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.tool-form label,
.day-card label,
.month-filter {
  display: grid;
  gap: 0.4rem;
  color: var(--color-muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.tool-form input,
.tool-form select,
.tool-form textarea,
.day-card input,
.day-card select,
.month-filter select {
  width: 100%;
  min-height: 46px;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-small);
  color: var(--color-text);
  background: #fff;
}

.tool-form textarea {
  min-height: 130px;
  resize: vertical;
}

.tool-form .check-field {
  display: flex;
  align-items: center;
  align-self: end;
  min-height: 46px;
}

.tool-form .check-field input {
  width: 20px;
  min-height: 20px;
}

.tool-form-actions,
.filter-actions {
  display: flex;
  align-items: end;
  gap: 0.6rem;
  grid-column: 1 / -1;
}

.compact-tool-form {
  grid-template-columns: 1fr 1fr auto;
  align-items: end;
}

.leftover-form {
  grid-template-columns: 1fr auto;
  align-items: end;
}

.leftover-form label {
  grid-column: 1;
}

.match-note {
  color: var(--color-success);
  font-size: 0.85rem;
  font-weight: 800;
}

.loading-state {
  padding: var(--space-lg);
  color: var(--color-muted);
  text-align: center;
}

.week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.75rem;
}

.day-card {
  display: grid;
  align-content: start;
  gap: 0.8rem;
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);
  background: var(--color-surface);
}

.day-card select {
  min-width: 0;
}

.shopping-list-panel {
  padding: clamp(1rem, 4vw, 2.5rem);
  margin-top: var(--space-xl);
  border-radius: var(--radius-large);
  background: var(--color-surface-warm);
}

.shopping-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem 1.5rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.shopping-list li {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--color-border);
}

.shopping-list label {
  display: flex;
  gap: 0.7rem;
  cursor: pointer;
}

.shopping-list input {
  width: 20px;
  height: 20px;
  accent-color: var(--color-success);
}

.shopping-list .is-complete span {
  color: var(--color-muted);
  text-decoration: line-through;
}

.month-filter {
  max-width: 320px;
  margin-bottom: var(--space-lg);
}

.season-groups {
  display: grid;
  gap: var(--space-xl);
}

.ingredient-hero,
.guide-hero {
  overflow: hidden;
  max-height: 620px;
  border-radius: var(--radius-large);
  background: var(--color-surface-warm);
}

.ingredient-hero img,
.guide-hero img {
  display: block;
  width: 100%;
  height: min(55vw, 620px);
  object-fit: cover;
}

.entry-content > * + * {
  margin-top: 1.2em;
}

.entry-content h2,
.entry-content h3 {
  margin-top: 1.4em;
}

[hidden] {
  display: none !important;
}

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

  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .recipe-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .week-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  .menu-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    inset: 82px 0 auto;
    display: none;
    padding: var(--space-lg);
    border-top: 1px solid var(--color-border);
    background: var(--color-background);
    box-shadow: var(--shadow-card);
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    align-items: stretch;
    flex-direction: column;
  }

  .site-nav a {
    display: block;
    padding: 0.65rem 0;
    font-size: 1.1rem;
  }

  .hero-inner,
  .recipe-hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: 300px;
  }

  .tool-grid {
    grid-template-columns: 1fr;
  }

  .recipe-card-content {
    grid-template-columns: 1fr;
  }

  .ingredients-panel {
    border-right: 0;
    border-bottom: 1px solid var(--color-border);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .tool-form,
  .compact-tool-form,
  .leftover-form {
    grid-template-columns: 1fr 1fr;
  }

  .week-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rating-panel {
    grid-template-columns: 1fr;
  }
}

/* Magazine archive and long form editorial articles. */
.magazine-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.magazine-card {
  overflow: hidden;
  border: 1px solid #e2d7ca;
  border-radius: 1rem;
  background: #fffefa;
  box-shadow: 0 12px 32px rgb(73 50 35 / 7%);
}

.magazine-card-image {
  position: relative;
  display: block;
  aspect-ratio: 4 / 2.7;
  overflow: hidden;
  text-decoration: none;
}

.magazine-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}

.magazine-card:hover .magazine-card-image img {
  transform: scale(1.025);
}

.magazine-card-image .generated-image-badge {
  position: absolute;
  top: 0.7rem;
  right: auto;
  bottom: auto;
  left: 0.7rem;
}

.magazine-card-body {
  padding: 1.25rem;
}

.magazine-card-body .eyebrow {
  margin-bottom: 0.55rem;
}

.magazine-card-body h2,
.magazine-card-body h3 {
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  font-weight: 600;
}

.magazine-card-body h2 a,
.magazine-card-body h3 a {
  color: #3e4035;
  text-decoration: none;
}

.magazine-card-body p {
  color: #5b574f;
  font-size: 0.98rem;
  line-height: 1.68;
}

.magazine-card-link {
  color: #a9472b;
  font-weight: 750;
}

.magazine-archive .magazine-card:first-child {
  grid-column: span 2;
}

.magazine-archive .magazine-card:first-child .magazine-card-image {
  aspect-ratio: 8 / 3.15;
}

.guide-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.25rem;
  margin-top: 1.25rem;
  color: #625e54;
  font-size: 0.9rem;
  font-weight: 650;
}

.single-guide .guide-hero {
  overflow: hidden;
  margin: 0 auto;
  padding: 8px;
  border: 0;
  background: #fff;
}

.single-guide .guide-hero img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 8.2;
  object-fit: cover;
  border-radius: 0.72rem;
}

.single-guide .guide-hero .generated-image-notice {
  padding: 0.7rem 0.45rem 0.35rem;
  margin: 0;
}

.guide-reading-shell {
  width: min(calc(100% - 2rem), 1080px);
  margin-inline: auto;
}

.single-guide .guide-reading-shell .entry-content {
  width: 100%;
  color: #3f4038;
  font-family: var(--font-body);
  font-size: 1.14rem;
  font-weight: 500;
  line-height: 1.82;
}

.single-guide .entry-content > * + * {
  margin-top: 1.2rem;
}

.single-guide .entry-content p,
.single-guide .entry-content li {
  max-width: none;
}

.single-guide .entry-content h2 {
  padding-top: 1.55rem;
  margin-bottom: 0.55rem;
  color: #4f5b37;
  font-size: clamp(1.75rem, 3vw, 2.45rem);
  font-weight: 600;
}

.single-guide .entry-content ul,
.single-guide .entry-content ol {
  padding-left: 1.45rem;
}

.single-guide .entry-content li + li {
  margin-top: 0.55rem;
}

.guide-lead {
  color: #44463b;
  font-size: clamp(1.2rem, 2vw, 1.4rem);
  font-weight: 550;
  line-height: 1.65;
}

.guide-toc {
  padding: 1.35rem 1.5rem;
  border: 1px solid #ded4c7;
  border-radius: 0.9rem;
  background: linear-gradient(145deg, #fffefa, #f5eee4);
}

.guide-toc strong {
  display: block;
  margin-bottom: 0.65rem;
  color: #a9472b;
  font-family: var(--font-heading);
  font-size: 1.28rem;
}

.guide-toc ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem 2rem;
  margin: 0;
}

.guide-tip {
  position: relative;
  padding: 1.25rem 1.35rem 1.25rem 1.5rem;
  border-left: 5px solid #b85f42;
  border-radius: 0 0.85rem 0.85rem 0;
  background: #f7efe3;
  color: #46453d;
}

.guide-tip strong {
  color: #8e402b;
}

.guide-related {
  margin-top: var(--space-xl);
}

@media (max-width: 900px) {
  .magazine-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 650px) {
  .magazine-grid {
    grid-template-columns: 1fr;
  }

  .magazine-archive .magazine-card:first-child {
    grid-column: auto;
  }

  .magazine-archive .magazine-card:first-child .magazine-card-image,
  .magazine-card-image {
    aspect-ratio: 4 / 2.75;
  }

  .guide-toc ol {
    grid-template-columns: 1fr;
  }

  .single-guide .guide-reading-shell .entry-content {
    font-size: 1.05rem;
  }
}

@media (max-width: 600px) {
  :root {
    --space-xl: 2.75rem;
  }

  .site-shell {
    width: min(calc(100% - 1.2rem), var(--content-width));
  }

  .site-logo {
    width: 205px;
  }

  .hero-search,
  .archive-search {
    align-items: stretch;
    border-radius: var(--radius-medium);
    flex-direction: column;
  }

  .hero-search button,
  .archive-search button {
    width: 100%;
  }

  .hero-visual {
    min-height: 250px;
  }

  .hero-plate {
    border-width: 18px;
  }

  .hero-note {
    right: 2%;
    bottom: 0;
    font-size: 0.85rem;
  }

  .recipe-grid,
  .category-grid,
  .recipe-filters,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .recipe-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .recipe-actions .button {
    flex: 1 1 calc(50% - 0.6rem);
  }

  .nutrition-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

  .tool-form,
  .compact-tool-form,
  .leftover-form,
  .week-grid,
  .shopping-list {
    grid-template-columns: 1fr;
  }

  .leftover-form label,
  .tool-form-actions {
    grid-column: 1;
  }
}

@media print {
  .site-header,
  .site-footer,
  .breadcrumbs,
  .recipe-actions,
  .favorite-button,
  .related-recipes,
  .kitchen-planner-box,
  .ad-slot {
    display: none !important;
  }

  .planner-controls,
  .week-grid,
  .shopping-list-panel .section-heading .button {
    display: none !important;
  }

  body {
    color: #000;
    background: #fff;
    font-size: 11pt;
  }

  .site-shell,
  .reading-width {
    width: 100%;
  }

  .recipe-hero {
    padding: 0;
  }

  .recipe-hero-grid,
  .recipe-card-content {
    display: block;
  }

  .recipe-hero-image {
    max-width: 360px;
    margin-bottom: 1rem;
  }

  .recipe-card-full {
    border: 0;
    box-shadow: none;
  }

  .recipe-card-header {
    padding: 1rem 0;
    color: #000;
    background: transparent;
  }

  .ingredients-panel,
  .instructions-panel,
  .nutrition-panel {
    padding: 1rem 0;
    border: 0;
    background: transparent;
  }
}

/* Editorial homepage inspired by classic illustrated cookbooks. */
.home-editorial {
  --editorial-sage: #66724a;
  --editorial-sage-dark: #4f5b37;
  --editorial-terracotta: #b85f42;
  --editorial-cream: #fbf5ec;
  --editorial-paper: #fffdf9;
  --editorial-ink: #3e4035;
}

.site-header {
  background: rgb(255 253 249 / 96%);
}

.header-inner {
  min-height: 94px;
}

.site-logo {
  width: clamp(230px, 25vw, 315px);
}

.site-nav a {
  position: relative;
  padding-block: 0.65rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.site-nav a::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  content: "";
  background: var(--color-primary);
  transform: scaleX(0);
  transition: transform 160ms ease;
}

.site-nav a:hover::after,
.site-nav .current-menu-item > a::after {
  transform: scaleX(1);
}

.editorial-hero {
  overflow: hidden;
  border-bottom: 1px solid var(--color-border);
  background:
    radial-gradient(circle at 6% 20%, rgb(184 95 66 / 8%), transparent 28%),
    linear-gradient(105deg, #fffaf3 0%, #f9f1e7 48%, #eee6da 100%);
}

.editorial-hero-grid {
  display: grid;
  min-height: 535px;
  grid-template-columns: minmax(360px, 0.88fr) minmax(480px, 1.12fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}

.editorial-hero-copy {
  position: relative;
  z-index: 2;
  padding-block: 3.5rem;
}

.script-kicker {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--editorial-sage-dark);
  font-family: "Segoe Script", "Brush Script MT", cursive;
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  font-style: italic;
}

.editorial-hero h1 {
  max-width: 660px;
  margin-bottom: 0.3em;
  color: var(--editorial-ink);
  font-size: clamp(2.65rem, 5.2vw, 4.4rem);
  font-weight: 500;
  letter-spacing: -0.045em;
}

.editorial-hero-copy > p {
  max-width: 600px;
  color: #5f5b52;
  font-size: 1.05rem;
  line-height: 1.55;
}

.editorial-hero .hero-search {
  margin-top: 1.5rem;
  box-shadow: 0 12px 32px rgb(82 56 38 / 10%);
}

.search-symbol {
  display: grid;
  width: 2.25rem;
  flex: 0 0 auto;
  place-items: center;
  color: var(--editorial-terracotta);
  font-size: 1.45rem;
}

.editorial-hero .button,
.home-editorial .button:not(.button-secondary) {
  border-color: var(--editorial-terracotta);
  background: var(--editorial-terracotta);
}

.editorial-hero .button:hover,
.home-editorial .button:not(.button-secondary):hover {
  border-color: #96482f;
  background: #96482f;
}

.hero-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.35rem;
  margin-top: 1.1rem;
  color: #5f6552;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.86rem;
}

.hero-benefits span::first-letter {
  color: var(--editorial-terracotta);
}

.editorial-hero-media {
  position: relative;
  min-height: 535px;
  margin: 0;
}

.editorial-hero-media > a:first-child {
  position: absolute;
  inset: 0 calc((100vw - min(100vw - 2rem, var(--content-width))) / -2) 0 0;
  overflow: hidden;
}

.editorial-hero-media > a:first-child::after {
  position: absolute;
  inset: 0 auto 0 0;
  width: 28%;
  content: "";
  background: linear-gradient(90deg, #f9f1e7, transparent);
}

.editorial-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.editorial-hero-media > .generated-image-notice {
  position: absolute;
  z-index: 3;
  top: 1rem;
  right: 1rem;
  max-width: 250px;
  border: 1px solid rgb(255 255 255 / 70%);
  border-radius: 0.7rem;
  color: #fff;
  background: rgb(44 40 37 / 72%);
  backdrop-filter: blur(10px);
  text-align: left;
}

.editorial-hero-media > .generated-image-notice strong {
  color: #fff;
}

.hero-recipe-note {
  position: absolute;
  z-index: 4;
  right: 1rem;
  bottom: 2rem;
  width: min(290px, 75%);
  padding: 1rem 1.2rem;
  border: 7px solid #fff;
  color: var(--editorial-ink);
  background: #fffdf9;
  box-shadow: 0 16px 40px rgb(44 40 37 / 18%);
  text-decoration: none;
  transform: rotate(2deg);
}

.hero-recipe-note span,
.hero-recipe-note strong {
  display: block;
}

.hero-recipe-note span {
  color: var(--editorial-terracotta);
  font-family: "Segoe Script", "Brush Script MT", cursive;
  font-size: 0.85rem;
}

.hero-recipe-note strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
}

.ornament-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.35rem;
  text-align: center;
}

.ornament-heading > span {
  color: var(--editorial-sage);
  font-size: 1.65rem;
}

.ornament-heading h2 {
  margin: 0;
  color: var(--editorial-ink);
  font-size: clamp(1.8rem, 3.4vw, 2.55rem);
  font-weight: 500;
}

.ornament-heading .eyebrow {
  margin-bottom: 0.15rem;
}

.compact-heading {
  margin-bottom: 1.6rem;
}

.compact-heading h2 {
  font-size: clamp(1.55rem, 3vw, 2.1rem);
}

.home-discovery-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 0.31fr);
  gap: 1.6rem;
  align-items: stretch;
}

.home-latest-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.home-latest-grid .recipe-card {
  border-radius: 0.75rem;
}

.home-latest-grid .recipe-card-body {
  padding: 0.8rem 0.9rem 1rem;
}

.home-latest-grid .recipe-card h3 {
  font-family: var(--font-body);
  font-size: 0.94rem;
  line-height: 1.25;
}

.home-latest-grid .recipe-card-image {
  aspect-ratio: 4 / 2.8;
}

.home-latest-grid .recipe-badge {
  display: none;
}

.home-latest-grid .favorite-button {
  width: 34px;
  height: 34px;
  font-size: 1rem;
}

.home-latest-grid .generated-image-badge {
  left: 0.5rem;
  top: 0.5rem;
  padding: 0.18rem 0.45rem;
  font-size: 0.6rem;
}

.home-latest-grid .recipe-card-meta {
  gap: 0.4rem;
  font-size: 0.75rem;
}

.centered-action {
  margin: 1rem 0 0;
  text-align: center;
}

.button-small {
  min-height: 38px;
  padding: 0.5rem 1rem;
  font-size: 0.82rem;
}

.season-feature {
  position: relative;
  overflow: hidden;
  min-height: 100%;
  border: 1px solid #d8d6c6;
  border-radius: 1rem;
  background: #eef0e6;
}

.season-feature-image {
  position: absolute;
  inset: 0;
  display: block;
}

.season-feature-image::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgb(246 246 238 / 98%) 0%, rgb(246 246 238 / 88%) 45%, rgb(246 246 238 / 12%) 100%);
}

.season-feature-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.season-feature-image .generated-image-badge {
  right: 0.6rem;
  left: auto;
}

.season-feature-copy {
  position: relative;
  z-index: 2;
  width: 74%;
  padding: 1.7rem 1.35rem;
}

.season-feature-copy h2 {
  margin-bottom: 0.35em;
  color: var(--editorial-sage-dark);
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  font-weight: 500;
}

.season-feature-copy p {
  font-size: 0.88rem;
}

.home-editorial .button-secondary {
  color: var(--editorial-sage-dark);
  border-color: var(--editorial-sage);
}

.home-editorial .button-secondary:hover {
  color: #fff;
  background: var(--editorial-sage);
}

.home-categories {
  padding-top: 1rem;
}

.category-ribbon {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 0.7rem;
}

.category-tile {
  display: grid;
  min-width: 0;
  min-height: 128px;
  padding: 0.75rem 0.45rem;
  place-items: center;
  align-content: center;
  border: 1px solid var(--color-border);
  border-radius: 0.85rem;
  color: var(--editorial-ink);
  background: linear-gradient(145deg, #fffdf9, #fbf4eb);
  text-align: center;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.category-tile:hover {
  color: var(--editorial-terracotta);
  box-shadow: 0 10px 25px rgb(73 50 35 / 8%);
  transform: translateY(-3px);
}

.category-icon {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 0.45rem;
  place-items: center;
  border-radius: 50%;
  color: var(--editorial-terracotta);
  background: #f3e6d8;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
}

.category-tile strong {
  overflow: hidden;
  max-width: 100%;
  font-size: 0.82rem;
  text-overflow: ellipsis;
}

.category-tile small {
  color: var(--color-muted);
  font-size: 0.68rem;
}

.home-tools {
  border-block: 1px solid #e7dfd3;
  background: #f7f2ea;
}

.editorial-tools-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.editorial-tool {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 84px;
  padding: 0.9rem 1rem;
  border: 1px solid #ded4c6;
  border-radius: 0.75rem;
  color: var(--editorial-ink);
  background: rgb(255 253 249 / 85%);
  text-decoration: none;
}

.editorial-tool > span {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--editorial-sage);
  font-family: Georgia, "Times New Roman", serif;
}

.editorial-tool strong,
.editorial-tool small {
  display: block;
}

.editorial-tool strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
}

.editorial-tool small {
  color: var(--color-muted);
  font-size: 0.72rem;
}

.home-story {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.home-guides-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 1rem;
}

.guide-teasers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.guide-teasers article {
  position: relative;
  overflow: hidden;
  min-height: 245px;
  padding: 1.4rem;
  border: 1px solid #ded4c7;
  border-radius: 0.9rem;
  background: linear-gradient(145deg, #fffdf9, #f5eee4);
}

.guide-teasers article::after {
  position: absolute;
  right: 1rem;
  bottom: 0.2rem;
  color: #78825f;
  content: "❧";
  font-size: 2.5rem;
  opacity: 0.28;
}

.guide-teasers h3 {
  font-size: 1.3rem;
  font-weight: 500;
}

.guide-teasers h3 a {
  color: #3e4035;
  text-decoration: none;
}

.guide-teasers p {
  color: #686158;
  font-size: 0.82rem;
}

.guide-more {
  color: #b85f42;
  font-size: 0.8rem;
  font-weight: 750;
}

.kitchen-planner-box {
  padding: 1.6rem;
  border: 1px solid #d7d6c6;
  border-radius: 0.9rem;
  background:
    radial-gradient(circle at 88% 82%, rgb(102 114 74 / 23%) 0 10%, transparent 10.5%),
    linear-gradient(145deg, #eef0e6, #f7f3ea);
}

.kitchen-planner-box h2 {
  color: #4f5b37;
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  font-weight: 500;
}

.kitchen-planner-box p {
  color: #606355;
  font-size: 0.86rem;
}

.kitchen-planner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.kitchen-planner-actions .button {
  min-height: 44px;
}

.kitchen-planner-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
  padding: 0;
  margin: 1rem 0 0;
  list-style: none;
  color: #555b45;
  font-size: 0.76rem;
}

.kitchen-planner-benefits li::before {
  margin-right: 0.35rem;
  color: #66724a;
  content: "✓";
  font-weight: 800;
}

.author-box {
  display: grid;
  grid-template-columns: 100px 1fr;
  align-items: center;
  gap: 1.3rem;
  padding: clamp(1.2rem, 3vw, 2rem);
  margin-block: 2rem;
  border: 1px solid #ded4c7;
  border-radius: 1rem;
  background: linear-gradient(145deg, #fffefa, #f3eee5);
}

.author-box-mark {
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  border: 1px solid #d3cfbf;
  border-radius: 50%;
  color: #66724a;
  background: #ede9df;
  font-family: "Segoe Script", "Brush Script MT", cursive;
  font-size: 3.5rem;
}

.author-box h2 {
  margin-bottom: 0.25rem;
  color: #4f5b37;
  font-size: 1.55rem;
  font-weight: 500;
}

.author-box p {
  margin: 0;
  color: #686158;
  font-size: 0.86rem;
}

.product-recommendation {
  padding: 1.5rem;
  margin-block: 2rem;
  border: 1px solid #ded4c7;
  border-radius: 1rem;
  background: #f7f1e8;
}

.affiliate-disclosure {
  margin: 0.8rem 0 0;
  color: #6d675e;
  font-size: 0.72rem;
}

.editorial-card,
.planner-card {
  min-height: 285px;
  padding: clamp(1.5rem, 3vw, 2.35rem);
  border: 1px solid var(--color-border);
  border-radius: 1rem;
}

.editorial-card {
  display: grid;
  grid-template-columns: 150px 1fr;
  align-items: center;
  gap: 1.5rem;
  background: #fffdf9;
}

.editorial-mark {
  position: relative;
  display: grid;
  width: 140px;
  height: 140px;
  place-items: center;
  border: 1px solid #d8d3c2;
  border-radius: 50%;
  color: var(--editorial-sage);
  background: #f2ede3;
  font-family: "Segoe Script", "Brush Script MT", cursive;
  font-size: 4.2rem;
}

.editorial-mark small {
  position: absolute;
  right: 3px;
  bottom: 6px;
  font-size: 2rem;
}

.editorial-card h2,
.planner-card h2 {
  font-size: clamp(1.7rem, 3vw, 2.25rem);
  font-weight: 500;
}

.editorial-card p,
.planner-card p {
  color: #615d54;
  font-size: 0.9rem;
}

.planner-card {
  position: relative;
  overflow: hidden;
  padding-right: clamp(2rem, 18vw, 12rem);
  background:
    radial-gradient(circle at 92% 55%, rgb(102 114 74 / 24%) 0 13%, transparent 14%),
    radial-gradient(circle at 88% 50%, #fffdf9 0 22%, transparent 23%),
    linear-gradient(110deg, #f3ece2, #e9e4d8);
}

.planner-card::after {
  position: absolute;
  right: 3.2rem;
  bottom: 3.1rem;
  color: var(--editorial-sage);
  content: "♡";
  font-family: Georgia, "Times New Roman", serif;
  font-size: 3.5rem;
}

.planner-card ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1rem;
  padding: 0;
  margin: 1rem 0 0;
  color: var(--color-muted);
  font-size: 0.72rem;
  list-style: none;
}

.planner-card li::before {
  margin-right: 0.3rem;
  color: var(--editorial-sage);
  content: "✓";
}

.site-footer {
  padding-block: 2.5rem 0;
  margin-top: 0;
  color: var(--color-text);
  background: #fbf7f0;
}

.footer-grid {
  grid-template-columns: 1.45fr repeat(3, 0.72fr);
  gap: 2rem;
}

.site-footer h2,
.site-footer h3,
.site-footer a {
  color: var(--color-text);
}

.site-footer h3 {
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-footer a {
  font-size: 0.82rem;
  text-decoration: none;
}

.footer-brand img {
  width: min(100%, 265px);
}

.footer-brand p {
  max-width: 300px;
  color: var(--color-muted);
  font-family: "Segoe Script", "Brush Script MT", cursive;
  font-size: 0.9rem;
}

.footer-bottom {
  padding-block: 0.65rem;
  margin-top: 2rem;
  border-top: 0;
  color: #fff;
  background: var(--editorial-sage, #66724a);
  box-shadow: 50vw 0 var(--editorial-sage, #66724a), -50vw 0 var(--editorial-sage, #66724a);
  text-align: center;
}

@media (max-width: 1100px) {
  .editorial-hero-grid {
    grid-template-columns: minmax(330px, 0.85fr) minmax(410px, 1.15fr);
  }

  .home-discovery-grid {
    grid-template-columns: 1fr;
  }

  .season-feature {
    min-height: 310px;
  }

  .category-ribbon {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  .header-inner {
    min-height: 82px;
  }

  .site-nav {
    inset: 82px 0 auto;
  }

  .editorial-hero-grid {
    width: 100%;
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 0;
  }

  .editorial-hero-copy {
    width: min(calc(100% - 2rem), var(--content-width));
    margin-inline: auto;
    padding-block: 3rem 2.3rem;
  }

  .editorial-hero-media {
    min-height: 410px;
  }

  .editorial-hero-media > a:first-child {
    inset: 0;
  }

  .editorial-hero-media > a:first-child::after {
    display: none;
  }

  .home-latest-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .editorial-tools-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-story {
    grid-template-columns: 1fr;
  }

  .home-guides-grid,
  .guide-teasers {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .editorial-hero h1 {
    font-size: clamp(2.35rem, 13vw, 3.4rem);
  }

  .editorial-hero-media {
    min-height: 330px;
  }

  .editorial-hero-media > .generated-image-notice {
    top: 0.65rem;
    right: 0.65rem;
    max-width: 210px;
    padding: 0.5rem 0.65rem;
    font-size: 0.68rem;
  }

  .hero-recipe-note {
    right: 0.65rem;
    bottom: 0.8rem;
  }

  .home-latest-grid,
  .category-ribbon,
  .editorial-tools-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .editorial-card {
    grid-template-columns: 1fr;
  }

  .author-box {
    grid-template-columns: 1fr;
  }

  .editorial-mark {
    width: 110px;
    height: 110px;
  }

  .planner-card {
    padding-right: 1.5rem;
  }

  .planner-card::after {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* Shared editorial styling for archives, articles and interactive tools. */
body:not(.home) {
  background:
    radial-gradient(circle at 4% 14%, rgb(184 95 66 / 5%), transparent 20rem),
    #fffdf9;
}

body:not(.home) .archive-header,
body:not(.home) .page-header {
  position: relative;
  overflow: hidden;
  padding: clamp(2rem, 5vw, 4.2rem);
  margin: 0 auto 2rem;
  border: 1px solid #e7ddcf;
  border-radius: 1.15rem;
  background:
    radial-gradient(circle at 91% 22%, rgb(102 114 74 / 14%) 0 8%, transparent 8.4%),
    radial-gradient(circle at 94% 23%, rgb(255 255 255 / 80%) 0 15%, transparent 15.4%),
    linear-gradient(120deg, #fcf6ed, #f0ebdf);
}

body:not(.home) .archive-header::after,
body:not(.home) .page-header::after {
  position: absolute;
  right: clamp(1.5rem, 5vw, 4rem);
  bottom: 1rem;
  color: #77815e;
  content: "❧";
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 6vw, 4.5rem);
  opacity: 0.55;
  transform: rotate(-18deg);
}

body:not(.home) .archive-header > *,
body:not(.home) .page-header > * {
  position: relative;
  z-index: 1;
}

body:not(.home) .archive-header h1,
body:not(.home) .page-header h1 {
  max-width: 780px;
  color: #3e4035;
  font-size: clamp(2.5rem, 6vw, 4.4rem);
  font-weight: 500;
}

body:not(.home) .archive-header > p,
body:not(.home) .page-header > p {
  max-width: 690px;
  color: #625e54;
}

body:not(.home) .eyebrow {
  color: #b85f42;
}

.post-type-archive-recipe .archive-search {
  margin-top: 1.35rem;
}

.recipe-filters {
  border-color: #ded4c7;
  border-radius: 1rem;
  background: #f8f3eb;
  box-shadow: 0 12px 32px rgb(73 50 35 / 6%);
}

.recipe-filters .filter-field select {
  border-color: #d9cfc1;
  background: #fffdf9;
}

body:not(.home) .recipe-card {
  border-radius: 0.85rem;
  border-color: #ded5c8;
  background: #fffefa;
}

body:not(.home) .recipe-card-image {
  aspect-ratio: 4 / 2.9;
}

body:not(.home) .recipe-card-body h2,
body:not(.home) .recipe-card-body h3 {
  font-size: 1.25rem;
  font-weight: 500;
}

body:not(.home) .recipe-card-body p {
  color: #686158;
  font-size: 0.9rem;
}

.post-type-archive-guide .recipe-card-placeholder {
  background:
    radial-gradient(circle at 72% 28%, rgb(184 95 66 / 20%) 0 8%, transparent 8.5%),
    radial-gradient(circle at 30% 70%, rgb(102 114 74 / 19%) 0 13%, transparent 13.5%),
    linear-gradient(145deg, #f7eee3, #e9eadf);
  font-family: "Segoe Script", "Brush Script MT", cursive;
  font-style: italic;
}

.post-type-archive-ingredient .category-grid,
.tool-page .category-grid {
  gap: 0.85rem;
}

.post-type-archive-ingredient .category-card,
.tool-page .category-card {
  position: relative;
  overflow: hidden;
  min-height: 150px;
  border-radius: 0.9rem;
  background: linear-gradient(145deg, #fffdf9, #f5eee4);
}

.post-type-archive-ingredient .category-card::after,
.tool-page .category-card::after {
  position: absolute;
  right: 0.8rem;
  bottom: -0.35rem;
  color: #78825f;
  content: "❧";
  font-size: 2.2rem;
  opacity: 0.35;
}

.post-type-archive-ingredient .category-card strong,
.tool-page .category-card strong {
  color: #4f5b37;
  font-size: 1.45rem;
  font-weight: 500;
}

.tool-page {
  max-width: var(--content-width);
}

.tool-page .tool-form {
  border-color: #ded4c7;
  border-radius: 1rem;
  background: linear-gradient(145deg, #fffefa, #f7f0e6);
  box-shadow: 0 14px 35px rgb(73 50 35 / 7%);
}

.tool-page .tool-form label,
.tool-page .day-card label {
  color: #565a46;
}

.tool-page .tool-form input,
.tool-page .tool-form select,
.tool-page .tool-form textarea,
.tool-page .day-card input,
.tool-page .day-card select {
  border-color: #dcd1c3;
  border-radius: 0.65rem;
  background: #fffefa;
}

.tool-page .week-grid {
  gap: 0.85rem;
}

.tool-page .day-card {
  border-color: #ded4c7;
  border-radius: 0.9rem;
  background: #fffefa;
  box-shadow: 0 7px 22px rgb(73 50 35 / 4%);
}

.tool-page .day-card h2,
.tool-page .day-card h3 {
  color: #b85f42;
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.shopping-list-panel {
  border: 1px solid #dfd3c5;
  background:
    radial-gradient(circle at 92% 10%, rgb(102 114 74 / 11%) 0 8%, transparent 8.5%),
    #f5ecde;
}

.single-recipe .recipe-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(1.4rem, 4vw, 3.2rem);
  margin-top: 1rem;
  border: 1px solid #e6ddcf;
  border-radius: 1.25rem;
  background: linear-gradient(120deg, #fcf6ed, #f0ebe0);
}

.single-recipe .recipe-hero h1 {
  color: #3e4035;
  max-width: 100%;
  font-size: clamp(2.45rem, 5vw, 4.35rem);
  font-weight: 500;
  hyphens: auto;
  overflow-wrap: break-word;
}

.single-recipe .recipe-hero h1.recipe-title-long {
  font-size: clamp(2.2rem, 3.6vw, 3rem);
  hyphens: none;
  overflow-wrap: normal;
}

.recipe-kickers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 0.8rem;
  margin-bottom: 0.7rem;
}

.recipe-kickers .eyebrow {
  margin: 0;
}

.recipe-source-badge {
  display: inline-flex;
  padding: 0.28rem 0.65rem;
  border: 1px solid rgb(102 114 74 / 38%);
  border-radius: 999px;
  color: #4f5b37;
  background: rgb(255 253 249 / 72%);
  font-family: "Segoe Script", "Brush Script MT", cursive;
  font-size: 0.78rem;
  font-style: italic;
}

.single-recipe .recipe-hero-image {
  border-radius: 1rem;
  box-shadow: 0 18px 42px rgb(73 50 35 / 13%);
}

.single-recipe .generated-image-notice {
  margin-top: 0.25rem;
}

.single-recipe .recipe-meta {
  border-color: #ded4c7;
  background: rgb(255 253 249 / 78%);
}

.single-recipe .recipe-card-full {
  border-radius: 1.1rem;
  border-color: #d8d3c6;
}

.single-recipe .recipe-card-header {
  background:
    radial-gradient(circle at 92% 18%, rgb(255 255 255 / 11%) 0 10%, transparent 10.5%),
    #66724a;
}

.single-recipe .step-number,
.single-recipe .servings-control button {
  background: #66724a;
}

.single-recipe .rating-panel {
  border-color: #ded4c7;
  background: linear-gradient(145deg, #fffefa, #f7f0e6);
}

.single-ingredient .ingredient-hero,
.single-guide .guide-hero {
  border: 8px solid #fff;
  border-radius: 1rem;
  box-shadow: 0 16px 38px rgb(73 50 35 / 10%);
}

.single-ingredient .entry-content,
.single-guide .entry-content,
.page-template-default .entry-content {
  color: #4d4b44;
  font-family: var(--font-body);
  font-size: 1.08rem;
  line-height: 1.8;
}

.single-guide .reading-width.entry-content,
.single-ingredient .reading-width.entry-content {
  width: min(calc(100% - 2rem), 960px);
}

.page-template-default article.reading-width {
  width: min(100%, 960px);
}

.single-guide .entry-content p,
.single-ingredient .entry-content p,
.page-template-default .entry-content p {
  max-width: none;
}

.single-ingredient .entry-content h2,
.single-guide .entry-content h2,
.page-template-default .entry-content h2 {
  color: #4f5b37;
  font-weight: 600;
}

.taxonomy .archive-header .reading-width {
  width: auto;
  margin: 0;
}

@media (max-width: 800px) {
  body:not(.home) .archive-header,
  body:not(.home) .page-header {
    padding: 2rem 1.3rem;
  }

  body:not(.home) .archive-header::after,
  body:not(.home) .page-header::after {
    right: 1rem;
    opacity: 0.25;
  }

  .single-recipe .recipe-hero {
    padding: 1.2rem;
  }
}
