/* Per-food and per-category calorie pages (/calories/…), generated by
   scripts/seo/gen-food-pages.py. A separate, versioned file because /assets/ is
   served `immutable` for 30 days — editing content.css would never reach a
   cached visitor. Bump the name (food.v2.css) instead of editing in place once
   this is live. */

.crumbs { font-size: .88rem; color: var(--ink-3); margin: 0 0 22px; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { color: inherit; text-decoration: none; }
.crumbs a:hover { color: var(--brand, #059669); text-decoration: underline; }

.food h2, .hub h2 { font-size: clamp(1.15rem, 2vw, 1.4rem); margin: 38px 0 14px; }
.food-hero { display: flex; gap: 28px; align-items: center; justify-content: space-between; }
.food-hero h1, .hub h1 { margin: 10px 0 12px; font-size: clamp(1.7rem, 4vw, 2.5rem); }
.food-hero .answer { font-size: clamp(1rem, 1.6vw, 1.15rem); line-height: 2; color: var(--ink-2); margin: 0 0 10px; max-width: 640px; }
.food-hero .answer strong { color: var(--ink); }
.food-img { width: 220px; height: 220px; border-radius: var(--radius-lg, 28px); object-fit: cover; flex: none; box-shadow: var(--shadow); background: var(--bg-sunk); }
.aka { font-size: .9rem; color: var(--ink-3); margin: 0 0 10px; }

.badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.badges span {
  font-size: .8rem; padding: 4px 11px; border-radius: 999px;
  background: var(--bg-sunk); border: 1px solid var(--line); color: var(--ink-2);
}
.badges .q-nutritionist, .badges .q-verified { background: rgba(5, 150, 105, .1); border-color: rgba(5, 150, 105, .25); color: var(--brand, #059669); font-weight: 600; }
.badges .q-estimated { background: rgba(245, 158, 11, .1); border-color: rgba(245, 158, 11, .28); color: var(--accent-ink, #78350f); }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 30px 0 0; }
.kpis div { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius-sm, 14px); padding: 16px; }
.kpis b { display: block; font-size: 1.6rem; line-height: 1.3; color: var(--brand, #059669); font-variant-numeric: tabular-nums; }
.kpis span { font-size: .85rem; color: var(--ink-3); }

table.kcal.facts { min-width: 0; }
table.kcal.facts thead th { white-space: normal; }
table.kcal.facts th[scope="row"] { font-weight: 600; text-align: start; }
table.kcal.facts td { text-align: start; }

.macro-bar { display: flex; height: 16px; border-radius: 999px; overflow: hidden; background: var(--bg-sunk); }
.macro-bar i { display: block; height: 100%; }
.m-p { background: var(--brand, #059669); }
.m-c { background: var(--accent, #f59e0b); }
.m-f { background: var(--rose, #ec4899); }
.macro-legend { display: flex; flex-wrap: wrap; gap: 18px; list-style: none; padding: 0; margin: 12px 0 0; font-size: .92rem; }
.macro-legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-inline-end: 6px; vertical-align: middle; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 36px; }
.kv { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: var(--radius-sm, 14px); background: var(--bg-elev); }
.kv li { display: flex; justify-content: space-between; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--line-2); }
.kv li:last-child { border-bottom: 0; }
.kv b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.small { font-size: .85rem; color: var(--ink-3); margin: 10px 0 0; }

.related { list-style: none; padding: 0; margin: 0 0 18px; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.related.one { grid-template-columns: 1fr; }
.related a {
  display: flex; justify-content: space-between; gap: 10px; align-items: center;
  padding: 12px 16px; border-radius: var(--radius-sm, 14px); text-decoration: none; color: inherit;
  background: var(--bg-elev); border: 1px solid var(--line);
  transition: border-color .15s, transform .15s;
}
.related a:hover { border-color: var(--brand, #059669); transform: translateY(-1px); }
.related b { font-size: .85rem; color: var(--ink-3); font-weight: 500; white-space: nowrap; }

.cta-box {
  display: flex; gap: 20px; align-items: center; justify-content: space-between;
  margin: 40px 0 10px; padding: 24px 26px; border-radius: var(--radius, 20px);
  background: var(--bg-tint); border: 1px solid rgba(5, 150, 105, .2);
}
.cta-box p { margin: 6px 0 0; color: var(--ink-2); line-height: 1.9; }
.cta-box .btn { flex: none; }

table.kcal td.food a { color: inherit; text-decoration: none; border-bottom: 1px dashed rgba(5, 150, 105, .45); }
table.kcal td.food a:hover { color: var(--brand, #059669); }

@media (max-width: 760px) {
  .food-hero { flex-direction: column-reverse; align-items: stretch; }
  .food-img { width: 100%; height: auto; aspect-ratio: 16 / 10; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
  .cta-box { flex-direction: column; align-items: stretch; text-align: start; }
}

/* ── v2: recipe and activity pages ─────────────────────────────────────────── */
.ing { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: var(--radius-sm, 14px); background: var(--bg-elev); }
.ing li { padding: 10px 16px; border-bottom: 1px solid var(--line-2); line-height: 1.8; }
.ing li:last-child { border-bottom: 0; }
.ing li::before { content: "•"; color: var(--brand, #059669); margin-inline-end: 8px; }
.ing a { color: inherit; border-bottom: 1px dashed rgba(5, 150, 105, .45); text-decoration: none; }
.ing .opt { color: var(--ink-3); font-size: .85rem; }

.recipe-steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.recipe-steps li {
  counter-increment: s; position: relative; line-height: 2;
  padding: 12px 58px 12px 16px; background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius-sm, 14px);
}
.recipe-steps li::before {
  content: counter(s, persian); position: absolute; inset-inline-start: 14px; top: 12px;
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand, #059669); color: #fff; font-weight: 700; font-size: .9rem;
}

.related img { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; flex: none; background: var(--bg-sunk); }
.related a span { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.related a span small { font-size: .8rem; color: var(--ink-3); }
.hub h2 a { color: inherit; text-decoration: none; }
.hub h2 small { font-size: .85rem; color: var(--ink-3); font-weight: 500; }
