/* /recipes/ pages (generated by tools/make_recipe_pages.py) — phase 6, 2026-11-03.
   Recipe-only components on top of assets/site.css (tokens, base, header, footer, .article-wrap,
   tables, .pantry-tag, .tool-link-card live there). No tokens are declared here. */

/* ---------- frame ---------- */
.article-wrap--wide {
  max-width: var(--page-max);
}

.article-wrap .h1-sub {
  display: block;
  margin-top: var(--sp-1);
  color: var(--text-2);
  font-size: var(--fs-15);
  font-weight: 500;
}

/* category tag: quiet text chip, no per-genre color */
.article-tag.curry,
.article-tag.salad,
.article-tag.dessert {
  color: var(--text-2);
}

.article-wrap p.small,
.article-wrap .small {
  color: var(--text-2);
  font-size: var(--fs-14);
  line-height: 1.8;
}

/* ---------- hero: dish art + the one big figure + pantry shelf ---------- */
.recipe-hero {
  display: grid;
  gap: var(--sp-5);
  margin: var(--sp-5) 0 var(--sp-8);
  padding: var(--sp-4);
  border-radius: var(--r-panel);
  border: 1px solid var(--hairline);
  background: var(--surface-card);
  box-shadow: var(--shadow-small);
}

.recipe-hero__art {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  border-radius: var(--r-card);
  background: var(--surface-raised);
}

.recipe-hero__art img {
  width: 64%;
  height: auto;
  max-height: 88%;
  object-fit: contain;
}

.recipe-hero__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 0 var(--sp-1);
}

.article-wrap .recipe-hero__label {
  margin: 0 0 var(--sp-2);
  color: var(--text-2);
  font-size: var(--fs-14);
  line-height: 1.4;
}

.article-wrap .recipe-hero__figure {
  margin: 0 0 var(--sp-5);
  color: var(--accent);
  font-size: calc(var(--fs-32) * 1.375); /* 44px */
  line-height: 1;
}

.recipe-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 0 var(--sp-5);
  border-top: 1px solid var(--hairline);
}

.recipe-stats > div {
  padding: var(--sp-3) var(--sp-2) 0 0;
}

.recipe-stats > div + div {
  padding-left: var(--sp-2);
  border-left: 1px solid var(--hairline);
}

.recipe-stats dt {
  white-space: nowrap;
  color: var(--text-2);
  font-size: var(--fs-12);
  line-height: 1.5;
}

.recipe-stats dd {
  margin: var(--sp-1) 0 0;
  color: var(--text-1);
  font-size: var(--fs-14);
  line-height: 1.3;
  white-space: nowrap;
}

.recipe-stats dd.num,
.recipe-stats dd .num {
  font-size: var(--fs-18);
}

/* the pantry shelf: one hairline tag per ingredient (site.css .pantry-tag) */
.article-wrap .pantry-shelf {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.article-wrap .pantry-shelf li {
  margin: 0;
}

.pantry-shelf .pantry-tag__name {
  margin-right: var(--sp-1);
}

@media (min-width: 720px) {
  .recipe-hero {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: var(--sp-6);
    padding: var(--sp-5);
  }

  .recipe-hero__art {
    aspect-ratio: 1 / 1;
  }

  .article-wrap .recipe-hero__figure {
    font-size: calc(var(--fs-32) * 1.75); /* 56px */
  }
}

.recipe-hero--no-art {
  grid-template-columns: 1fr;
}

/* ---------- tables ---------- */
.table-wrap {
  margin: var(--sp-3) 0 var(--sp-4);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.article-wrap .table-wrap table {
  margin: 0;
}

.data-table th.n,
.data-table td.n {
  text-align: right;
  white-space: nowrap;
  font-family: var(--font-figure);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.data-table th.n {
  font-family: var(--font-ui);
}

.data-table td,
.spec-table td,
.spec-table th {
  vertical-align: middle;
}

.data-table thead th {
  white-space: nowrap;
}

.spec-table th {
  width: 38%;
  color: var(--text-2);
  font-weight: 500;
}

.spec-table b {
  font-family: var(--font-figure);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--text-1);
}

.ing {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  white-space: nowrap;
}

.ing img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

@media (max-width: 640px) {
  .article-wrap th,
  .article-wrap td {
    padding: var(--sp-2);
  }
}

/* ---------- CTA title (card + button come from site.css) ---------- */
.tool-link-title {
  margin-bottom: var(--sp-2);
  font-size: var(--fs-18);
  font-weight: 700;
  line-height: 1.5;
}

.article-wrap .tool-link-card p {
  margin-bottom: var(--sp-4);
}

/* ---------- link rows (compare / sharing / articles) ---------- */
.article-wrap .link-list {
  display: grid;
  gap: 0;
  margin: var(--sp-3) 0 var(--sp-6);
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--hairline);
}

.article-wrap .link-list li {
  margin: 0;
  padding: var(--sp-2) 0 var(--sp-3);
  border-bottom: 1px solid var(--hairline);
}

.link-list a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  font-weight: 700;
}

.link-list .meta {
  display: block;
  color: var(--text-2);
  font-size: var(--fs-14);
  line-height: 1.6;
}

.link-list .nw {
  white-space: nowrap;
}

.link-list .meta .num {
  color: var(--text-1);
}

.link-list .note {
  display: block;
  margin-top: var(--sp-1);
  color: var(--text-3);
  font-size: var(--fs-12);
  line-height: 1.6;
}

/* ---------- recipe grid (list page): one card per dish ---------- */
.article-wrap .recipe-list {
  gap: var(--sp-3);
  border-top: 0;
}

.article-wrap .recipe-list li {
  padding: var(--sp-3) var(--sp-4) var(--sp-4);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  background: var(--surface-card);
  box-shadow: var(--shadow-small);
}

.recipe-list a.ing {
  gap: var(--sp-3);
  white-space: normal;
  line-height: 1.4;
}

.recipe-list img {
  width: 48px;
  height: 48px;
  padding: var(--sp-1);
  border-radius: var(--r-control);
  background: var(--surface-raised);
  object-fit: contain;
}

.recipe-list .meta,
.recipe-list .note {
  padding-left: calc(48px + var(--sp-3));
}

@media (min-width: 720px) {
  .article-wrap .recipe-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1000px) {
  .article-wrap .recipe-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---------- recipe chips (same-genre index, list-page jump links) ---------- */
.chip-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin: var(--sp-3) 0 var(--sp-5);
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 var(--sp-3);
  border-radius: var(--r-control);
  border: 1px solid var(--hairline-strong);
  color: var(--text-2);
  font-size: var(--fs-14);
  line-height: 1.4;
  text-decoration: none;
  transition: background-color var(--dur-hover) var(--ease), color var(--dur-hover) var(--ease);
}

.chip:hover {
  background: var(--surface-raised);
  color: var(--text-1);
}

.chip.current {
  background: var(--accent-tint);
  border-color: var(--accent-line);
  color: var(--text-1);
}
