/* Only a Hero with exactly two direct CTA children receives the shared mobile row. */
@media (max-width: 599px) {
  .tc-v1-public :is(
    .tc-hero-banner .tc-actions,
    .tc-ph-hero .tc-ph-actions,
    .tc-pd-hero .tc-pd-actions,
    .tc-mh-hero .tc-mh-actions,
    .tc-ch-hero .tc-ch-actions,
    .tc-pr-hero .tc-pr-actions,
    .tc-resources-hero .tc-resources-actions,
    .tc-about-hero .tc-about-actions
  ):has(> :nth-child(2):last-child) {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-top: 24px;
  }

  .tc-v1-public :is(
    .tc-hero-banner .tc-actions,
    .tc-ph-hero .tc-ph-actions,
    .tc-pd-hero .tc-pd-actions,
    .tc-mh-hero .tc-mh-actions,
    .tc-ch-hero .tc-ch-actions,
    .tc-pr-hero .tc-pr-actions,
    .tc-resources-hero .tc-resources-actions,
    .tc-about-hero .tc-about-actions
  ):has(> :nth-child(2):last-child) > * {
    box-sizing: border-box;
    min-width: 0;
    width: auto;
    max-width: none;
  }

  .tc-v1-public :is(
    .tc-hero-banner .tc-actions,
    .tc-ph-hero .tc-ph-actions,
    .tc-pd-hero .tc-pd-actions,
    .tc-mh-hero .tc-mh-actions,
    .tc-ch-hero .tc-ch-actions,
    .tc-pr-hero .tc-pr-actions,
    .tc-resources-hero .tc-resources-actions,
    .tc-about-hero .tc-about-actions
  ):has(> :nth-child(2):last-child) > :first-child {
    flex: 0 1 44%;
  }

  .tc-v1-public :is(
    .tc-hero-banner .tc-actions,
    .tc-ph-hero .tc-ph-actions,
    .tc-pd-hero .tc-pd-actions,
    .tc-mh-hero .tc-mh-actions,
    .tc-ch-hero .tc-ch-actions,
    .tc-pr-hero .tc-pr-actions,
    .tc-resources-hero .tc-resources-actions,
    .tc-about-hero .tc-about-actions
  ):has(> :nth-child(2):last-child) > :last-child {
    flex: 0 1 56%;
  }

  .tc-v1-public :is(
    .tc-hero-banner .tc-actions,
    .tc-ph-hero .tc-ph-actions,
    .tc-pd-hero .tc-pd-actions,
    .tc-mh-hero .tc-mh-actions,
    .tc-ch-hero .tc-ch-actions,
    .tc-pr-hero .tc-pr-actions,
    .tc-resources-hero .tc-resources-actions,
    .tc-about-hero .tc-about-actions
  ):has(> :nth-child(2):last-child) :is(
    .wp-block-button__link,
    .tc-ph-button, .tc-ph-text-link,
    .tc-pd-button, .tc-pd-secondary, .tc-pd-text-link,
    .tc-mh-button, .tc-mh-text-link,
    .tc-ch-button, .tc-ch-text-link,
    .tc-pr-button, .tc-pr-text-link,
    .tc-resources-button, .tc-about-button
  ) {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    min-width: 0;
    min-height: 52px;
    padding: 10px;
    gap: 6px;
    justify-content: center;
    text-align: center;
    white-space: normal;
    overflow-wrap: normal;
    font-size: clamp(13px, 3.6vw, 15px);
    line-height: 1.25;
  }

  /* Homepage wraps each anchor in a Gutenberg button; fill its stretched wrapper. */
  .tc-v1-public .tc-hero-banner .tc-actions:has(> :nth-child(2):last-child)
  > .wp-block-button > .wp-block-button__link {
    height: 100%;
  }

  .tc-v1-public :is(
    .tc-hero-banner .tc-actions,
    .tc-ph-hero .tc-ph-actions,
    .tc-pd-hero .tc-pd-actions,
    .tc-mh-hero .tc-mh-actions,
    .tc-ch-hero .tc-ch-actions,
    .tc-pr-hero .tc-pr-actions,
    .tc-resources-hero .tc-resources-actions,
    .tc-about-hero .tc-about-actions
  ):has(> :nth-child(2):last-child) a > span[aria-hidden="true"] {
    flex-shrink: 0;
  }
}
