/* =========================================================
   Brain-Healthy Kitchen (braindiet.php) — editorial public look.
   Everything scoped under .bdx; px/em only (site root font is ~10px).
   ========================================================= */
.bdx {
  --ivory: #f6f1e7;
  --paper: #fbf8f2;
  --ink: #1d2a22;
  --forest: #23392c;
  --forest-2: #2f4a3a;
  --sage: #8fa98d;
  --terra: #b4562f;
  --gold: #d6a84a;
  --muted: #5f655c;
  --rule: rgba(29, 42, 34, .14);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", "Helvetica Neue", Arial, sans-serif;
  background: var(--ivory);
  color: var(--ink);
  font: 400 17px/1.65 var(--sans);
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}
.bdx *, .bdx *::before, .bdx *::after { box-sizing: border-box; }
.bdx h1, .bdx h2, .bdx h3, .bdx h4 { text-transform: none; letter-spacing: -.01em; margin: 0; font-family: var(--serif); font-weight: 600; line-height: 1.12; color: inherit; }
.bdx p { margin: 0 0 1em; }
.bdx a { color: var(--terra); }
.bdx a:hover { color: #8f3f1f; }
.bdx ul, .bdx ol { margin: 0; padding: 0; }
.bdx img { max-width: 100%; display: block; }
.bdx [hidden] { display: none !important; }

.bdx-wrap { max-width: 1440px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 1200px) { .bdx-wrap { padding: 0 48px; } }
@media (min-width: 768px) { .bdx-wrap { padding: 0 32px; } }

.bdx-kicker { font: 600 12px/1.4 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--terra); margin: 0 0 14px; }
.bdx-h2 { font-size: clamp(30px, 4.2vw, 46px); }
.bdx-h3 { font-size: clamp(24px, 2.6vw, 30px); margin-bottom: 18px !important; }
.bdx-h4 { font-size: 20px; margin-bottom: 10px !important; }
.bdx-h4 small { font: 400 13px var(--sans); color: var(--muted); }
.bdx-note { font-size: 14px; color: var(--muted); }
.bdx-empty { font-family: var(--serif); font-size: 22px; font-style: italic; color: var(--muted); padding: 32px 0; }

/* Buttons */
.bdx-btns { display: flex; flex-wrap: wrap; gap: 12px; }
.bdx-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 26px; border-radius: 999px; border: 1px solid rgba(255,255,255,.55); color: #fff !important; font: 600 15px/1 var(--sans); text-decoration: none !important; transition: background .15s, transform .15s, border-color .15s; }
.bdx-btn:hover { background: rgba(255,255,255,.12); transform: translateY(-1px); }
.bdx-btn-gold { background: var(--gold); border-color: var(--gold); color: var(--forest) !important; }
.bdx-btn-gold:hover { background: #e3b75a; border-color: #e3b75a; }

/* ---------- HERO (index) ---------- */
.bdx-hero { background: radial-gradient(120% 90% at 85% 10%, #355540 0%, var(--forest) 55%, #18271e 100%); color: #f4efe4; padding: 130px 0 72px; position: relative; overflow: hidden; }
.bdx-hero-short { padding-bottom: 96px; }
.bdx-hero .bdx-kicker { color: var(--gold); }
.bdx-hero h1 { font-size: clamp(44px, 7vw, 84px); font-weight: 400; line-height: 1.02; margin-bottom: 22px; color: #fff; }
.bdx-hero h1 em { font-style: italic; color: var(--gold); }
.bdx-lede { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.6; color: rgba(244,239,228,.86); max-width: 34em; margin-bottom: 30px !important; }
.bdx-hero-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 992px) { .bdx-hero-grid { grid-template-columns: 1fr 1fr; gap: 64px; } .bdx-hero { padding: 150px 0 96px; } }
.bdx-hero-stats { display: flex; flex-wrap: wrap; gap: 28px 44px; margin: 40px 0 0; padding-top: 26px; border-top: 1px solid rgba(255,255,255,.16); }
.bdx-hero-stats div { margin: 0; }
.bdx-hero-stats dt { font: 500 12px/1.3 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: rgba(244,239,228,.6); order: 2; }
.bdx-hero-stats dd { font: 400 40px/1.1 var(--serif); color: #fff; margin: 0 0 4px; }
.bdx-hero-stats div { display: flex; flex-direction: column-reverse; }
@media (max-width: 599px) {
  .bdx-hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .bdx-hero-stats dd { font-size: 32px; }
  .bdx-hero-stats dt { font-size: 10px; letter-spacing: .08em; }
  .bdx-btns .bdx-btn { flex: 1 1 100%; }
}

.bdx-hero-art { position: relative; display: grid; grid-template-columns: 1fr; }
.bdx-hero-feature { position: relative; display: block; border-radius: 6px; overflow: hidden; aspect-ratio: 4 / 5; max-height: 560px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.55); }
.bdx-hero-feature img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.bdx-hero-feature:hover img { transform: scale(1.03); }
.bdx-hero-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 22px 20px; background: linear-gradient(transparent, rgba(12,20,15,.85)); color: #fff; font: 400 22px/1.25 var(--serif); }
.bdx-hero-cap small { display: block; font: 600 11px/1.4 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; }
.bdx-hero-thumb { display: none; }
@media (min-width: 992px) {
  .bdx-hero-art { padding: 0 0 0 60px; }
  .bdx-hero-thumb { display: block; position: absolute; width: 38%; aspect-ratio: 1; border-radius: 6px; overflow: hidden; border: 6px solid var(--forest); box-shadow: 0 20px 40px -16px rgba(0,0,0,.6); }
  .bdx-hero-thumb img { width: 100%; height: 100%; object-fit: cover; }
  .bdx-t0 { left: 0; top: 12%; }
  .bdx-t0 { left: 0; top: 6%; width: 34%; }
  .bdx-t1 { right: -20px; top: -28px; width: 26%; }
}
@media (max-width: 767px) { .bdx-hero-feature { aspect-ratio: 4 / 3; } }

/* ---------- SECTIONS ---------- */
.bdx-sec { padding: 72px 0; }
.bdx-sec-paper { background: var(--paper); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
@media (min-width: 992px) { .bdx-sec { padding: 104px 0; } }
.bdx-sec-head { margin-bottom: 40px; }
.bdx-sec-head-split { display: grid; gap: 18px; align-items: end; }
@media (min-width: 992px) { .bdx-sec-head-split { grid-template-columns: 5fr 6fr; gap: 64px; } }
.bdx-sec-intro { color: var(--muted); font-size: 17px; margin: 0 !important; }

/* MIND plate */
.bdx-plate { display: grid; gap: 28px; }
@media (min-width: 768px) { .bdx-plate { grid-template-columns: repeat(3, 1fr); gap: 36px; } }
.bdx-plate-col { border-top: 2px solid var(--forest); padding-top: 18px; }
.bdx-plate-less { border-top-color: var(--terra); }
.bdx-plate-title { font: 600 13px/1.4 var(--sans) !important; letter-spacing: .14em !important; text-transform: uppercase !important; margin-bottom: 12px !important; color: var(--forest-2) !important; }
.bdx-plate-less .bdx-plate-title { color: var(--terra) !important; }
.bdx-plate-list { list-style: none; counter-reset: pl; }
.bdx-plate-list li { border-bottom: 1px solid var(--rule); }
.bdx-plate-list a { display: flex; flex-direction: column; padding: 12px 0; color: var(--ink) !important; text-decoration: none !important; }
.bdx-plate-list a:hover .bdx-pl-name { color: var(--terra); }
ol.bdx-plate-list a { padding-left: 38px; position: relative; }
ol.bdx-plate-list a::before { counter-increment: pl; content: counter(pl, decimal-leading-zero); position: absolute; left: 0; top: 14px; font: italic 400 16px var(--serif); color: var(--sage); }
.bdx-pl-name { font: 400 20px/1.3 var(--serif); transition: color .15s; }
.bdx-pl-g { font-size: 14px; color: var(--muted); }

/* Filters */
.bdx-filters { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; margin-bottom: 32px; }
.bdx-chips { display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px; max-width: 100%; }
.bdx-chips::-webkit-scrollbar { display: none; }
.bdx-chip { flex: 0 0 auto; min-height: 40px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--rule); background: transparent; color: var(--ink); font: 500 14px/1 var(--sans); cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.bdx-chip:hover { border-color: var(--forest-2); }
.bdx-chip.is-on { background: var(--forest); border-color: var(--forest); color: #fff; }
.bdx-chips-diet .bdx-chip.is-on { background: var(--terra); border-color: var(--terra); }

/* Cards */
.bdx-grid { display: grid; gap: 36px 28px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .bdx-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .bdx-grid { grid-template-columns: repeat(3, 1fr); } }
.bdx-card { display: flex; flex-direction: column; color: var(--ink) !important; text-decoration: none !important; }
.bdx-card-img { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 4px; background: #e6dfd0; }
.bdx-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.bdx-card:hover .bdx-card-img img { transform: scale(1.04); }
.bdx-card-body { display: flex; flex-direction: column; padding-top: 16px; flex: 1; }
.bdx-card-kick { font: 600 11px/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--terra); }
.bdx-card-title { font: 400 24px/1.2 var(--serif); margin: 8px 0 8px; transition: color .15s; }
.bdx-card:hover .bdx-card-title { color: var(--terra); }
.bdx-card-sum { font-size: 15px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bdx-card-foot { margin-top: auto; padding-top: 14px; display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.bdx-dots { display: inline-flex; gap: 3px; }
.bdx-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--rule); }
.bdx-dots i.on { background: var(--sage); }

/* Evidence */
.bdx-legend { display: flex; flex-wrap: wrap; gap: 10px 24px; font-size: 13px; color: var(--muted); margin-bottom: 28px; }
.bdx-badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font: 600 11px/1.3 var(--sans); letter-spacing: .04em; white-space: nowrap; background: #e9e4d8; color: var(--ink); }
.bdx-s-strong { background: #23392c; color: #fff; }
.bdx-s-moderate { background: #d9e5d4; color: #23392c; }
.bdx-s-limited { background: #f1e4c4; color: #6b4e12; }
.bdx-s-mixed { background: #f2ddd2; color: #8f3f1f; }
.bdx-evidence { display: grid; gap: 16px; align-items: start; }
@media (min-width: 768px) { .bdx-evidence { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .bdx-evidence { grid-template-columns: repeat(3, 1fr); } }
.bdx-ev { background: var(--paper); border: 1px solid var(--rule); border-radius: 6px; scroll-margin-top: 90px; transition: box-shadow .2s; }
.bdx-ev[open] { box-shadow: 0 18px 40px -24px rgba(29,42,34,.45); }
.bdx-ev summary { list-style: none; cursor: pointer; padding: 22px 22px 18px; display: flex; flex-direction: column; gap: 8px; }
.bdx-ev summary::-webkit-details-marker { display: none; }
.bdx-ev-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.bdx-ev-role { font: 600 11px/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--sage); }
.bdx-role-limit .bdx-ev-role, .bdx-role-caution .bdx-ev-role { color: var(--terra); }
.bdx-ev-name { font: 400 24px/1.2 var(--serif); }
.bdx-ev-head { font-size: 15px; color: var(--muted); }
.bdx-ev-more { font: 600 13px var(--sans); color: var(--terra); margin-top: 4px; }
.bdx-ev-more .mdi { display: inline-block; transition: transform .2s; }
.bdx-ev[open] .bdx-ev-more .mdi { transform: rotate(180deg); }
.bdx-ev[open] .bdx-ev-more { font-size: 0; }
.bdx-ev[open] .bdx-ev-more .mdi { font-size: 18px; }
.bdx-ev-body { padding: 0 22px 22px; border-top: 1px solid var(--rule); padding-top: 18px; font-size: 15px; }
.bdx-ev-practical { color: var(--muted); }
.bdx-ev-label { font: 600 11px/1.4 var(--sans) !important; letter-spacing: .14em; text-transform: uppercase; color: var(--forest-2); margin: 18px 0 8px !important; }
.bdx-ev-mech { padding-left: 18px !important; color: var(--muted); }
.bdx-ev-studies { list-style: none; }
.bdx-ev-studies li { border-left: 2px solid var(--sage); padding: 2px 0 2px 14px; margin-bottom: 14px; }
.bdx-ev-studies p { margin: 0 0 4px; }
.bdx-ev-studies a { font-size: 13px; font-weight: 600; text-decoration: none; }

/* Closing note */
.bdx-close { background: var(--forest); color: rgba(244,239,228,.85); padding: 64px 0; }
.bdx-close .bdx-kicker { color: var(--gold); }
.bdx-close h2 { color: #fff; margin-bottom: 16px; }
.bdx-close-grid { display: grid; gap: 28px; align-items: center; }
@media (min-width: 992px) { .bdx-close-grid { grid-template-columns: 7fr 4fr; gap: 64px; } }
.bdx-close-cta { display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 991px) { .bdx-close-cta { flex-direction: row; flex-wrap: wrap; } }

/* ---------- RECIPE PAGE ---------- */
.bdx-rhero { position: relative; min-height: 72vh; min-height: 72svh; display: flex; align-items: flex-end; background: var(--forest) center / cover no-repeat; color: #fff; }
.bdx-rhero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12,20,15,.55) 0%, rgba(12,20,15,.2) 28%, rgba(12,20,15,.62) 55%, rgba(12,20,15,.9) 100%); }
.bdx-rhero-in { position: relative; width: 100%; max-width: 1440px; margin: 0 auto; padding: 120px 16px 48px; }
@media (min-width: 768px) { .bdx-rhero-in { padding: 140px 32px 64px; } }
.bdx-rhero h1 { font-size: clamp(36px, 6vw, 72px); font-weight: 400; max-width: 16em; margin-bottom: 18px; color: #fff; }
.bdx-rhero .bdx-kicker { color: var(--gold); }
.bdx-rhero-lede { font-size: clamp(16px, 1.5vw, 19px); max-width: 40em; color: rgba(255,255,255,.88); margin: 0 !important; }
.bdx-crumb { font-size: 13px; margin-bottom: 18px; display: flex; gap: 8px; flex-wrap: wrap; }
.bdx-crumb a { color: rgba(255,255,255,.8) !important; text-decoration: none; }
.bdx-crumb a:hover { color: #fff !important; text-decoration: underline; }
.bdx-crumb span { color: rgba(255,255,255,.45); }

.bdx-meta { max-width: 1440px; margin: 0 auto; padding: 0 16px; display: flex; flex-wrap: wrap; align-items: stretch; border-bottom: 1px solid var(--rule); }
@media (min-width: 768px) { .bdx-meta { padding: 0 32px; } }
.bdx-meta > div[role=listitem] { padding: 18px 22px 18px 0; margin-right: 22px; border-right: 1px solid var(--rule); display: flex; flex-direction: column; }
.bdx-meta > div[role=listitem]:last-of-type { border-right: 0; }
.bdx-meta span { font: 600 11px/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.bdx-meta b { font: 400 22px/1.3 var(--serif); }
.bdx-meta b small { font: 400 13px var(--sans); color: var(--muted); }
.bdx-meta-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; padding: 12px 0; }
.bdx-icon-btn { min-height: 44px; min-width: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--rule); background: transparent; color: var(--ink); font: 500 14px var(--sans); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.bdx-icon-btn:hover { border-color: var(--forest-2); }
.bdx-icon-btn.is-done { background: var(--sage); color: #fff; }
@media (max-width: 599px) {
  .bdx-meta > div[role=listitem] { flex: 1 1 33%; margin-right: 0; padding: 14px 10px 14px 0; border-right: 0; }
  .bdx-meta b { font-size: 19px; }
  .bdx-meta-tools { margin-left: 0; width: 100%; border-top: 1px solid var(--rule); }
  .bdx-hide-sm { display: none; }
}

.bdx-recipe { max-width: 1440px; margin: 0 auto; padding: 48px 16px 72px; display: grid; gap: 48px; }
@media (min-width: 768px) { .bdx-recipe { padding: 64px 32px 96px; } }
@media (min-width: 992px) { .bdx-recipe { grid-template-columns: 380px 1fr; gap: 72px; align-items: start; } .bdx-ingredients { position: sticky; top: 96px; } }
.bdx-ingredients { background: var(--paper); border: 1px solid var(--rule); border-radius: 6px; padding: 28px 24px; }
.bdx-ingredients ul { list-style: none; }
.bdx-ingredients li { border-bottom: 1px dashed var(--rule); }
.bdx-ingredients label { display: flex; gap: 12px; align-items: flex-start; padding: 11px 0; margin: 0; font-weight: 400; cursor: pointer; font-size: 16px; line-height: 1.45; }
.bdx-ingredients input { appearance: none; -webkit-appearance: none; flex: 0 0 20px; width: 20px; height: 20px; margin: 2px 0 0; border: 1.5px solid var(--sage); border-radius: 50%; cursor: pointer; position: relative; }
.bdx-ingredients input:checked { background: var(--sage); }
.bdx-ingredients input:checked::after { content: ""; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.bdx-ingredients input:checked + span { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--sage); }
.bdx-ingredients b { font-weight: 600; }
.bdx-nutrition { margin-top: 28px; }
.bdx-nutrition dl { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; }
.bdx-nutrition dl div { background: var(--ivory); border-radius: 4px; padding: 10px 12px; }
.bdx-nutrition dt { font: 500 12px var(--sans); color: var(--muted); }
.bdx-nutrition dd { font: 400 20px var(--serif); margin: 0; }

.bdx-steps { list-style: none; counter-reset: st; }
.bdx-steps li { position: relative; padding: 0 0 26px 64px; }
.bdx-steps li::before { counter-increment: st; content: counter(st); position: absolute; left: 0; top: -6px; font: italic 400 38px/1 var(--serif); color: var(--terra); width: 48px; text-align: right; }
.bdx-steps li p { font-size: 18px; line-height: 1.7; border-bottom: 1px solid var(--rule); padding-bottom: 22px; margin: 0; }
.bdx-steps li:last-child p { border-bottom: 0; }

.bdx-why { margin-top: 32px; background: var(--forest); color: rgba(244,239,228,.88); border-radius: 6px; padding: 32px 24px; }
@media (min-width: 768px) { .bdx-why { padding: 40px 40px; } }
.bdx-why .bdx-kicker { color: var(--gold); }
.bdx-why h2 { color: #fff; }
.bdx-why-lede { font: 400 19px/1.6 var(--serif); color: #f4efe4; }
.bdx-why-foods { list-style: none; display: grid; gap: 10px; margin-top: 22px !important; }
@media (min-width: 768px) { .bdx-why-foods { grid-template-columns: 1fr 1fr; } }
.bdx-why-foods a { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 14px 16px; border: 1px solid rgba(255,255,255,.16); border-radius: 4px; text-decoration: none !important; color: inherit !important; transition: background .15s, border-color .15s; }
.bdx-why-foods a:hover { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.35); }
.bdx-why-name { font: 400 19px var(--serif); color: #fff; }
.bdx-why-head { font-size: 14px; color: rgba(244,239,228,.75); }
.bdx-why-foods .bdx-badge { align-self: flex-start; margin-top: 4px; }

.bdx-tips { margin-top: 32px; border-left: 3px solid var(--gold); padding: 4px 0 4px 22px; }
.bdx-tips p { font-size: 17px; color: var(--ink); margin: 0; }
.bdx-source { margin-top: 32px; font-size: 14px; color: var(--muted); font-style: italic; }

/* Page-level: hide the default top padding/white so the hero sits under the transparent navbar */
body.bdx-body { background: var(--ivory, #f6f1e7); }

/* ---------- PRINT ---------- */
@media print {
  .navbar, .bdx-noprint, .bdx-meta-tools, .footer, footer, .bdx-ingredients .bdx-note { display: none !important; }
  .bdx { background: #fff; font-size: 12pt; }
  .bdx-rhero { min-height: 0; background-image: none !important; color: #000; }
  .bdx-rhero::before { display: none; }
  .bdx-rhero-in { padding: 0 0 12pt; }
  .bdx-rhero h1, .bdx-rhero-lede, .bdx-rhero .bdx-kicker { color: #000 !important; }
  .bdx-crumb { display: none; }
  .bdx-recipe { display: block; padding: 12pt 0; }
  .bdx-ingredients { position: static; border: 0; padding: 0; margin-bottom: 18pt; }
  .bdx-why { background: none; color: #000; border: 1px solid #999; }
  .bdx-why h2, .bdx-why-name, .bdx-why-lede, .bdx-why-head { color: #000 !important; }
  .bdx-steps li p { font-size: 12pt; }
}
