/* Public ingredient detail — matches ingredients hub tokens */

.ingd-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 40px 80px;
}

.ingd-crumb {
  font-size: .8rem;
  color: hsl(var(--foreground) / .5);
  margin: 8px 0 18px;
}

.ingd-crumb a {
  color: hsl(var(--accent));
  text-decoration: none;
  font-weight: 600;
}

.ingd-hero {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 34px;
  align-items: center;
}

.ingd-hero-img,
.ingd-hero-img--empty {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 22px;
  border: 1px solid hsl(var(--border-soft));
  background: hsl(var(--surface-soft));
}

.ingd-hero-img--empty {
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-size: 3rem;
  color: hsl(var(--foreground) / .28);
}

.ingd-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: hsl(var(--foreground) / .5);
  font-weight: 700;
}

.ingd-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2rem, 4.6vw, 3.2rem);
  line-height: 1.06;
  margin: 10px 0 6px;
}

.ingd-sub {
  font-size: .92rem;
  color: hsl(var(--foreground) / .55);
  margin: 0 0 12px;
}

.ingd-blurb {
  font-size: 1rem;
  line-height: 1.65;
  max-width: 56ch;
  color: hsl(var(--foreground) / .72);
  margin: 0;
}

.ingd-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 4px;
}

.ingd-flag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--background));
  color: hsl(var(--foreground) / .82);
}

.ingd-flag.is-on {
  background: hsl(153 22% 28% / .12);
  border-color: hsl(153 22% 28% / .4);
  color: hsl(153 28% 22%);
}

.ingd-section {
  margin-top: 52px;
}

.ingd-section h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.7rem;
  margin: 0 0 6px;
}

.ingd-note {
  font-size: .8rem;
  color: hsl(var(--foreground) / .5);
  margin: 0 0 18px;
}

.ingd-macros {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.ingd-macro {
  background: hsl(var(--background));
  border: 1px solid hsl(var(--border-soft));
  border-radius: 16px;
  padding: 16px;
}

.ingd-macro b {
  display: block;
  font-size: 1.55rem;
  font-family: var(--font-serif);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  color: hsl(var(--foreground));
}

.ingd-pm {
  display: inline;
  margin-left: 4px;
  font-family: var(--font-sans);
  font-size: .72em;
  font-weight: 600;
  color: hsl(var(--foreground) / .55);
  letter-spacing: 0;
}

.ingd-macro span {
  font-size: .78rem;
  color: hsl(var(--foreground) / .62);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 600;
}

.ingd-prose {
  font-size: .95rem;
  line-height: 1.75;
  color: hsl(var(--foreground) / .82);
}

.ingd-prose h1,
.ingd-prose h2,
.ingd-prose h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  color: hsl(var(--foreground));
  line-height: 1.25;
  margin: 0 0 12px;
}

.ingd-prose h2 { font-size: 1.2rem; }
.ingd-prose h3 { font-size: 1.05rem; }

.ingd-prose p { margin: 0 0 12px; }
.ingd-prose p:last-child { margin-bottom: 0; }

.ingd-prose ul,
.ingd-prose ol {
  margin: 0 0 12px;
  padding-left: 1.2rem;
}

.ingd-prose li + li { margin-top: 6px; }

.ingd-prose strong { color: hsl(var(--foreground)); font-weight: 650; }

.ingd-list {
  margin: 0;
  padding-left: 1.15rem;
  color: hsl(var(--foreground) / .82);
  line-height: 1.7;
}

.ingd-list li + li { margin-top: 6px; }

.ingd-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.ingd-card {
  background: hsl(var(--background));
  border: 1px solid hsl(var(--border-soft));
  border-radius: 18px;
  padding: 22px;
}

.ingd-card h3 {
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: hsl(var(--foreground) / .55);
  margin: 0 0 14px;
  font-weight: 700;
}

.ingd-kv {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed hsl(var(--border-soft));
  font-size: .9rem;
  color: hsl(var(--foreground) / .72);
}

.ingd-kv:last-child { border-bottom: 0; }
.ingd-kv b { font-weight: 600; text-align: right; color: hsl(var(--foreground)); }

.ingd-related {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.ingd-related a {
  display: block;
  text-decoration: none;
  color: inherit;
  background: hsl(var(--background));
  border: 1px solid hsl(var(--border-soft));
  border-radius: 18px;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.ingd-related a:hover {
  transform: translateY(-3px);
  border-color: hsl(var(--accent) / .35);
  box-shadow: 0 14px 30px hsl(153 30% 20% / .10);
}

.ingd-rel-media {
  width: 100%;
  height: 130px;
  object-fit: cover;
  background: hsl(var(--surface-soft));
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: hsl(var(--foreground) / .3);
}

.ingd-rel-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ingd-rel-body { padding: 14px 16px; }
.ingd-rel-body .ing-cat {
  font-size: .66rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 700;
  color: hsl(var(--accent));
}
.ingd-rel-body h4 { margin: 4px 0 0; font-size: .95rem; }

.ingd-back {
  display: inline-flex;
  margin-top: 28px;
  font-size: .85rem;
  font-weight: 700;
  color: hsl(var(--accent));
  text-decoration: none;
}

@media (max-width: 900px) {
  .ingd-wrap { padding: 22px 20px 64px; }
  .ingd-hero,
  .ingd-grid2 { grid-template-columns: 1fr; }
  .ingd-macros { grid-template-columns: repeat(2, 1fr); }
  .ingd-related { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .ingd-related { grid-template-columns: 1fr; }
}

.ingd-refrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
}

.ingd-ifct {
  display: inline-flex;
  align-items: center;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 6px 11px;
  border-radius: 999px;
  background: hsl(153 22% 28%);
  color: hsl(var(--background));
}

.ingd-ifct-name {
  font-size: .82rem;
  color: hsl(var(--foreground) / .55);
}
