/* What is in a Pod (v2 #41), carrying the actives table (v2 #40). */

.ingredient-panel__inner {
  max-width: 1080px;
  margin: 0 auto;
}

.ingredient-panel__intro {
  max-width: 640px;
  margin-bottom: clamp(30px, 4vw, 48px);
}

.ingredient-panel__eyebrow {
  margin-bottom: 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(var(--color-text));
}

.ingredient-panel__intro h2 {
  margin: 0 0 16px;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: clamp(24px, 3.4vw, 38px);
  font-weight: 700;
  line-height: 1.16;
  color: rgba(var(--color-text));
  text-wrap: balance;
}

.ingredient-panel__intro p {
  margin: 0;
  font-size: 15px;
  line-height: 1.75;
  color: rgba(var(--color-light-text));
}

.ingredient-panel__cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: clamp(24px, 4vw, 44px);
  margin-bottom: clamp(34px, 5vw, 56px);
}

.ingredient-panel__card {
  text-align: center;
}

.ingredient-panel__card-media {
  display: block;
  width: 100%;
  height: 200px;
  margin-bottom: 18px;
  object-fit: cover;
  border-radius: 8px;
  background: rgba(var(--color-text), 0.05);
}

.ingredient-panel__card h3 {
  margin: 0 0 10px;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 17px;
  font-weight: 400;
  color: rgba(var(--color-text));
}

.ingredient-panel__card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(var(--color-light-text));
}

/* Aug 28 #9: on a phone the cards rail (shared [data-migration-rail]
   treatment) and the dot row takes over the block's bottom margin, so the dots
   sit against the rail rather than a gap away from it. */
@media (max-width: 759px) {
  .ingredient-panel__cards {
    margin-bottom: 0;
  }

  .ingredient-panel__cards + .migration-rail__dots {
    margin-bottom: 26px; /* Oct 8: the dots' 24px tap targets add 8px below */
  }

  .ingredient-panel__card-media {
    height: 168px;
  }
}

/* The table scrolls inside its own box so a narrow phone never pushes the
   page sideways.

   Sep 1 #30: and the box is v2's again — a hairline border with clipped
   corners around a tinted header row, rather than the open ruled list this
   had become. The measurements are v2's: the same green at 0.18 outside and
   0.12 between rows, 6px corners, 12/14px cells, ivory behind the headers. */
.ingredient-panel__table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(33, 78, 52, 0.18);
  border-radius: 6px;
  /* Sep 11 #3: the table fits its box now, so there is nothing to scroll to.
     Should an unusually long name ever overflow, it still scrolls, but never
     paints a bar. */
  scrollbar-width: none;
}

.ingredient-panel__table-wrap::-webkit-scrollbar {
  display: none;
}

/* Sep 11 #3: a 420px floor used to sit here. It is what pushed the table past
   a phone's width and brought the scroll bar in; two short columns fit any
   screen. */
.ingredient-panel__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.ingredient-panel__table th {
  padding: 12px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(var(--color-text));
  background: #f7f4ec;
}

/* The rules run between rows rather than under them, so the last row does not
   draw a line against the box's own border. */
.ingredient-panel__table td {
  padding: 12px 14px;
  color: rgba(var(--color-light-text));
  border-top: 1px solid rgba(33, 78, 52, 0.12);
  font-variant-numeric: tabular-nums;
}

.ingredient-panel__table td:first-child {
  font-weight: 600;
  color: rgba(var(--color-text));
}

/* The share column reads as figures: right-aligned under its heading, never
   broken across lines. */
.ingredient-panel__table th:nth-child(2),
.ingredient-panel__table td:nth-child(2) {
  text-align: right;
  white-space: nowrap;
}

/* Sep 11 #5: actives and inert ingredients as two columns from 760px up, both
   boxes the same height; stacked on a phone. */
.ingredient-panel__facts {
  display: grid;
  gap: 16px;
}

@media (min-width: 760px) {
  .ingredient-panel__facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
}

/* Sep 11 #3: the inert ingredients, in the actives table's own frame: the
   label and its share in the ivory header row. */
.ingredient-panel__inert {
  border: 1px solid rgba(33, 78, 52, 0.18);
  border-radius: 6px;
  overflow: hidden;
}

.ingredient-panel__inert-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(var(--color-text));
  background: #f7f4ec;
}

.ingredient-panel__inert-share {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Sep 11 #5: one compact run of names rather than a tag each; the tags took a
   box twice the height of the table beside them. The dots are drawn here, so
   the merchant's text stays a plain comma list. */
.ingredient-panel__inert-list {
  margin: 0;
  padding: 12px 14px;
  list-style: none;
  font-size: 13.5px;
  line-height: 1.75;
  color: rgba(var(--color-light-text));
}

.ingredient-panel__inert-list li {
  display: inline;
  margin: 0;
}

.ingredient-panel__inert-list li + li::before {
  content: "·";
  margin: 0 0.15em 0 0.4em;
  font-weight: 700;
  color: rgba(33, 78, 52, 0.5);
}

/* The directions are a caution, not more ingredients: set apart with a rule
   down the side rather than running on under the list.

   Sep 11 #5: two classes deep on purpose. base/index.css styles
   p:first-child and p:last-child, which outrank a single class, and this is
   the panel's last paragraph — its gap and padding were being overridden. */
.ingredient-panel .ingredient-panel__directions {
  margin: 20px 0 0;
  padding: 12px 14px;
  border-left: 3px solid #214e34;
  border-radius: 0 6px 6px 0;
  background: rgba(33, 78, 52, 0.05);
  font-size: 13px;
  line-height: 1.65;
  color: rgba(var(--color-light-text));
}

@media (max-width: 759px) {
  .ingredient-panel__table th,
  .ingredient-panel__table td {
    padding: 11px 12px;
  }

  .ingredient-panel__table th {
    letter-spacing: 0.04em;
  }

  .ingredient-panel__inert-list {
    padding: 11px 12px;
  }
}
