.family-hub-hero,
.family-page-hero {
  padding: clamp(4.5rem, 9vw, 7.5rem) 0;
}

.family-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, .82fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
}

.family-hub-hero h1,
.family-page-hero h1 {
  max-width: 13ch;
  margin-top: 1rem;
  font-size: clamp(3rem, 6.7vw, 6.2rem);
  line-height: .95;
  letter-spacing: -.064em;
}

.family-page-hero h1 {
  max-width: 15ch;
  font-size: clamp(2.8rem, 5.9vw, 5.6rem);
}

.family-hero-media {
  margin: 0;
}

.family-hero-media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
  border-radius: 34px;
  box-shadow: var(--shadow);
}

.family-hero-media figcaption,
.review-date {
  margin-top: .8rem;
  color: var(--ink-faint);
  font-size: .82rem;
  line-height: 1.5;
}

.family-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: 1.6rem;
}

.family-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1.5rem;
}

.family-hero-actions .button {
  min-height: 48px;
}

.family-filter-row span {
  border-radius: 999px;
  background: white;
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink-soft);
  padding: .6rem .82rem;
  font-size: .82rem;
  font-weight: 700;
}

.family-principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.family-principles article {
  min-height: 270px;
  border-radius: 28px;
  background: white;
  padding: 1.8rem;
  box-shadow: var(--shadow);
}

.family-principles article:nth-child(2) {
  background: var(--sage);
}

.family-principles article:nth-child(3) {
  background: #f4e8dc;
}

.family-principles span,
.family-recipe-number {
  color: var(--accent);
  font-size: .78rem;
  font-weight: 780;
  letter-spacing: .12em;
}

.family-principles h2 {
  margin-top: 3.5rem;
  font-size: 1.7rem;
  line-height: 1.06;
}

.family-principles p {
  margin-top: .85rem;
  color: var(--ink-soft);
  line-height: 1.6;
}

.family-directory {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.family-directory-card {
  min-height: 330px;
  display: flex;
  flex-direction: column;
  border-radius: 30px;
  background: white;
  box-shadow: var(--shadow);
  padding: 1.8rem;
}

.family-directory-card:nth-child(3n + 2) {
  background: #f3eadf;
}

.family-directory-card:nth-child(3n + 3) {
  background: var(--sage);
}

.family-directory-card > span {
  color: var(--accent-deep);
  font-size: .72rem;
  font-weight: 760;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.family-directory-card h3 {
  margin-top: 2.2rem;
  font-size: clamp(1.5rem, 2.6vw, 2.25rem);
  line-height: 1.05;
}

.family-directory-card p {
  margin-top: .9rem;
  color: var(--ink-soft);
  line-height: 1.58;
}

.family-directory-card strong {
  margin-top: auto;
  padding-top: 1.5rem;
  color: var(--accent-deep);
}

.family-at-a-glance .detail-grid article {
  min-height: 260px;
}

.family-recipe-list {
  display: grid;
  gap: 1rem;
}

.family-recipe-card {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 1.2rem;
  border-radius: 30px;
  background: white;
  box-shadow: var(--shadow);
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

.family-recipe-copy h3 {
  font-size: clamp(1.55rem, 3vw, 2.5rem);
  line-height: 1.08;
}

.family-recipe-copy dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
  margin: 1.5rem 0 0;
}

.family-recipe-copy dl > div {
  border-radius: 18px;
  background: var(--cream);
  padding: 1rem;
}

.family-recipe-copy dt {
  color: var(--accent-deep);
  font-size: .7rem;
  font-weight: 780;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.family-recipe-copy dd {
  margin: .48rem 0 0;
  color: var(--ink-soft);
  line-height: 1.58;
}

.family-recipe-copy .allergen-row {
  background: #f5ede3;
}

.family-inline-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  border-radius: 30px;
  background: #26352f;
  color: white;
  padding: clamp(1.6rem, 4vw, 2.6rem);
}

.family-inline-cta h2 {
  font-size: clamp(1.6rem, 3vw, 2.7rem);
  line-height: 1.08;
}

.family-inline-cta p {
  max-width: 60ch;
  margin-top: .6rem;
  color: rgba(255, 255, 255, .76);
  line-height: 1.6;
}

.family-inline-cta .button {
  flex: 0 0 auto;
}

.prep-layout {
  display: grid;
  grid-template-columns: .7fr 1.3fr;
  gap: clamp(2rem, 7vw, 6rem);
}

.prep-layout h2,
.source-panel h2,
.safety-panel h2 {
  margin-top: .75rem;
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 1.04;
}

.prep-layout ol {
  display: grid;
  gap: .8rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.prep-layout li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding: 1rem 0 1.5rem;
}

.prep-layout li span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-weight: 750;
}

.prep-layout li p {
  color: var(--ink-soft);
  line-height: 1.65;
}

.safety-section {
  background: #26352f;
  color: white;
}

.safety-panel {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: clamp(2rem, 7vw, 6rem);
}

.safety-panel .eyebrow {
  color: #fac7ad;
}

.safety-panel p {
  color: rgba(255, 255, 255, .76);
  line-height: 1.72;
}

.safety-panel p + p {
  margin-top: 1rem;
}

.ingredient-link-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .8rem;
}

.ingredient-link-row a {
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 22px;
  background: rgba(255, 255, 255, .76);
  box-shadow: inset 0 0 0 1px var(--line);
  padding: 1.3rem;
}

.ingredient-link-row a span {
  color: var(--accent-deep);
  font-size: .84rem;
  font-weight: 700;
}

.source-panel {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: clamp(2rem, 7vw, 6rem);
  border-radius: 34px;
  background: white;
  box-shadow: var(--shadow);
  padding: clamp(1.8rem, 5vw, 3.6rem);
}

.source-panel > div > p:last-child {
  margin-top: 1rem;
  color: var(--ink-soft);
  line-height: 1.65;
}

.source-panel ul {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.source-panel li {
  display: grid;
  gap: .35rem;
  border-bottom: 1px solid var(--line);
  padding: 1rem 0;
}

.source-panel li a {
  color: var(--accent-deep);
  font-weight: 720;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.source-panel li span {
  color: var(--ink-soft);
  font-size: .9rem;
  line-height: 1.5;
}

.source-panel.compact {
  box-shadow: inset 0 0 0 1px var(--line);
}

@media (max-width: 940px) {
  .family-hero-grid,
  .prep-layout,
  .safety-panel,
  .source-panel {
    grid-template-columns: 1fr;
  }

  .family-hero-media {
    max-width: 720px;
  }

  .family-directory,
  .family-principles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ingredient-link-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .family-hub-hero,
  .family-page-hero {
    padding: 3.8rem 0;
  }

  .family-hub-hero h1,
  .family-page-hero h1 {
    font-size: clamp(2.65rem, 13vw, 4.6rem);
  }

  .family-directory,
  .family-principles,
  .ingredient-link-row,
  .family-recipe-copy dl {
    grid-template-columns: 1fr;
  }

  .family-principles article {
    min-height: 230px;
  }

  .family-recipe-card {
    grid-template-columns: 1fr;
  }

  .family-inline-cta {
    align-items: flex-start;
    flex-direction: column;
  }

  .family-inline-cta .button {
    width: 100%;
  }

  .family-directory-card {
    min-height: 280px;
  }
}
