/* Exchange and tool directory: compact brand identity with aligned card actions. */
#appShell #benefits .benefit-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

#appShell #benefits .benefit-card {
  min-width: 0;
  min-height: 276px;
  grid-template-rows: auto minmax(72px, 1fr) auto auto;
  align-content: stretch;
  gap: 12px;
}

#appShell #benefits .benefit-card-top {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

#appShell #benefits .platform-logo {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  border-radius: 10px;
}

#appShell #benefits .platform-logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  image-rendering: auto;
}

#appShell #benefits .platform-logo-dark img {
  padding: 7px;
  object-fit: contain;
}

#appShell #benefits .platform-identity {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 10px;
}

#appShell #benefits .platform-title-row {
  min-width: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 10px;
}

#appShell #benefits .platform-identity h3,
#appShell #benefits .platform-title-row h3 {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  font-size: clamp(18px, 1.45vw, 21px);
  line-height: 1.2;
}

#appShell #benefits .platform-identity .platform-badge,
#appShell #benefits .platform-title-row .platform-badge {
  flex: 0 1 auto;
  max-width: 100%;
  white-space: normal;
  line-height: 1.35;
  text-align: center;
}

#appShell #benefits .platform-description {
  min-width: 0;
  margin: 0;
  align-self: start;
  overflow-wrap: anywhere;
}

/* Keep the existing referral and action rows aligned and comfortably tappable. */
#appShell #benefits .referral-code {
  align-self: end;
}

#appShell #benefits .referral-code button,
#appShell #benefits .benefit-actions a,
#appShell #benefits .benefit-tab {
  min-height: 44px;
}

#appShell #benefits .referral-code button {
  min-width: 44px;
  padding: 8px 10px;
}

#appShell #benefits .benefit-actions {
  align-self: end;
}

@media (max-width: 1180px) {
  #appShell #benefits .benefit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  #appShell #benefits .benefit-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  #appShell #benefits .benefit-card {
    min-height: 0;
    grid-template-rows: auto auto auto auto;
  }

  #appShell #benefits .platform-logo {
    width: 52px;
    height: 52px;
    flex-basis: 52px;
  }

  #appShell #benefits .platform-identity h3,
  #appShell #benefits .platform-title-row h3 {
    font-size: 19px;
  }
}

@media (max-width: 360px) {
  #appShell #benefits .platform-title-row {
    align-items: flex-start;
    flex-direction: column;
  }
}
