/*
 * Every Step Kitchen V625R2: site-wide reading width, product callout contrast
 * and adaptive article/recipe components.
 * Source: V625R1 live WordPress theme and public HTML capture (2026-11-15).
 * Intent: preserve listing cards, WordPress widget order, existing navigation,
 * article content and product-to-Gumroad worker (separate roadmap workstream).
 */

/* Use the wide site canvas beyond archive pages. Avoid fixing content to a narrow
   column at desktop widths, but protect the readable text rhythm. */
.esk-main > .esk-container:not(.esk-listing-container) {
  width: 100%;
  max-width: 1840px;
  margin-inline: auto;
  padding: clamp(28px,3.5vw,60px) clamp(16px,2.8vw,48px);
}

/* WordPress renders product collections through the editorial post template;
   this layout must therefore work for both editorial and product-related posts. */
.esk-main .esk-article-layout {
  width: 100%;
  max-width: none;
  min-width: 0;
  grid-template-columns: minmax(0,1fr) clamp(230px,17vw,300px);
  gap: clamp(24px,3vw,58px);
  align-items: start;
}
.esk-main .esk-article-layout > .esk-post {
  width: 100%;
  min-width: 0;
  max-width: none;
}
.esk-main .esk-article-layout > .esk-article-sidebar {
  width: 100%;
  min-width: 0;
}
.esk-main .esk-article-layout .esk-post-content,
.esk-main .esk-article-layout .esk-post-content > * {
  max-width: 100%;
}
.esk-main .esk-article-layout .esk-post-content {
  overflow-wrap: break-word;
  font-size: clamp(1.04rem,0.98rem + 0.17vw,1.16rem);
}
.esk-main .esk-article-layout .esk-post-content p {
  line-height: 1.82;
}
.esk-main .esk-article-layout .esk-post h1 {
  max-width: 24ch;
  line-height: 1.1;
  text-wrap: balance;
}

/* The generated collection markup uses these legacy recipe components inside
   .esk-editorial-article; let the content fill its new column. */
.esk-main .esk-article-layout .esk-recipe-introduction {
  width: 100%;
  max-width: none;
  margin-inline: 0;
  padding: clamp(18px,2vw,30px);
}
.esk-main .esk-article-layout .esk-recipe-card {
  padding: clamp(18px,2.25vw,36px);
}
.esk-main .esk-article-layout .esk-tip-grid {
  grid-template-columns: repeat(auto-fit,minmax(min(100%,250px),1fr));
}
.esk-main .esk-article-layout .esk-editorial-section p + p {
  margin-top: 1.15em;
}
.esk-main .esk-article-layout .esk-editorial-section h2,
.esk-main .esk-article-layout .esk-faq h2,
.esk-main .esk-article-layout .esk-recipe-card-heading h2 {
  font-size: clamp(1.65rem,1.35rem + 0.7vw,2.3rem);
  line-height: 1.2;
}

/* Verified contrast defect: .esk-post-content h2 inherits dark forest green
   on the equally dark .esk-product-cta background (Mexican product post #9).
   Ensure every callout text/link remains legible at every viewport. */
.esk-main .esk-editorial-article .esk-post-content .esk-product-cta {
  background: var(--esk-forest);
  color: #f7fbf7;
  padding: clamp(22px,3vw,46px);
}
.esk-main .esk-editorial-article .esk-post-content .esk-product-cta h2,
.esk-main .esk-editorial-article .esk-post-content .esk-product-cta h3,
.esk-main .esk-editorial-article .esk-post-content .esk-product-cta p,
.esk-main .esk-editorial-article .esk-post-content .esk-product-cta li {
  color: #f7fbf7;
}
.esk-main .esk-editorial-article .esk-post-content .esk-product-cta .esk-eyebrow {
  color: #ffd7c1;
}
.esk-main .esk-editorial-article .esk-post-content .esk-product-cta a:not(.esk-button) {
  color: #fff1d4;
  text-decoration: underline;
}
.esk-main .esk-editorial-article .esk-post-content .esk-product-cta a:not(.esk-button):focus-visible,
.esk-main .esk-editorial-article .esk-post-content .esk-product-cta a:not(.esk-button):hover {
  color: #fff;
}

/* Keep standalone WordPress pages generous without forcing very long lines. */
.esk-main > .esk-container > .esk-post:not(.esk-editorial-article) {
  max-width: min(100%,1160px);
  margin-inline: auto;
}
.esk-main .esk-recipe-page {
  max-width: min(100%,1480px);
}

@media (max-width: 980px) {
  /* At tablet widths a 200px sidebar makes the content unreadably narrow.
     Article first, then responsive widget cards. */
  .esk-main .esk-article-layout {
    display: flex;
    flex-direction: column;
    gap: 28px;
  }
  .esk-main .esk-article-layout > .esk-post {
    order: 1;
  }
  .esk-main .esk-article-layout > .esk-article-sidebar {
    order: 2;
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(min(100%,220px),1fr));
    gap: 16px;
    padding-top: 0;
  }
  .esk-main .esk-article-layout > .esk-article-sidebar .esk-sidebar-widget {
    margin-bottom: 0;
  }
}

@media (max-width: 660px) {
  .esk-main > .esk-container:not(.esk-listing-container) {
    padding: 28px 15px 42px;
  }
  .esk-main .esk-article-layout .esk-post h1 {
    font-size: clamp(2rem,8.5vw,3.25rem);
    overflow-wrap: break-word;
  }
  .esk-main .esk-article-layout .esk-recipe-card {
    margin-block: 32px;
  }
  .esk-main .esk-article-layout .esk-recipe-meta span {
    width: auto;
    max-width: 100%;
  }
  .esk-main .esk-article-layout .esk-post-content,
  .esk-main .esk-article-layout .esk-post-content p {
    overflow-wrap: break-word;
  }
  .esk-main .esk-article-layout .esk-product-cta {
    border-radius: 16px;
  }
}
