/* ============================================================
   Munchi — Blog & programmatic SEO styles
   Matches the landing-page brand. No JS required.
   ============================================================ */
:root {
  --color-bg: #F4F0E6;
  --color-green: #4C5D3E;
  --color-green-dark: #3E4D33;
  --color-beige: #DCC8A6;
  --color-white: #FFFFFF;
  --color-text: #1F241C;
  --color-muted: #6F7568;
  --color-border: rgba(76, 93, 62, 0.14);

  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-xl: 36px;
  --radius-pill: 999px;

  --shadow-soft: 0 18px 50px rgba(31, 36, 28, 0.10);
  --shadow-card: 0 10px 30px rgba(31, 36, 28, 0.08);

  --container: 1120px;
  --content-width: 760px;
  --section-padding: 96px;
}

* , *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.blog-body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--color-green); color: var(--color-bg); }

h1, h2, h3, h4 { font-family: 'Bricolage Grotesque', 'Hanken Grotesk', sans-serif; letter-spacing: -0.02em; }
a { color: var(--color-green); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container--narrow { max-width: var(--content-width); }
.section-h { font-size: 30px; font-weight: 800; margin: 0 0 22px; }
.empty { color: var(--color-muted); padding: 40px 0; text-align: center; }

/* Vertical rhythm: space between stacked top-level sections */
.blog-main > * + * { margin-top: 64px; }
@media (max-width: 640px) { .blog-main > * + * { margin-top: 40px; } }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; text-decoration: none; cursor: pointer;
  border-radius: var(--radius-sm); padding: 13px 22px; border: 1px solid transparent;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn--pill { border-radius: var(--radius-pill); background: var(--color-green); color: #fff; padding: 11px 20px; }
.blog-nav .btn--pill {color: #fff !important; }
.btn--pill:hover { transform: translateY(-2px); box-shadow: 0 14px 26px -12px rgba(76,93,62,.8); }
.btn--beige { background: var(--color-beige); color: var(--color-green-dark); }
.btn--beige:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -14px rgba(220,200,166,.9); }
.btn--ghost { background: var(--color-white); color: var(--color-text); border-color: var(--color-border); }
.btn--ghost:hover { background: #fff; transform: translateY(-2px); }

/* ---- Header ---- */
.blog-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(244,240,230,.85);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--color-border);
}
.blog-header__inner { display: flex; align-items: center; justify-content: space-between; min-height: 112px; }
.blog-header__logo img { height: 90px; width: auto; display: block; }
.blog-nav { display: flex; align-items: center; gap: 26px; }
.blog-nav a { color: #4a4740; text-decoration: none; font-weight: 600; font-size: 15px; }
.blog-nav a:hover, .blog-nav a.is-active { color: var(--color-green); }
.blog-nav .btn { font-size: 14px; }

/* ---- Hero ---- */
.hero { margin-top: 36px; }
.hero--green {
  background: var(--color-green); color: var(--color-bg);
  border-radius: var(--radius-xl); padding: 64px 56px; box-shadow: var(--shadow-soft);
}
.hero__inner { max-width: 720px; }
.hero__title { font-size: 48px; line-height: 1.04; font-weight: 800; margin: 14px 0 0; color: #fff; }
.hero__lead { font-size: 19px; color: rgba(246,242,233,.85); margin: 18px 0 28px; }

.eyebrow { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--color-green); }
.eyebrow--beige { color: var(--color-beige); }

/* ---- Featured ---- */
.featured {
  display: block; margin: 40px 0 28px; padding: 40px;
  background: var(--color-white); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
  text-decoration: none; color: inherit; transition: transform .25s ease, box-shadow .25s ease;
}
.featured:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); }
.featured__title { font-size: 32px; font-weight: 800; margin: 12px 0 10px; }
.featured__excerpt { color: var(--color-muted); font-size: 17px; margin: 0 0 14px; max-width: 60ch; }

/* ---- Cards ---- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 28px 0; }
.card {
  display: flex; flex-direction: column; padding: 26px;
  background: var(--color-white); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-card);
  text-decoration: none; color: inherit; transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); }
.card__label { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--color-green); }
.card__title { font-size: 21px; font-weight: 700; margin: 10px 0 8px; line-height: 1.2; }
.card__excerpt { color: var(--color-muted); font-size: 15px; margin: 0 0 16px; flex: 1; }
.card__meta { font-size: 13px; color: var(--color-muted); }
.card__more { font-weight: 700; color: var(--color-green); font-size: 14px; }
.plan-macros--mini { display: flex; gap: 14px; margin: 4px 0 14px; }
.plan-macros--mini span { display: flex; flex-direction: column; font-size: 12px; color: var(--color-muted); }
.plan-macros--mini strong { font-family: 'Bricolage Grotesque', sans-serif; font-size: 18px; color: var(--color-text); }

/* ---- Chips / pager ---- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 8px; }
.chip { padding: 8px 16px; border-radius: var(--radius-pill); background: var(--color-white); border: 1px solid var(--color-border); color: var(--color-text); text-decoration: none; font-weight: 600; font-size: 14px; }
.chip.is-active, .chip:hover { background: var(--color-green); color: var(--color-bg); border-color: var(--color-green); }
.pager { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 40px 0; }
.pager__count { color: var(--color-muted); font-size: 14px; }

/* ---- Article ---- */
.article { padding: 40px 0 10px; }
.breadcrumbs { font-size: 13px; color: var(--color-muted); margin-bottom: 18px; }
.breadcrumbs a { color: var(--color-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--color-green); }
.breadcrumbs .sep { margin: 0 8px; opacity: .5; }
.article__head { margin-bottom: 30px; }
.article__title { font-size: 44px; line-height: 1.05; font-weight: 800; margin: 10px 0 14px; }
.article__lead { font-size: 20px; color: var(--color-muted); margin: 0 0 16px; }
.article__meta { display: flex; gap: 18px; font-size: 14px; color: var(--color-muted); }
.preview-banner { background: #fff7e6; border: 1px solid #f0d9a8; color: #5a4a23; padding: 10px 16px; border-radius: var(--radius-sm); font-weight: 600; }

/* ---- Prose ---- */
.prose { font-size: 18px; color: #2c322a; }
.prose--lead { font-size: 19px; color: var(--color-muted); }
.prose p { margin: 0 0 20px; }
.prose h2 { font-size: 28px; font-weight: 800; margin: 44px 0 14px; }
.prose h3 { font-size: 21px; font-weight: 700; margin: 30px 0 10px; }
.prose ul, .prose ol { margin: 0 0 20px; padding-left: 22px; }
.prose li { margin: 8px 0; }
.prose a { color: var(--color-green); font-weight: 600; }
.prose blockquote, .prose .tip {
  margin: 26px 0; padding: 18px 22px; border-left: 4px solid var(--color-beige);
  background: #fff; border-radius: var(--radius-sm); color: var(--color-text); box-shadow: var(--shadow-card);
}
.prose img { max-width: 100%; height: auto; border-radius: var(--radius-md); }
.prose table { width: 100%; border-collapse: collapse; margin: 22px 0; font-size: 16px; }
.prose th, .prose td { border: 1px solid var(--color-border); padding: 10px 12px; text-align: left; }
.prose th { background: rgba(76,93,62,.08); }

/* ---- TOC ---- */
.toc { background: var(--color-white); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 18px 22px; margin: 0 0 30px; box-shadow: var(--shadow-card); }
.toc__label { display: block; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--color-muted); margin-bottom: 8px; }
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 6px 0; }
.toc li.toc__sub { padding-left: 16px; }
.toc a { color: var(--color-text); text-decoration: none; font-weight: 600; }
.toc a:hover { color: var(--color-green); }

/* ---- Internal links aside ---- */
.ilinks { background: rgba(76,93,62,.06); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 18px 22px; margin: 30px 0; }
.ilinks__label { display: block; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--color-muted); margin-bottom: 8px; }
.ilinks ul { margin: 0; padding-left: 20px; }
.ilinks li { margin: 6px 0; }

/* ---- FAQ ---- */
.faq { margin: 40px 0; }
.faq__heading { font-size: 28px; font-weight: 800; margin: 0 0 18px; }
.faq__item { background: var(--color-white); border: 1px solid var(--color-border); border-radius: var(--radius-md); margin-bottom: 12px; box-shadow: var(--shadow-card); padding: 4px 22px; }
.faq__q { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; font-weight: 700; font-size: 18px; }
.faq__q::-webkit-details-marker { display: none; }
.faq__icon { position: relative; width: 22px; height: 22px; flex: 0 0 auto; }
.faq__icon::before, .faq__icon::after { content: ""; position: absolute; background: var(--color-green); border-radius: 2px; transition: transform .3s ease; }
.faq__icon::before { top: 10px; left: 2px; width: 18px; height: 2.4px; }
.faq__icon::after { left: 10px; top: 2px; width: 2.4px; height: 18px; }
.faq__item[open] .faq__icon::after { transform: rotate(90deg); opacity: 0; }
.faq__a { color: var(--color-muted); font-size: 16px; padding: 0 0 20px; }

/* ---- Related ---- */
.related { margin: 50px 0; }
.related__heading { font-size: 26px; font-weight: 800; margin: 0 0 20px; }

/* ---- CTA block ---- */
.cta-block { padding: 40px 24px; }
.cta-block__inner { max-width: var(--container); margin: 0 auto; background: var(--color-green); color: #fff; border-radius: var(--radius-xl); padding: 64px 48px; text-align: center; box-shadow: var(--shadow-soft); }
.cta-block__title { font-size: 38px; font-weight: 800; margin: 0 0 12px; color: var(--color-beige); }
.cta-block__text { font-size: 19px; color: rgba(246,242,233,.85); margin: 0 auto 28px; max-width: 520px; }

/* ---- Macro cards ---- */
.macro-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.macro-card { background: var(--color-white); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 24px; text-align: center; box-shadow: var(--shadow-card); }
.macro-card__value { display: block; font-family: 'Bricolage Grotesque', sans-serif; font-size: 34px; font-weight: 800; color: var(--color-green); }
.macro-card__label { display: block; font-weight: 700; margin-top: 4px; }
.macro-card__note { display: block; font-size: 13px; color: var(--color-muted); margin-top: 4px; }

/* ---- 7-day plan ---- */
.day-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.day-card { background: var(--color-green); color: #fff; border-radius: var(--radius-md); padding: 22px; box-shadow: var(--shadow-card); }
.day-card__title { color: var(--color-beige); font-size: 18px; margin: 0 0 14px; }
.day-card__meals { list-style: none; margin: 0; padding: 0; }
.day-card__meals li { padding: 12px 0; border-top: 1px solid rgba(246,242,233,.16); display: flex; flex-direction: column; gap: 2px; }
.day-card__meals li:first-child { border-top: none; }
.meal-type { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: rgba(246,242,233,.6); }
.meal-name { font-weight: 700; font-size: 15px; }
.meal-macros { font-size: 12px; color: rgba(246,242,233,.7); }

/* ---- Grocery preview (app-like) ---- */
.grocery-card { background: var(--color-white); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 30px; box-shadow: var(--shadow-card); display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 26px; }
.grocery-group__title { display: block; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--color-green); margin-bottom: 10px; }
.grocery-group ul { list-style: none; margin: 0; padding: 0; }
.grocery-group li { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 15px; }
.tick { width: 18px; height: 18px; border-radius: 6px; border: 2px solid var(--color-beige); flex: 0 0 auto; }
.grocery-note { color: var(--color-muted); font-size: 14px; margin-top: 14px; }

/* ---- Tips ---- */
.tips { list-style: none; margin: 0 0 20px; padding: 0; }
.tips li { position: relative; padding: 12px 0 12px 32px; border-bottom: 1px solid var(--color-border); }
.tips li::before { content: "→"; position: absolute; left: 0; top: 12px; color: var(--color-green); font-weight: 800; }

/* ---- Recipe cards ---- */
.recipe-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.recipe-card { background: var(--color-white); border: 1px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-card); }
.recipe-card__thumb { height: 140px; background: linear-gradient(135deg, var(--color-green), var(--color-green-dark)); display: grid; place-items: center; }
.recipe-card__thumb span { font-family: 'Bricolage Grotesque', sans-serif; font-size: 44px; font-weight: 800; color: var(--color-beige); }
.recipe-card__body { padding: 20px; }
.recipe-card__title { font-size: 18px; margin: 0 0 6px; }
.recipe-card__desc { color: var(--color-muted); font-size: 14px; margin: 0 0 12px; }
.recipe-card__meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; color: var(--color-green); font-weight: 700; }
.recipe-card__meta span { background: rgba(76,93,62,.08); padding: 4px 10px; border-radius: var(--radius-pill); }

/* ---- Comparison ---- */
.callout { background: rgba(220,200,166,.22); border: 1px solid var(--color-beige); border-radius: var(--radius-md); padding: 18px 22px; margin-top: 18px; font-size: 17px; }
.table-wrap { overflow-x: auto; }
.compare-table { width: 100%; border-collapse: collapse; background: var(--color-white); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-card); }
.compare-table th, .compare-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--color-border); }
.compare-table thead th { background: var(--color-green); color: #fff; font-size: 15px; }
.compare-table th.is-munchi, .compare-table td.is-munchi { background: rgba(220,200,166,.18); }
.compare-table thead th.is-munchi { background: var(--color-green-dark); color: var(--color-beige); }
.proscons { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.proscons__card { background: var(--color-white); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 24px; box-shadow: var(--shadow-card); }
.proscons__card h3 { margin: 0 0 12px; }
.proscons__label { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; margin: 10px 0 4px; }
.proscons__label--pro { color: var(--color-green); }
.proscons__label--con { color: #b4543a; }
.proscons__card ul { margin: 0 0 8px; padding-left: 20px; color: var(--color-muted); font-size: 15px; }
.bestfor { background: var(--color-white); border: 1px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-card); }
.bestfor__row { display: flex; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--color-border); }
.bestfor__row:last-child { border-bottom: none; }
.bestfor__app { font-weight: 800; min-width: 120px; color: var(--color-green); }
.bestfor__who { color: var(--color-muted); }

/* ---- Footer ---- */
.blog-footer { background: var(--color-white); border-top: 1px solid var(--color-border); margin-top: 70px; padding: 56px 0 30px; }
.blog-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 40px; }
.blog-footer__brand { max-width: 360px; }
.blog-footer__brand img { display: block; margin-bottom: 14px; }
.blog-footer__brand p { color: var(--color-muted); font-size: 15px; }
.blog-footer__nav { display: flex; gap: 56px; }
.blog-footer__nav div { display: flex; flex-direction: column; gap: 10px; }
.blog-footer__nav a { color: #4a4740; text-decoration: none; font-weight: 600; font-size: 15px; }
.blog-footer__nav a:hover { color: var(--color-green); }
.blog-footer__label { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--color-muted); }
.blog-footer__legal { margin-top: 36px; font-size: 13px; color: #a8a596; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .card-grid, .recipe-grid { grid-template-columns: 1fr 1fr; }
  .macro-grid { grid-template-columns: 1fr 1fr; }
  .hero--green { padding: 48px 32px; }
  .hero__title { font-size: 38px; }
  .article__title { font-size: 34px; }
  .proscons { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .blog-nav { gap: 14px; }
  .blog-nav a:not(.btn) { display: none; }
  .card-grid, .recipe-grid, .macro-grid { grid-template-columns: 1fr; }
  .hero { margin-top: 20px; }
  .hero__title { font-size: 30px; }
  .featured { padding: 26px; }
  .featured__title { font-size: 24px; }
  .cta-block__inner { padding: 44px 24px; }
  .cta-block__title { font-size: 28px; }
}
