.team-page {
  --team-gap: 1.25rem;
  --team-pad: 0.875rem;
  --team-radius: 1rem;
  --team-role-line-height: 1.25rem;

  color: var(--color-text);
}

.team-intro {
  padding-bottom: 1.5rem;
}

.team-filter-panel {
  display: grid;
  gap: var(--team-gap);
  padding: var(--team-pad);
  margin-bottom: 2rem;
  background: var(--color-surface-soft);
  border-radius: var(--team-radius);
}

.team-content {
  padding-bottom: 0;
}

@media (min-width: 768px) {
  .team-filter-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.team-field-label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--color-text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25rem;
}

.team-select {
  width: 100%;
  height: 3rem;
  padding: 0.5rem;
  color: var(--color-text);
  background: var(--color-surface);
  border: 0;
  border-radius: var(--team-radius);
}

.team-filter-action {
  align-self: end;
}

.team-reset {
  width: 100%;
}

.team-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--team-gap);
  margin-bottom: 1.5rem;
}

.team-heading {
  color: var(--color-text);
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 2rem;
}

.team-count {
  color: var(--color-text);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25rem;
}

.team-card-grid {
  display: grid;
  gap: 1.75rem;
  grid-template-columns: repeat(auto-fit, 260px);
  justify-content: center;
}

.team-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: var(--team-pad);
  overflow: hidden;
  color: var(--color-text);
  background: var(--color-surface-soft);
  border-radius: var(--team-radius);
}

.team-card-body {
  min-width: 0;
  padding-top: 0.75rem;
}

.team-person-name {
  color: var(--color-text);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.25;
}

.team-role-list {
  margin-top: 0.625rem;
  color: var(--color-text);
  font-size: 0.8125rem;
}

.team-role-list > * + * {
  margin-top: 0.5rem;
}

.team-role-list li {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  min-height: var(--team-role-line-height);
}

.team-role-mission {
  color: var(--color-page-accent, var(--color-primary-500));
  font-size: 0.75rem;
  font-weight: 800;
  line-height: var(--team-role-line-height);
  text-transform: uppercase;
}

.team-role-name {
  min-width: 0;
  font-weight: 700;
  line-height: var(--team-role-line-height);
  overflow-wrap: anywhere;
}

.team-photo {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: calc(var(--team-radius) * 0.75);
  background: var(--color-ice);
}

.dark .team-photo {
  background: var(--color-surface-soft);
}

@media (max-width: 560px) {
  .team-card-grid {
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .team-card {
    max-width: 20rem;
    margin-inline: auto;
  }

  .team-card-body {
    width: 100%;
  }

  .team-person-name {
    font-size: 1.125rem;
  }

  .team-role-list {
    font-size: 0.9375rem;
  }

  .team-role-list li {
    grid-template-columns: 3rem minmax(0, 1fr);
  }

  .team-role-mission {
    font-size: 0.8125rem;
  }

  .team-photo {
    display: block;
    overflow: hidden;
    border-radius: calc(var(--team-radius) * 0.75);
  }
}

.team-empty {
  padding: calc(var(--team-pad) * 1.5);
  color: var(--color-text-muted);
  background: var(--color-surface);
  border-radius: var(--team-radius);
}
