/* Nutrition entity pages: recipe cards, nutrient table, author line.
   Loaded only by /nutrition/ pages. Uses the site's own tokens from styles.css. */

/* --- the live panel's macro bars pick up their own colour ---------------- */
.doc .tool__bar i::after { background: var(--bar, var(--yellow-500)); }
.doc .tool__input select {
  width: 100%; min-width: 0; border: 0; background: none;
  font: inherit; font-size: 15px; font-weight: 600; color: var(--ink-900);
}

/* --- nutrient table ------------------------------------------------------ */
.nutrition-table th[scope="row"] { text-align: left; font-weight: 500; }
.nutrition-table td:last-child { font-variant-numeric: tabular-nums; color: var(--ink-600); }

/* --- recipes ------------------------------------------------------------- */
.recipes { display: grid; gap: 28px; margin: 30px 0 10px; }
/* The prose column is set to a reading width. Three recipes need more than that, so the
   grid breaks out to the page container while the text around it stays narrow. */
@media (min-width: 1000px) {
  .recipes {
    grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px;
    width: min(var(--container), 100vw - (2 * var(--gutter)));
    margin-left: 50%; transform: translateX(-50%);
  }
}
@media (min-width: 620px) and (max-width: 999px) {
  .recipes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
}

.recipe {
  display: flex; flex-direction: column;
  border: 1px solid var(--ink-100); border-radius: var(--r-lg);
  background: var(--elev); overflow: hidden; box-shadow: var(--shadow-card);
  transition: box-shadow .25s var(--ease-out), transform .25s var(--ease-out);
}
.recipe:hover { box-shadow: var(--shadow-sheet); transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .recipe, .recipe:hover { transition: none; transform: none; } }

.recipe__media {
  aspect-ratio: 16 / 10; background: var(--surface);
  position: relative; overflow: hidden; border-bottom: 1px solid var(--ink-100);
}
.recipe__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* until a photograph exists, a typographic plate rather than an empty grey box */
.recipe__media--placeholder {
  display: grid; place-items: center;
  background:
    radial-gradient(120% 90% at 50% 0%, var(--yellow-100) 0%, transparent 70%),
    var(--surface);
}
.recipe__media--placeholder span {
  font-family: var(--font-serif); font-style: italic;
  font-size: clamp(20px, 3.4vw, 28px); color: var(--ink-400);
  padding: 0 18px; text-align: center; line-height: 1.2;
}

.recipe__body { padding: 20px 20px 22px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.recipe__eyebrow {
  font-size: 10px; letter-spacing: .13em; text-transform: uppercase;
  font-weight: 600; color: var(--ink-400); margin: 0;
}
.recipe h3 { margin: 0; font-size: clamp(17px, 2vw, 19px); line-height: 1.25; }
.recipe__desc { margin: 0; font-size: 14px; color: var(--ink-600); line-height: 1.5; }

.recipe__meta {
  display: flex; flex-wrap: wrap; gap: 6px 14px;
  font-size: 12px; color: var(--ink-600); margin: 0;
}
.recipe__meta b { color: var(--ink-900); font-weight: 600; }

/* the number people came for, given room */
.recipe__stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--ink-100); border-radius: var(--r-md); overflow: hidden;
}
.recipe__stat {
  padding: 10px 4px; text-align: center; border-right: 1px solid var(--ink-100);
  min-width: 0;
}
.recipe__stat:last-child { border-right: 0; }
.recipe__stat b {
  display: block; font-family: var(--font-num); font-size: 17px;
  font-weight: 800; color: var(--ink-900); font-variant-numeric: tabular-nums; line-height: 1.1;
}
.recipe__stat span {
  display: block; font-size: 8.5px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-400); font-weight: 600; margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis;
}
.recipe__stat--kcal { background: var(--yellow-100); }

.recipe h4 {
  margin: 4px 0 -6px; font-size: 10px; letter-spacing: .13em;
  text-transform: uppercase; color: var(--ink-400); font-weight: 600;
}
.recipe ul, .recipe ol { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.55; }
.recipe ul { list-style: none; padding-left: 0; }
.recipe ul li {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 5px 0; border-bottom: 1px solid var(--ink-100);
}
.recipe ul li:last-child { border-bottom: 0; }
/* styles.css draws a yellow dot on every `.doc ul li::before` at left:0 and makes room for it
   with 22px of left padding. These rows have no such padding (the divider and the right-hand
   weight do the bullet's job), so the dot landed on the first letter of every ingredient.
   Same remedy the site already uses for .doc-sources. */
.doc .recipe ul li { padding-left: 0; }
.doc .recipe ul li::before { content: none; display: none; }
.recipe ul li span { color: var(--ink-600); font-variant-numeric: tabular-nums; white-space: nowrap; }
.recipe ol li { padding-left: 2px; margin-bottom: 7px; }
.recipe ol li::marker { color: var(--yellow-600); font-weight: 700; }

.recipe__source {
  margin: auto 0 0; padding-top: 12px; border-top: 1px solid var(--ink-100);
  font-size: 11px; color: var(--ink-400); line-height: 1.45;
}
.recipe__source a { color: var(--ink-600); }

/* --- byline ------------------------------------------------------------- */
.recipe-byline {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--ink-100); border-radius: var(--r-md);
  padding: 12px 14px; margin: 18px 0 0; background: var(--surface);
}
.recipe-byline img { border-radius: 50%; flex: none; }
.recipe-byline p { margin: 0; font-size: 13px; line-height: 1.45; color: var(--ink-600); }
.recipe-byline b { color: var(--ink-900); }
